]> the.earth.li Git - onak.git/blobdiff - t/all-085-get-subkey-v5.t
Add support for v5 keys
[onak.git] / t / all-085-get-subkey-v5.t
diff --git a/t/all-085-get-subkey-v5.t b/t/all-085-get-subkey-v5.t
new file mode 100755 (executable)
index 0000000..e6076f1
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+# Check we can retrieve a key by subkeyid
+
+set -e
+
+# Backends should really support this, but the file one is as simple as
+# possible, so doesn't. Skip the test for it.
+if [ "$2" = "file" ]; then
+       exit 0
+fi
+
+cd ${WORKDIR}
+${BUILDDIR}/onak -b -c $1 add < ${TESTSDIR}/../keys/v5-test.key
+if ! ${BUILDDIR}/onak -c $1 get 0xE4557C2B02FFBF4B 2> /dev/null | \
+       grep -q -- '-----BEGIN PGP PUBLIC KEY BLOCK-----'; then
+       echo "* Did not correctly retrieve key by subkey id."
+       exit 1
+fi
+
+exit 0