summaryrefslogtreecommitdiff
path: root/regress/usr.bin
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@cvs.openbsd.org>2021-07-18 23:10:11 +0000
committerDarren Tucker <dtucker@cvs.openbsd.org>2021-07-18 23:10:11 +0000
commit648a2fec7652f386596bda9c24b7c75e0b82a300 (patch)
tree8ea2e8c30a13daacca6b6890779a23226964bc5e /regress/usr.bin
parent80bc71e0bede35da2c323c404546df0b32043bd4 (diff)
Add test for ssh-keygen printing of SSHFP records.
Diffstat (limited to 'regress/usr.bin')
-rw-r--r--regress/usr.bin/ssh/Makefile3
-rw-r--r--regress/usr.bin/ssh/keygen-sshfp.sh15
2 files changed, 17 insertions, 1 deletions
diff --git a/regress/usr.bin/ssh/Makefile b/regress/usr.bin/ssh/Makefile
index 23e5c46503c..3dea807e76e 100644
--- a/regress/usr.bin/ssh/Makefile
+++ b/regress/usr.bin/ssh/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.110 2020/12/22 06:03:36 djm Exp $
+# $OpenBSD: Makefile,v 1.111 2021/07/18 23:10:10 dtucker Exp $
.ifndef SKIP_UNIT
SUBDIR= unittests
@@ -37,6 +37,7 @@ LTESTS= connect \
keygen-change \
keygen-convert \
keygen-moduli \
+ keygen-sshfp \
key-options \
scp \
scp-uri \
diff --git a/regress/usr.bin/ssh/keygen-sshfp.sh b/regress/usr.bin/ssh/keygen-sshfp.sh
new file mode 100644
index 00000000000..2fbfee4fa76
--- /dev/null
+++ b/regress/usr.bin/ssh/keygen-sshfp.sh
@@ -0,0 +1,15 @@
+# $OpenBSD: keygen-sshfp.sh,v 1.1 2021/07/18 23:10:10 dtucker Exp $
+# Placed in the Public Domain.
+
+tid="keygen-sshfp"
+
+trace "keygen fingerprints"
+fp=`${SSHKEYGEN} -r test -f ${SRC}/rsa_openssh.pub | awk '$5=="1"{print $6}'`
+if [ "$fp" != "99c79cc09f5f81069cc017cdf9552cfc94b3b929" ]; then
+ fail "keygen fingerprint sha1"
+fi
+fp=`${SSHKEYGEN} -r test -f ${SRC}/rsa_openssh.pub | awk '$5=="2"{print $6}'`
+if [ "$fp" != \
+ "e30d6b9eb7a4de495324e4d5870b8220577993ea6af417e8e4a4f1c5bf01a9b6" ]; then
+ fail "keygen fingerprint sha256"
+fi