summaryrefslogtreecommitdiff
path: root/regress/krl.sh
diff options
context:
space:
mode:
Diffstat (limited to 'regress/krl.sh')
-rw-r--r--regress/krl.sh16
1 files changed, 9 insertions, 7 deletions
diff --git a/regress/krl.sh b/regress/krl.sh
index a672e0daf..799f9d093 100644
--- a/regress/krl.sh
+++ b/regress/krl.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: krl.sh,v 1.4 2014/11/17 00:21:40 djm Exp $ 1# $OpenBSD: krl.sh,v 1.5 2015/01/19 17:31:13 djm Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="key revocation lists" 4tid="key revocation lists"
@@ -47,6 +47,7 @@ EOF
47# A specification that revokes some certificated by key ID. 47# A specification that revokes some certificated by key ID.
48touch $OBJ/revoked-keyid 48touch $OBJ/revoked-keyid
49for n in 1 2 3 4 10 15 30 50 `jot 500 300` 999 1000 1001 1002; do 49for n in 1 2 3 4 10 15 30 50 `jot 500 300` 999 1000 1001 1002; do
50 test "x$n" = "x499" && continue
50 # Fill in by-ID revocation spec. 51 # Fill in by-ID revocation spec.
51 echo "id: revoked $n" >> $OBJ/revoked-keyid 52 echo "id: revoked $n" >> $OBJ/revoked-keyid
52done 53done
@@ -58,7 +59,7 @@ keygen() {
58 keytype=$ECDSA 59 keytype=$ECDSA
59 case $N in 60 case $N in
60 2 | 10 | 510 | 1001) keytype=rsa;; 61 2 | 10 | 510 | 1001) keytype=rsa;;
61 4 | 30 | 520 | 1002) keytype=dsa;; 62 4 | 30 | 520 | 1002) keytype=ed25519;;
62 esac 63 esac
63 $SSHKEYGEN -t $keytype -f $f -C "" -N "" > /dev/null \ 64 $SSHKEYGEN -t $keytype -f $f -C "" -N "" > /dev/null \
64 || fatal "$SSHKEYGEN failed" 65 || fatal "$SSHKEYGEN failed"
@@ -76,11 +77,12 @@ for n in $REVOKED_SERIALS ; do
76 REVOKED_KEYS="$REVOKED_KEYS ${f}.pub" 77 REVOKED_KEYS="$REVOKED_KEYS ${f}.pub"
77 REVOKED_CERTS="$REVOKED_CERTS ${f}-cert.pub" 78 REVOKED_CERTS="$REVOKED_CERTS ${f}-cert.pub"
78done 79done
79NOTREVOKED_SERIALS="5 9 14 16 29 30 49 51 499 800 1000 1001" 80UNREVOKED_SERIALS="5 9 14 16 29 49 51 499 800 1010 1011"
80NOTREVOKED="" 81UNREVOKED=""
81for n in $NOTREVOKED_SERIALS ; do 82for n in $UNREVOKED_SERIALS ; do
82 NOTREVOKED_KEYS="$NOTREVOKED_KEYS ${f}.pub" 83 f=`keygen $n`
83 NOTREVOKED_CERTS="$NOTREVOKED_CERTS ${f}-cert.pub" 84 UNREVOKED_KEYS="$UNREVOKED_KEYS ${f}.pub"
85 UNREVOKED_CERTS="$UNREVOKED_CERTS ${f}-cert.pub"
84done 86done
85 87
86genkrls() { 88genkrls() {