X-Git-Url: http://the.earth.li/gitweb/?a=blobdiff_plain;f=t%2Fall-095-get-subkey-fingerprint.t;fp=t%2Fall-095-get-subkey-fingerprint.t;h=58f0f708b9d2a598e7906a28eca81c75915f726e;hb=a2979c20e1ab2d52e3a961ac7dad45fee9d6345a;hp=0000000000000000000000000000000000000000;hpb=00e37c36f214bf9d2e9794d3089e64522a6275a2;p=onak.git diff --git a/t/all-095-get-subkey-fingerprint.t b/t/all-095-get-subkey-fingerprint.t new file mode 100755 index 0000000..58f0f70 --- /dev/null +++ b/t/all-095-get-subkey-fingerprint.t @@ -0,0 +1,25 @@ +#!/bin/sh +# Check we can retrieve a key by keyid + +set -e + +# Backends should really support full fingerprint retrieval, but they don't +# always. +if [ "$2" = "file" ]; then + exit 0 +fi + +cd ${WORKDIR} +${BUILDDIR}/onak -b -c $1 add < ${TESTSDIR}/../keys/noodles.key +if ! ${BUILDDIR}/onak -c $1 index 0x448B17C122A22C19FE289DC1045281F1B9A66E35 2> /dev/null | \ + grep -q -- 'noodles@earth.li'; then + echo "* Did not correctly retrieve key by subkey fingerprint." + exit 1 +fi +if ${BUILDDIR}/onak -e -c $1 index 0x448B17C122A22C19FE289DC1045281F1B9A66E35 2> /dev/null | \ + grep -q -- 'noodles@earth.li'; then + echo "* Incorrectly retrieved key by subkey fingerprint." + exit 1 +fi + +exit 0