From 84d6ee5a5f2c442009342a2a4e65518659f7c4cc Mon Sep 17 00:00:00 2001 From: Jameson Rollins Date: Sat, 25 Dec 2010 14:14:17 -0500 Subject: [PATCH] add tests for openpgp4fpr pkc type --- tests/basic | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/basic b/tests/basic index 525aa6d..253a302 100755 --- a/tests/basic +++ b/tests/basic @@ -25,7 +25,7 @@ srcdir=$(dirname $0)/.. REPS=5 -CERTTYPES="x509pem x509der opensshpubkey rfc4716" +CERTTYPES="x509pem x509der opensshpubkey rfc4716 openpgp4fpr" printf "testing %d reps of simple/quick true/false:\n" "$REPS" for n in $(seq 1 "$REPS") ; do @@ -71,11 +71,17 @@ done # translate X and Y's keys into OpenPGP cert for name in x y; do - PEM2OPENPGP_USAGE_FLAGS=authenticate pem2openpgp "https://${name}.example.net" < "${WORKDIR}/sec/${name}.key" | gpg --import + uid="https://${name}.example.net" + PEM2OPENPGP_USAGE_FLAGS=authenticate pem2openpgp "$uid" < "${WORKDIR}/sec/${name}.key" | gpg --import + # export fingerprint for openpgp4fpr + gpg --with-colons --fingerprint "=${uid}" | grep '^fpr:' | cut -d: -f10 > "${WORKDIR}/pkc/${name}.openpgp4fpr" done # and the same for the clients A and B for name in a b; do - PEM2OPENPGP_USAGE_FLAGS=authenticate pem2openpgp "${name} <${name}@example.net>" < "${WORKDIR}/sec/${name}.key" | gpg --import + uid="${name} <${name}@example.net>" + PEM2OPENPGP_USAGE_FLAGS=authenticate pem2openpgp "$uid" < "${WORKDIR}/sec/${name}.key" | gpg --import + # export fingerprint for openpgp4fpr + gpg --with-colons --fingerprint "=${uid}" | grep '^fpr:' | cut -d: -f10 > "${WORKDIR}/pkc/${name}.openpgp4fpr" done runtests() { -- 2.26.2