Skip to content

Commit b9d134a

Browse files
committed
upstream: Use awk instead of cut to help -portable.
Some platforms have size limits on cut. OpenBSD-Regress-ID: fe871e8ed43fd92efb0df76f61c5cc9c5429ea82
1 parent 60978dd commit b9d134a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

regress/sshsig.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $OpenBSD: sshsig.sh,v 1.16 2025/09/11 07:23:32 djm Exp $
1+
# $OpenBSD: sshsig.sh,v 1.17 2026/06/16 10:58:42 dtucker Exp $
22
# Placed in the Public Domain.
33

44
tid="sshsig"
@@ -86,10 +86,10 @@ for t in $SIGNKEYS; do
8686
cat $pubkey) > $OBJ/allowed_signers
8787
${SSHKEYGEN} -q -Y verify -s $sigfile -n $sig_namespace \
8888
-I $sig_principal -f $OBJ/allowed_signers \
89-
-O print-pubkey \
90-
< $DATA | cut -d' ' -f1-2 > ${OBJ}/${keybase}-fromsig.pub || \
89+
-O print-pubkey < $DATA | \
90+
awk '{print $1" "$2}' >${OBJ}/${keybase}-fromsig.pub || \
9191
fail "failed signature for $t key w/ print-pubkey"
92-
cut -d' ' -f1-2 ${OBJ}/${keybase}.pub > ${OBJ}/${keybase}-strip.pub
92+
awk '{print $1" "$2}' ${OBJ}/${keybase}.pub >${OBJ}/${keybase}-strip.pub
9393
diff -r ${OBJ}/${keybase}-strip.pub ${OBJ}/${keybase}-fromsig.pub || \
9494
fail "print-pubkey differs from signature key"
9595

0 commit comments

Comments
 (0)