]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: Use -Ohashalg to restrict output to specfic hash instead
authordtucker@openbsd.org <dtucker@openbsd.org>
Thu, 16 Jul 2026 09:07:18 +0000 (09:07 +0000)
committerDamien Miller <djm@mindrot.org>
Tue, 21 Jul 2026 06:20:22 +0000 (16:20 +1000)
of awk.

OpenBSD-Regress-ID: aa5fac0e3ee8f518794d3361d537090c6e3f0bec

regress/sshfp-connect.sh

index d8c2a28b1c8059a0278e883d784e6e7ae1f2d07e..7cfef3768a2c8e3837631ae59a96a211675f864f 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: sshfp-connect.sh,v 1.8 2026/07/12 11:19:33 dtucker Exp $
+#      $OpenBSD: sshfp-connect.sh,v 1.9 2026/07/16 09:07:18 dtucker Exp $
 #      Placed in the Public Domain.
 
 # This test requires external setup and thus is skipped unless
@@ -37,14 +37,14 @@ for kt in `$SSH -Q key-plain | grep -v sk- | \
        file="${dnsname}_openssh"
        # Make good fingerprints
        $SSHKEYGEN -r ${dnsname} -f ${SRC}/${file}.pub
-       $SSHKEYGEN -r ${dnsname}-sha1 -f ${SRC}/${file}.pub | awk '$5=="1"'
-       $SSHKEYGEN -r ${dnsname}-sha256 -f ${SRC}/${file}.pub | awk '$5=="2"'
+       $SSHKEYGEN -r ${dnsname}-sha1 -f ${SRC}/${file}.pub -Ohashalg=sha1
+       $SSHKEYGEN -r ${dnsname}-sha256 -f ${SRC}/${file}.pub -Ohashalg=sha256
        # Make bad fingerprints.
        # For the name with both types we only want the sha1 to be bad.
-       $SSHKEYGEN -r ${dnsname}-bad -f ${SRC}/${file}.pub | awk '$5=="1"' | tr f e
-       $SSHKEYGEN -r ${dnsname}-bad -f ${SRC}/${file}.pub | awk '$5=="2"'
-       $SSHKEYGEN -r ${dnsname}-sha1-bad -f ${SRC}/${file}.pub | awk '$5=="1"' | tr f e
-       $SSHKEYGEN -r ${dnsname}-sha256-bad -f ${SRC}/${file}.pub | awk '$5=="2"' | tr f e
+       $SSHKEYGEN -r ${dnsname}-bad -f ${SRC}/${file}.pub -Ohashalg=sha1 | tr f e
+       $SSHKEYGEN -r ${dnsname}-bad -f ${SRC}/${file}.pub -Ohashalg=sha256
+       $SSHKEYGEN -r ${dnsname}-sha1-bad -f ${SRC}/${file}.pub -Ohashalg=sha1 | tr f e
+       $SSHKEYGEN -r ${dnsname}-sha256-bad -f ${SRC}/${file}.pub -Ohashalg=sha256 | tr f e
 done | sort -n -k4,5 > $OBJ/sshfp-connect.zone
 
 # Check that the required DNS entries exist.