Commit c9a3cc7 1 parent 4d8c818 commit c9a3cc7 Copy full SHA for c9a3cc7
File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 1
- # $OpenBSD: sshsig.sh,v 1.6 2021/07/23 03:54:55 djm Exp $
1
+ # $OpenBSD: sshsig.sh,v 1.7 2021/08/11 08:55:04 djm Exp $
2
2
# Placed in the Public Domain.
3
3
4
4
tid=" sshsig"
@@ -64,6 +64,17 @@ for t in $SIGNKEYS; do
64
64
< $DATA > /dev/null 2>&1 || \
65
65
fail " failed signature for $t key w/ limited namespace"
66
66
67
+ (printf " $sig_principal namespaces=\" $sig_namespace ,whatever\" " ;
68
+ cat $pubkey ) > $OBJ /allowed_signers
69
+ ${SSHKEYGEN} -q -Y verify -s $sigfile -n $sig_namespace \
70
+ -I $sig_principal -f $OBJ /allowed_signers \
71
+ -O print-pubkey \
72
+ < $DATA | cut -d' ' -f1-2 > ${OBJ} /${keybase} -fromsig.pub || \
73
+ fail " failed signature for $t key w/ print-pubkey"
74
+ cut -d' ' -f1-2 ${OBJ} /${keybase} .pub > ${OBJ} /${keybase} -strip.pub
75
+ diff -r ${OBJ} /${keybase} -strip.pub ${OBJ} /${keybase} -fromsig.pub || \
76
+ fail " print-pubkey differs from signature key"
77
+
67
78
# Invalid option
68
79
(printf " $sig_principal octopus " ; cat $pubkey ) > $OBJ /allowed_signers
69
80
${SSHKEYGEN} -vvv -Y verify -s $sigfile -n $sig_namespace \
You can’t perform that action at this time.
0 commit comments