[PATCH 03/14] tests/smime: Include the Sample LAMPS Certificate Authority
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Tue Dec 3 21:51:51 PST 2019
This CA is useful for test suites and the like, but is not an
actually-secure CA, because its secret key material is also published.
I plan to use it for its intended purpose in the notmuch test suite.
It was copied from this Internet Draft:
https://www.ietf.org/id/draft-dkg-lamps-samples-01.html#name-certificate-authority-certi
Signed-off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
---
test/T355-smime.sh | 2 ++
test/smime/README | 2 ++
test/smime/ca.crt | 20 ++++++++++++++++++++
3 files changed, 24 insertions(+)
create mode 100644 test/smime/ca.crt
diff --git a/test/T355-smime.sh b/test/T355-smime.sh
index c272533a..dac9b1e5 100755
--- a/test/T355-smime.sh
+++ b/test/T355-smime.sh
@@ -13,6 +13,8 @@ add_gpgsm_home ()
gpgsm --batch --no-tty --no-common-certs-import --disable-dirmngr --import < $NOTMUCH_SRCDIR/test/smime/test.crt >"$GNUPGHOME"/import.log 2>&1
fpr=$(gpgsm --batch --list-key test_suite at notmuchmail.org | sed -n 's/.*fingerprint: //p')
echo "$fpr S relax" >> $GNUPGHOME/trustlist.txt
+ gpgsm --quiet --batch --no-tty --no-common-certs-import --disable-dirmngr --import < $NOTMUCH_SRCDIR/test/smime/ca.crt
+ echo "4D:E0:FF:63:C0:E9:EC:01:29:11:C8:7A:EE:DA:3A:9A:7F:6E:C1:0D S" >> "$GNUPGHOME/trustlist.txt"
test_debug "cat $GNUPGHOME/import.log"
}
diff --git a/test/smime/README b/test/smime/README
index 92803c77..6b8d3f87 100644
--- a/test/smime/README
+++ b/test/smime/README
@@ -5,3 +5,5 @@ key+cert.pem: cert + unencryped private
% gpsm --import test.crt
% gpgsm --export-private-key-p12 -out foo.p12 (no passphrase)
% openssl pkcs12 -in ns.p12 -clcerts -nodes > key+cert.pem
+
+ca.crt: from https://www.ietf.org/id/draft-dkg-lamps-samples-01.html#name-certificate-authority-certi
diff --git a/test/smime/ca.crt b/test/smime/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