summaryrefslogtreecommitdiff
path: root/regress/krl.sh
diff options
context:
space:
mode:
Diffstat (limited to 'regress/krl.sh')
-rw-r--r--regress/krl.sh22
1 files changed, 14 insertions, 8 deletions
diff --git a/regress/krl.sh b/regress/krl.sh
index e18d0ec7f..c381225ed 100644
--- a/regress/krl.sh
+++ b/regress/krl.sh
@@ -1,16 +1,19 @@
1# $OpenBSD: krl.sh,v 1.8 2019/07/25 09:17:35 dtucker Exp $ 1# $OpenBSD: krl.sh,v 1.11 2019/12/16 02:39:05 djm Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="key revocation lists" 4tid="key revocation lists"
5 5
6# Use ed25519 by default since it's fast and it's supported when building 6# Use ed25519 by default since it's fast and it's supported when building
7# w/out OpenSSL. Populate ktype[2-4] with the other types if supported. 7# w/out OpenSSL. Populate ktype[2-4] with the other types if supported.
8ktype1=ed25519; ktype2=ed25519; ktype3=ed25519; ktype4=ed25519 8ktype1=ed25519; ktype2=ed25519; ktype3=ed25519;
9for t in `${SSH} -Q key-plain`; do 9ktype4=ed25519; ktype5=ed25519; ktype6=ed25519;
10for t in $SSH_KEYTYPES; do
10 case "$t" in 11 case "$t" in
11 ecdsa*) ktype2=ecdsa ;; 12 ecdsa*) ktype2=ecdsa ;;
12 ssh-rsa) ktype3=rsa ;; 13 ssh-rsa) ktype3=rsa ;;
13 ssh-dss) ktype4=dsa ;; 14 ssh-dss) ktype4=dsa ;;
15 sk-ssh-ed25519@openssh.com) ktype5=ed25519-sk ;;
16 sk-ecdsa-sha2-nistp256@openssh.com) ktype6=ecdsa-sk ;;
14 esac 17 esac
15done 18done
16 19
@@ -34,6 +37,7 @@ serial: 10
34serial: 15 37serial: 15
35serial: 30 38serial: 30
36serial: 50 39serial: 50
40serial: 90
37serial: 999 41serial: 999
38# The following sum to 500-799 42# The following sum to 500-799
39serial: 500 43serial: 500
@@ -51,7 +55,7 @@ EOF
51 55
52# A specification that revokes some certificated by key ID. 56# A specification that revokes some certificated by key ID.
53touch $OBJ/revoked-keyid 57touch $OBJ/revoked-keyid
54for n in 1 2 3 4 10 15 30 50 `jot 500 300` 999 1000 1001 1002; do 58for n in 1 2 3 4 10 15 30 50 90 `jot 500 300` 999 1000 1001 1002; do
55 test "x$n" = "x499" && continue 59 test "x$n" = "x499" && continue
56 # Fill in by-ID revocation spec. 60 # Fill in by-ID revocation spec.
57 echo "id: revoked $n" >> $OBJ/revoked-keyid 61 echo "id: revoked $n" >> $OBJ/revoked-keyid
@@ -64,9 +68,11 @@ keygen() {
64 # supported. 68 # supported.
65 keytype=$ktype1 69 keytype=$ktype1
66 case $N in 70 case $N in
67 2 | 10 | 510 | 1001) keytype=$ktype2 ;; 71 2 | 10 | 510 | 1001) keytype=$ktype2 ;;
68 4 | 30 | 520 | 1002) keytype=$ktype3 ;; 72 4 | 30 | 520 | 1002) keytype=$ktype3 ;;
69 8 | 50 | 530 | 1003) keytype=$ktype4 ;; 73 8 | 50 | 530 | 1003) keytype=$ktype4 ;;
74 16 | 70 | 540 | 1004) keytype=$ktype5 ;;
75 32 | 90 | 550 | 1005) keytype=$ktype6 ;;
70 esac 76 esac
71 $SSHKEYGEN -t $keytype -f $f -C "" -N "" > /dev/null \ 77 $SSHKEYGEN -t $keytype -f $f -C "" -N "" > /dev/null \
72 || fatal "$SSHKEYGEN failed" 78 || fatal "$SSHKEYGEN failed"
@@ -78,7 +84,7 @@ keygen() {
78 84
79# Generate some keys. 85# Generate some keys.
80verbose "$tid: generating test keys" 86verbose "$tid: generating test keys"
81REVOKED_SERIALS="1 4 10 50 500 510 520 799 999" 87REVOKED_SERIALS="1 4 10 50 90 500 510 520 550 799 999"
82for n in $REVOKED_SERIALS ; do 88for n in $REVOKED_SERIALS ; do
83 f=`keygen $n` 89 f=`keygen $n`
84 RKEYS="$RKEYS ${f}.pub" 90 RKEYS="$RKEYS ${f}.pub"