diff options
Diffstat (limited to 'regress/usr.bin/ssh/unittests')
15 files changed, 30 insertions, 29 deletions
diff --git a/regress/usr.bin/ssh/unittests/sshkey/test_file.c b/regress/usr.bin/ssh/unittests/sshkey/test_file.c index 19056b52ae8..a608fd1c241 100644 --- a/regress/usr.bin/ssh/unittests/sshkey/test_file.c +++ b/regress/usr.bin/ssh/unittests/sshkey/test_file.c @@ -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); diff --git a/regress/usr.bin/ssh/unittests/sshkey/testdata/dsa_1-cert.fp b/regress/usr.bin/ssh/unittests/sshkey/testdata/dsa_1-cert.fp index 56ee1f89b9e..b26145b24d5 100644 --- a/regress/usr.bin/ssh/unittests/sshkey/testdata/dsa_1-cert.fp +++ b/regress/usr.bin/ssh/unittests/sshkey/testdata/dsa_1-cert.fp @@ -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 diff --git a/regress/usr.bin/ssh/unittests/sshkey/testdata/dsa_1.fp b/regress/usr.bin/ssh/unittests/sshkey/testdata/dsa_1.fp index 56ee1f89b9e..b26145b24d5 100644 --- a/regress/usr.bin/ssh/unittests/sshkey/testdata/dsa_1.fp +++ b/regress/usr.bin/ssh/unittests/sshkey/testdata/dsa_1.fp @@ -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 diff --git a/regress/usr.bin/ssh/unittests/sshkey/testdata/dsa_2.fp b/regress/usr.bin/ssh/unittests/sshkey/testdata/dsa_2.fp index ba9de82a8a8..8226574039d 100644 --- a/regress/usr.bin/ssh/unittests/sshkey/testdata/dsa_2.fp +++ b/regress/usr.bin/ssh/unittests/sshkey/testdata/dsa_2.fp @@ -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 diff --git a/regress/usr.bin/ssh/unittests/sshkey/testdata/ecdsa_1-cert.fp b/regress/usr.bin/ssh/unittests/sshkey/testdata/ecdsa_1-cert.fp index a56dbc8d011..c3d747affb6 100644 --- a/regress/usr.bin/ssh/unittests/sshkey/testdata/ecdsa_1-cert.fp +++ b/regress/usr.bin/ssh/unittests/sshkey/testdata/ecdsa_1-cert.fp @@ -1 +1 @@ -f7:be:4c:02:65:ed:4c:11:af:ab:a8:dd:0a:92:e7:44 +MD5:f7:be:4c:02:65:ed:4c:11:af:ab:a8:dd:0a:92:e7:44 diff --git a/regress/usr.bin/ssh/unittests/sshkey/testdata/ecdsa_1.fp b/regress/usr.bin/ssh/unittests/sshkey/testdata/ecdsa_1.fp index a56dbc8d011..c3d747affb6 100644 --- a/regress/usr.bin/ssh/unittests/sshkey/testdata/ecdsa_1.fp +++ b/regress/usr.bin/ssh/unittests/sshkey/testdata/ecdsa_1.fp @@ -1 +1 @@ -f7:be:4c:02:65:ed:4c:11:af:ab:a8:dd:0a:92:e7:44 +MD5:f7:be:4c:02:65:ed:4c:11:af:ab:a8:dd:0a:92:e7:44 diff --git a/regress/usr.bin/ssh/unittests/sshkey/testdata/ecdsa_2.fp b/regress/usr.bin/ssh/unittests/sshkey/testdata/ecdsa_2.fp index eb4bbdf0304..fe7526b9290 100644 --- a/regress/usr.bin/ssh/unittests/sshkey/testdata/ecdsa_2.fp +++ b/regress/usr.bin/ssh/unittests/sshkey/testdata/ecdsa_2.fp @@ -1 +1 @@ -51:bd:ff:2b:6d:26:9b:90:f9:e1:4a:ca:a0:29:8e:70 +MD5:51:bd:ff:2b:6d:26:9b:90:f9:e1:4a:ca:a0:29:8e:70 diff --git a/regress/usr.bin/ssh/unittests/sshkey/testdata/ed25519_1-cert.fp b/regress/usr.bin/ssh/unittests/sshkey/testdata/ed25519_1-cert.fp index e6d23d0b84c..fbde87af041 100644 --- a/regress/usr.bin/ssh/unittests/sshkey/testdata/ed25519_1-cert.fp +++ b/regress/usr.bin/ssh/unittests/sshkey/testdata/ed25519_1-cert.fp @@ -1 +1 @@ -19:08:8e:7e:4d:e5:de:86:2a:09:47:65:eb:0a:51:2f +MD5:19:08:8e:7e:4d:e5:de:86:2a:09:47:65:eb:0a:51:2f diff --git a/regress/usr.bin/ssh/unittests/sshkey/testdata/ed25519_1.fp b/regress/usr.bin/ssh/unittests/sshkey/testdata/ed25519_1.fp index e6d23d0b84c..fbde87af041 100644 --- a/regress/usr.bin/ssh/unittests/sshkey/testdata/ed25519_1.fp +++ b/regress/usr.bin/ssh/unittests/sshkey/testdata/ed25519_1.fp @@ -1 +1 @@ -19:08:8e:7e:4d:e5:de:86:2a:09:47:65:eb:0a:51:2f +MD5:19:08:8e:7e:4d:e5:de:86:2a:09:47:65:eb:0a:51:2f diff --git a/regress/usr.bin/ssh/unittests/sshkey/testdata/ed25519_2.fp b/regress/usr.bin/ssh/unittests/sshkey/testdata/ed25519_2.fp index 02c684f36af..ec1cdbb94d9 100644 --- a/regress/usr.bin/ssh/unittests/sshkey/testdata/ed25519_2.fp +++ b/regress/usr.bin/ssh/unittests/sshkey/testdata/ed25519_2.fp @@ -1 +1 @@ -5c:c9:ae:a3:0c:aa:28:29:b8:fc:7c:64:ba:6e:e9:c9 +MD5:5c:c9:ae:a3:0c:aa:28:29:b8:fc:7c:64:ba:6e:e9:c9 diff --git a/regress/usr.bin/ssh/unittests/sshkey/testdata/rsa1_1.fp b/regress/usr.bin/ssh/unittests/sshkey/testdata/rsa1_1.fp index 782ece0dbec..2e1068c649e 100644 --- a/regress/usr.bin/ssh/unittests/sshkey/testdata/rsa1_1.fp +++ b/regress/usr.bin/ssh/unittests/sshkey/testdata/rsa1_1.fp @@ -1 +1 @@ -a8:82:9b:98:c5:e6:19:d6:83:39:9f:4d:3a:8f:7c:80 +MD5:a8:82:9b:98:c5:e6:19:d6:83:39:9f:4d:3a:8f:7c:80 diff --git a/regress/usr.bin/ssh/unittests/sshkey/testdata/rsa1_2.fp b/regress/usr.bin/ssh/unittests/sshkey/testdata/rsa1_2.fp index c3325371d56..cd0039306f8 100644 --- a/regress/usr.bin/ssh/unittests/sshkey/testdata/rsa1_2.fp +++ b/regress/usr.bin/ssh/unittests/sshkey/testdata/rsa1_2.fp @@ -1 +1 @@ -c0:83:1c:97:5f:32:77:7e:e4:e3:e9:29:b9:eb:76:9c +MD5:c0:83:1c:97:5f:32:77:7e:e4:e3:e9:29:b9:eb:76:9c diff --git a/regress/usr.bin/ssh/unittests/sshkey/testdata/rsa_1-cert.fp b/regress/usr.bin/ssh/unittests/sshkey/testdata/rsa_1-cert.fp index bf9c2e3626f..1cf780dd952 100644 --- a/regress/usr.bin/ssh/unittests/sshkey/testdata/rsa_1-cert.fp +++ b/regress/usr.bin/ssh/unittests/sshkey/testdata/rsa_1-cert.fp @@ -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 diff --git a/regress/usr.bin/ssh/unittests/sshkey/testdata/rsa_1.fp b/regress/usr.bin/ssh/unittests/sshkey/testdata/rsa_1.fp index bf9c2e3626f..1cf780dd952 100644 --- a/regress/usr.bin/ssh/unittests/sshkey/testdata/rsa_1.fp +++ b/regress/usr.bin/ssh/unittests/sshkey/testdata/rsa_1.fp @@ -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 diff --git a/regress/usr.bin/ssh/unittests/sshkey/testdata/rsa_2.fp b/regress/usr.bin/ssh/unittests/sshkey/testdata/rsa_2.fp index 53939f413db..8d43676105d 100644 --- a/regress/usr.bin/ssh/unittests/sshkey/testdata/rsa_2.fp +++ b/regress/usr.bin/ssh/unittests/sshkey/testdata/rsa_2.fp @@ -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 |