adjust for new SHA256 key fingerprints and slightly-different MD5 hex
authordjm <djm@openbsd.org>
Mon, 22 Dec 2014 02:15:52 +0000 (02:15 +0000)
committerdjm <djm@openbsd.org>
Mon, 22 Dec 2014 02:15:52 +0000 (02:15 +0000)
fingerprint format

18 files changed:
regress/usr.bin/ssh/Makefile
regress/usr.bin/ssh/t11.ok [new file with mode: 0644]
regress/usr.bin/ssh/t4.ok
regress/usr.bin/ssh/unittests/sshkey/test_file.c
regress/usr.bin/ssh/unittests/sshkey/testdata/dsa_1-cert.fp
regress/usr.bin/ssh/unittests/sshkey/testdata/dsa_1.fp
regress/usr.bin/ssh/unittests/sshkey/testdata/dsa_2.fp
regress/usr.bin/ssh/unittests/sshkey/testdata/ecdsa_1-cert.fp
regress/usr.bin/ssh/unittests/sshkey/testdata/ecdsa_1.fp
regress/usr.bin/ssh/unittests/sshkey/testdata/ecdsa_2.fp
regress/usr.bin/ssh/unittests/sshkey/testdata/ed25519_1-cert.fp
regress/usr.bin/ssh/unittests/sshkey/testdata/ed25519_1.fp
regress/usr.bin/ssh/unittests/sshkey/testdata/ed25519_2.fp
regress/usr.bin/ssh/unittests/sshkey/testdata/rsa1_1.fp
regress/usr.bin/ssh/unittests/sshkey/testdata/rsa1_2.fp
regress/usr.bin/ssh/unittests/sshkey/testdata/rsa_1-cert.fp
regress/usr.bin/ssh/unittests/sshkey/testdata/rsa_1.fp
regress/usr.bin/ssh/unittests/sshkey/testdata/rsa_2.fp

index 58faf64..b1790b3 100644 (file)
@@ -1,7 +1,7 @@
-#      $OpenBSD: Makefile,v 1.70 2014/06/24 01:14:17 djm Exp $
+#      $OpenBSD: Makefile,v 1.71 2014/12/22 02:15:52 djm Exp $
 
 REGRESS_FAIL_EARLY= yes
-REGRESS_TARGETS=       unit t1 t2 t3 t4 t5 t6 t7 t8 t9
+REGRESS_TARGETS=       unit t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11
 
 CLEANFILES+=   t2.out t6.out1 t6.out2 t7.out t7.out.pub copy.1 copy.2 \
                t8.out t8.out.pub t9.out t9.out.pub
@@ -108,7 +108,7 @@ t3:
                diff - ${.CURDIR}/rsa_openssh.pub
 
 t4:
-       ssh-keygen -lf ${.CURDIR}/rsa_openssh.pub |\
+       ssh-keygen -E md5 -lf ${.CURDIR}/rsa_openssh.pub |\
                awk '{print $$2}' | diff - ${.CURDIR}/t4.ok
 
 t5:
@@ -149,6 +149,10 @@ t10: t10.out
        ssh-keygen -lf t10.out > /dev/null
        ssh-keygen -Bf t10.out > /dev/null
 
+t11:
+       ssh-keygen -E sha256 -lf ${.CURDIR}/rsa_openssh.pub |\
+               awk '{print $$2}' | diff - ${.CURDIR}/t11.ok
+
 modpipe: modpipe.c
 
 t-integrity: modpipe
diff --git a/regress/usr.bin/ssh/t11.ok b/regress/usr.bin/ssh/t11.ok
new file mode 100644 (file)
index 0000000..1925bb4
--- /dev/null
@@ -0,0 +1 @@
+SHA256:4w1rnrek3klTJOTVhwuCIFd5k+pq9Bfo5KTxxb8BqbY
index 8c4942b..4631ea8 100644 (file)
@@ -1 +1 @@
-3b:dd:44:e9:49:18:84:95:f1:e7:33:6b:9d:93:b1:36
+MD5:3b:dd:44:e9:49:18:84:95:f1:e7:33:6b:9d:93:b1:36
index 19056b5..a608fd1 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: test_file.c,v 1.1 2014/06/24 01:14:18 djm Exp $ */
+/*     $OpenBSD: test_file.c,v 1.2 2014/12/22 02:15:52 djm Exp $ */
 /*
  * Regress test for sshkey.h key management API
  *
@@ -27,6 +27,7 @@
 #include "authfile.h"
 #include "sshkey.h"
 #include "sshbuf.h"
+#include "digest.h"
 
 #include "common.h"
 
@@ -75,7 +76,7 @@ sshkey_file_tests(void)
 
        TEST_START("RSA1 key hex fingerprint");
        buf = load_text_file("rsa1_1.fp");
-       cp = sshkey_fingerprint(k1, SSH_FP_MD5, SSH_FP_HEX);
+       cp = sshkey_fingerprint(k1, SSH_DIGEST_MD5, SSH_FP_HEX);
        ASSERT_PTR_NE(cp, NULL);
        ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
        sshbuf_free(buf);
@@ -84,7 +85,7 @@ sshkey_file_tests(void)
 
        TEST_START("RSA1 key bubblebabble fingerprint");
        buf = load_text_file("rsa1_1.fp.bb");
-       cp = sshkey_fingerprint(k1, SSH_FP_SHA1, SSH_FP_BUBBLEBABBLE);
+       cp = sshkey_fingerprint(k1, SSH_DIGEST_SHA1, SSH_FP_BUBBLEBABBLE);
        ASSERT_PTR_NE(cp, NULL);
        ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
        sshbuf_free(buf);
@@ -158,7 +159,7 @@ sshkey_file_tests(void)
 
        TEST_START("RSA key hex fingerprint");
        buf = load_text_file("rsa_1.fp");
-       cp = sshkey_fingerprint(k1, SSH_FP_MD5, SSH_FP_HEX);
+       cp = sshkey_fingerprint(k1, SSH_DIGEST_MD5, SSH_FP_HEX);
        ASSERT_PTR_NE(cp, NULL);
        ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
        sshbuf_free(buf);
@@ -167,7 +168,7 @@ sshkey_file_tests(void)
 
        TEST_START("RSA cert hex fingerprint");
        buf = load_text_file("rsa_1-cert.fp");
-       cp = sshkey_fingerprint(k2, SSH_FP_MD5, SSH_FP_HEX);
+       cp = sshkey_fingerprint(k2, SSH_DIGEST_MD5, SSH_FP_HEX);
        ASSERT_PTR_NE(cp, NULL);
        ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
        sshbuf_free(buf);
@@ -177,7 +178,7 @@ sshkey_file_tests(void)
 
        TEST_START("RSA key bubblebabble fingerprint");
        buf = load_text_file("rsa_1.fp.bb");
-       cp = sshkey_fingerprint(k1, SSH_FP_SHA1, SSH_FP_BUBBLEBABBLE);
+       cp = sshkey_fingerprint(k1, SSH_DIGEST_SHA1, SSH_FP_BUBBLEBABBLE);
        ASSERT_PTR_NE(cp, NULL);
        ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
        sshbuf_free(buf);
@@ -251,7 +252,7 @@ sshkey_file_tests(void)
 
        TEST_START("DSA key hex fingerprint");
        buf = load_text_file("dsa_1.fp");
-       cp = sshkey_fingerprint(k1, SSH_FP_MD5, SSH_FP_HEX);
+       cp = sshkey_fingerprint(k1, SSH_DIGEST_MD5, SSH_FP_HEX);
        ASSERT_PTR_NE(cp, NULL);
        ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
        sshbuf_free(buf);
@@ -260,7 +261,7 @@ sshkey_file_tests(void)
 
        TEST_START("DSA cert hex fingerprint");
        buf = load_text_file("dsa_1-cert.fp");
-       cp = sshkey_fingerprint(k2, SSH_FP_MD5, SSH_FP_HEX);
+       cp = sshkey_fingerprint(k2, SSH_DIGEST_MD5, SSH_FP_HEX);
        ASSERT_PTR_NE(cp, NULL);
        ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
        sshbuf_free(buf);
@@ -270,7 +271,7 @@ sshkey_file_tests(void)
 
        TEST_START("DSA key bubblebabble fingerprint");
        buf = load_text_file("dsa_1.fp.bb");
-       cp = sshkey_fingerprint(k1, SSH_FP_SHA1, SSH_FP_BUBBLEBABBLE);
+       cp = sshkey_fingerprint(k1, SSH_DIGEST_SHA1, SSH_FP_BUBBLEBABBLE);
        ASSERT_PTR_NE(cp, NULL);
        ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
        sshbuf_free(buf);
@@ -350,7 +351,7 @@ sshkey_file_tests(void)
 
        TEST_START("ECDSA key hex fingerprint");
        buf = load_text_file("ecdsa_1.fp");
-       cp = sshkey_fingerprint(k1, SSH_FP_MD5, SSH_FP_HEX);
+       cp = sshkey_fingerprint(k1, SSH_DIGEST_MD5, SSH_FP_HEX);
        ASSERT_PTR_NE(cp, NULL);
        ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
        sshbuf_free(buf);
@@ -359,7 +360,7 @@ sshkey_file_tests(void)
 
        TEST_START("ECDSA cert hex fingerprint");
        buf = load_text_file("ecdsa_1-cert.fp");
-       cp = sshkey_fingerprint(k2, SSH_FP_MD5, SSH_FP_HEX);
+       cp = sshkey_fingerprint(k2, SSH_DIGEST_MD5, SSH_FP_HEX);
        ASSERT_PTR_NE(cp, NULL);
        ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
        sshbuf_free(buf);
@@ -369,7 +370,7 @@ sshkey_file_tests(void)
 
        TEST_START("ECDSA key bubblebabble fingerprint");
        buf = load_text_file("ecdsa_1.fp.bb");
-       cp = sshkey_fingerprint(k1, SSH_FP_SHA1, SSH_FP_BUBBLEBABBLE);
+       cp = sshkey_fingerprint(k1, SSH_DIGEST_SHA1, SSH_FP_BUBBLEBABBLE);
        ASSERT_PTR_NE(cp, NULL);
        ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
        sshbuf_free(buf);
@@ -416,7 +417,7 @@ sshkey_file_tests(void)
 
        TEST_START("Ed25519 key hex fingerprint");
        buf = load_text_file("ed25519_1.fp");
-       cp = sshkey_fingerprint(k1, SSH_FP_MD5, SSH_FP_HEX);
+       cp = sshkey_fingerprint(k1, SSH_DIGEST_MD5, SSH_FP_HEX);
        ASSERT_PTR_NE(cp, NULL);
        ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
        sshbuf_free(buf);
@@ -425,7 +426,7 @@ sshkey_file_tests(void)
 
        TEST_START("Ed25519 cert hex fingerprint");
        buf = load_text_file("ed25519_1-cert.fp");
-       cp = sshkey_fingerprint(k2, SSH_FP_MD5, SSH_FP_HEX);
+       cp = sshkey_fingerprint(k2, SSH_DIGEST_MD5, SSH_FP_HEX);
        ASSERT_PTR_NE(cp, NULL);
        ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
        sshbuf_free(buf);
@@ -435,7 +436,7 @@ sshkey_file_tests(void)
 
        TEST_START("Ed25519 key bubblebabble fingerprint");
        buf = load_text_file("ed25519_1.fp.bb");
-       cp = sshkey_fingerprint(k1, SSH_FP_SHA1, SSH_FP_BUBBLEBABBLE);
+       cp = sshkey_fingerprint(k1, SSH_DIGEST_SHA1, SSH_FP_BUBBLEBABBLE);
        ASSERT_PTR_NE(cp, NULL);
        ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
        sshbuf_free(buf);
index 56ee1f8..b26145b 100644 (file)
@@ -1 +1 @@
-5a:4a:41:8c:4e:fa:4c:52:19:f9:39:49:31:fb:fd:74
+MD5:5a:4a:41:8c:4e:fa:4c:52:19:f9:39:49:31:fb:fd:74
index ba9de82..8226574 100644 (file)
@@ -1 +1 @@
-72:5f:50:6b:e5:64:c5:62:21:92:3f:8b:10:9b:9f:1a
+MD5:72:5f:50:6b:e5:64:c5:62:21:92:3f:8b:10:9b:9f:1a
index bf9c2e3..1cf780d 100644 (file)
@@ -1 +1 @@
-be:27:4c:16:27:f5:04:03:62:a8:b7:91:df:a5:b1:3b
+MD5:be:27:4c:16:27:f5:04:03:62:a8:b7:91:df:a5:b1:3b
index 53939f4..8d43676 100644 (file)
@@ -1 +1 @@
-fb:8f:7b:26:3d:42:40:ef:ed:f1:ed:ee:66:9e:ba:b0
+MD5:fb:8f:7b:26:3d:42:40:ef:ed:f1:ed:ee:66:9e:ba:b0