aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2009-09-16 17:38:14 +0000
committerRob Austein <sra@hactrn.net>2009-09-16 17:38:14 +0000
commit80c43433012375cfe411cac5bc304a4dea1af658 (patch)
tree7c96243d3285ac4765e77ecc920cd3ae4ff0192b
parent3ec8b842b46adeb11b7791f35be256eb64c78f1d (diff)
Cleanup
svn path=/myrpki/verify-bpki.sh; revision=2758
-rwxr-xr-xmyrpki/verify-bpki.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/myrpki/verify-bpki.sh b/myrpki/verify-bpki.sh
index 655807cb..432aa9c4 100755
--- a/myrpki/verify-bpki.sh
+++ b/myrpki/verify-bpki.sh
@@ -1,17 +1,17 @@
#!/bin/sh -
# $Id$
#
-# Tests of generated BPKI certificates.
+# Tests of generated BPKI certificates. This is kind of cheesy but
+# does test some of the basic stuff.
+# Check that CRLs verify properly
find bpki.* -name '*.crl' | sed 's=^\(.*\)/\(.*\)$=echo -n "&: "; openssl crl -CAfile \1/ca.cer -noout -in &=' | sh
+# Check that issued certs verify properly
find bpki.* -name '*.cer' ! -name 'ca.cer' ! -name '*.cacert.cer' | sed 's=^\(.*\)/.*$=openssl verify -CAfile \1/ca.cer &=' | sh
-# This won't work once there are more certs in the picture, but will
-# suffice as an initial test of the pathlen-restricted
-# cross-certification.
-
-for bpki in bpki.pubd bpki.rpkid
-do
- openssl verify -verbose -CAfile $bpki/ca.cer -untrusted $bpki/xcert.*.cer bpki.myrpki/bsc.*.cer
-done
+# Attempt to check that cross-certified certs verify properly
+if test -d bpki.myirbe
+then
+ cat bpki.myirbe/xcert.*.cer | openssl verify -verbose -CAfile bpki.myirbe/ca.cer -untrusted /dev/stdin bpki.myrpki/bsc.*.cer
+fi