summaryrefslogtreecommitdiff
path: root/regress/unittests/sshkey/test_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'regress/unittests/sshkey/test_file.c')
-rw-r--r--regress/unittests/sshkey/test_file.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/regress/unittests/sshkey/test_file.c b/regress/unittests/sshkey/test_file.c
index fa95212bf..c8a236937 100644
--- a/regress/unittests/sshkey/test_file.c
+++ b/regress/unittests/sshkey/test_file.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: test_file.c,v 1.3 2015/03/04 23:22:35 djm Exp $ */ 1/* $OpenBSD: test_file.c,v 1.4 2015/07/07 14:53:30 markus Exp $ */
2/* 2/*
3 * Regress test for sshkey.h key management API 3 * Regress test for sshkey.h key management API
4 * 4 *
@@ -83,7 +83,7 @@ sshkey_file_tests(void)
83 83
84 TEST_START("RSA1 key hex fingerprint"); 84 TEST_START("RSA1 key hex fingerprint");
85 buf = load_text_file("rsa1_1.fp"); 85 buf = load_text_file("rsa1_1.fp");
86 cp = sshkey_fingerprint(k1, SSH_DIGEST_MD5, SSH_FP_HEX); 86 cp = sshkey_fingerprint(k1, SSH_DIGEST_SHA256, SSH_FP_BASE64);
87 ASSERT_PTR_NE(cp, NULL); 87 ASSERT_PTR_NE(cp, NULL);
88 ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf)); 88 ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
89 sshbuf_free(buf); 89 sshbuf_free(buf);
@@ -167,7 +167,7 @@ sshkey_file_tests(void)
167 167
168 TEST_START("RSA key hex fingerprint"); 168 TEST_START("RSA key hex fingerprint");
169 buf = load_text_file("rsa_1.fp"); 169 buf = load_text_file("rsa_1.fp");
170 cp = sshkey_fingerprint(k1, SSH_DIGEST_MD5, SSH_FP_HEX); 170 cp = sshkey_fingerprint(k1, SSH_DIGEST_SHA256, SSH_FP_BASE64);
171 ASSERT_PTR_NE(cp, NULL); 171 ASSERT_PTR_NE(cp, NULL);
172 ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf)); 172 ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
173 sshbuf_free(buf); 173 sshbuf_free(buf);
@@ -176,7 +176,7 @@ sshkey_file_tests(void)
176 176
177 TEST_START("RSA cert hex fingerprint"); 177 TEST_START("RSA cert hex fingerprint");
178 buf = load_text_file("rsa_1-cert.fp"); 178 buf = load_text_file("rsa_1-cert.fp");
179 cp = sshkey_fingerprint(k2, SSH_DIGEST_MD5, SSH_FP_HEX); 179 cp = sshkey_fingerprint(k2, SSH_DIGEST_SHA256, SSH_FP_BASE64);
180 ASSERT_PTR_NE(cp, NULL); 180 ASSERT_PTR_NE(cp, NULL);
181 ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf)); 181 ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
182 sshbuf_free(buf); 182 sshbuf_free(buf);
@@ -260,7 +260,7 @@ sshkey_file_tests(void)
260 260
261 TEST_START("DSA key hex fingerprint"); 261 TEST_START("DSA key hex fingerprint");
262 buf = load_text_file("dsa_1.fp"); 262 buf = load_text_file("dsa_1.fp");
263 cp = sshkey_fingerprint(k1, SSH_DIGEST_MD5, SSH_FP_HEX); 263 cp = sshkey_fingerprint(k1, SSH_DIGEST_SHA256, SSH_FP_BASE64);
264 ASSERT_PTR_NE(cp, NULL); 264 ASSERT_PTR_NE(cp, NULL);
265 ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf)); 265 ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
266 sshbuf_free(buf); 266 sshbuf_free(buf);
@@ -269,7 +269,7 @@ sshkey_file_tests(void)
269 269
270 TEST_START("DSA cert hex fingerprint"); 270 TEST_START("DSA cert hex fingerprint");
271 buf = load_text_file("dsa_1-cert.fp"); 271 buf = load_text_file("dsa_1-cert.fp");
272 cp = sshkey_fingerprint(k2, SSH_DIGEST_MD5, SSH_FP_HEX); 272 cp = sshkey_fingerprint(k2, SSH_DIGEST_SHA256, SSH_FP_BASE64);
273 ASSERT_PTR_NE(cp, NULL); 273 ASSERT_PTR_NE(cp, NULL);
274 ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf)); 274 ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
275 sshbuf_free(buf); 275 sshbuf_free(buf);
@@ -360,7 +360,7 @@ sshkey_file_tests(void)
360 360
361 TEST_START("ECDSA key hex fingerprint"); 361 TEST_START("ECDSA key hex fingerprint");
362 buf = load_text_file("ecdsa_1.fp"); 362 buf = load_text_file("ecdsa_1.fp");
363 cp = sshkey_fingerprint(k1, SSH_DIGEST_MD5, SSH_FP_HEX); 363 cp = sshkey_fingerprint(k1, SSH_DIGEST_SHA256, SSH_FP_BASE64);
364 ASSERT_PTR_NE(cp, NULL); 364 ASSERT_PTR_NE(cp, NULL);
365 ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf)); 365 ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
366 sshbuf_free(buf); 366 sshbuf_free(buf);
@@ -369,7 +369,7 @@ sshkey_file_tests(void)
369 369
370 TEST_START("ECDSA cert hex fingerprint"); 370 TEST_START("ECDSA cert hex fingerprint");
371 buf = load_text_file("ecdsa_1-cert.fp"); 371 buf = load_text_file("ecdsa_1-cert.fp");
372 cp = sshkey_fingerprint(k2, SSH_DIGEST_MD5, SSH_FP_HEX); 372 cp = sshkey_fingerprint(k2, SSH_DIGEST_SHA256, SSH_FP_BASE64);
373 ASSERT_PTR_NE(cp, NULL); 373 ASSERT_PTR_NE(cp, NULL);
374 ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf)); 374 ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
375 sshbuf_free(buf); 375 sshbuf_free(buf);
@@ -427,7 +427,7 @@ sshkey_file_tests(void)
427 427
428 TEST_START("Ed25519 key hex fingerprint"); 428 TEST_START("Ed25519 key hex fingerprint");
429 buf = load_text_file("ed25519_1.fp"); 429 buf = load_text_file("ed25519_1.fp");
430 cp = sshkey_fingerprint(k1, SSH_DIGEST_MD5, SSH_FP_HEX); 430 cp = sshkey_fingerprint(k1, SSH_DIGEST_SHA256, SSH_FP_BASE64);
431 ASSERT_PTR_NE(cp, NULL); 431 ASSERT_PTR_NE(cp, NULL);
432 ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf)); 432 ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
433 sshbuf_free(buf); 433 sshbuf_free(buf);
@@ -436,7 +436,7 @@ sshkey_file_tests(void)
436 436
437 TEST_START("Ed25519 cert hex fingerprint"); 437 TEST_START("Ed25519 cert hex fingerprint");
438 buf = load_text_file("ed25519_1-cert.fp"); 438 buf = load_text_file("ed25519_1-cert.fp");
439 cp = sshkey_fingerprint(k2, SSH_DIGEST_MD5, SSH_FP_HEX); 439 cp = sshkey_fingerprint(k2, SSH_DIGEST_SHA256, SSH_FP_BASE64);
440 ASSERT_PTR_NE(cp, NULL); 440 ASSERT_PTR_NE(cp, NULL);
441 ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf)); 441 ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf));
442 sshbuf_free(buf); 442 sshbuf_free(buf);