• Home
  • Raw
  • Download

Lines Matching refs:k2

45 	struct sshkey *k1, *k2;  in sshkey_file_tests()  local
68 (const char *)sshbuf_ptr(pw), &k2, NULL), 0); in sshkey_file_tests()
70 ASSERT_PTR_NE(k2, NULL); in sshkey_file_tests()
71 ASSERT_INT_EQ(sshkey_equal(k1, k2), 1); in sshkey_file_tests()
72 sshkey_free(k2); in sshkey_file_tests()
76 ASSERT_INT_EQ(sshkey_load_public(test_data_file("rsa1_1.pub"), &k2, in sshkey_file_tests()
78 ASSERT_PTR_NE(k2, NULL); in sshkey_file_tests()
79 ASSERT_INT_EQ(sshkey_equal(k1, k2), 1); in sshkey_file_tests()
80 sshkey_free(k2); in sshkey_file_tests()
123 (const char *)sshbuf_ptr(pw), &k2, NULL), 0); in sshkey_file_tests()
125 ASSERT_PTR_NE(k2, NULL); in sshkey_file_tests()
126 ASSERT_INT_EQ(sshkey_equal(k1, k2), 1); in sshkey_file_tests()
127 sshkey_free(k2); in sshkey_file_tests()
132 ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k2, NULL), 0); in sshkey_file_tests()
134 ASSERT_PTR_NE(k2, NULL); in sshkey_file_tests()
135 ASSERT_INT_EQ(sshkey_equal(k1, k2), 1); in sshkey_file_tests()
136 sshkey_free(k2); in sshkey_file_tests()
142 (const char *)sshbuf_ptr(pw), &k2, NULL), 0); in sshkey_file_tests()
144 ASSERT_PTR_NE(k2, NULL); in sshkey_file_tests()
145 ASSERT_INT_EQ(sshkey_equal(k1, k2), 1); in sshkey_file_tests()
146 sshkey_free(k2); in sshkey_file_tests()
150 ASSERT_INT_EQ(sshkey_load_public(test_data_file("rsa_1.pub"), &k2, in sshkey_file_tests()
152 ASSERT_PTR_NE(k2, NULL); in sshkey_file_tests()
153 ASSERT_INT_EQ(sshkey_equal(k1, k2), 1); in sshkey_file_tests()
154 sshkey_free(k2); in sshkey_file_tests()
158 ASSERT_INT_EQ(sshkey_load_cert(test_data_file("rsa_1"), &k2), 0); in sshkey_file_tests()
159 ASSERT_PTR_NE(k2, NULL); in sshkey_file_tests()
160 ASSERT_INT_EQ(k2->type, KEY_RSA_CERT); in sshkey_file_tests()
161 ASSERT_INT_EQ(sshkey_equal(k1, k2), 0); in sshkey_file_tests()
162 ASSERT_INT_EQ(sshkey_equal_public(k1, k2), 1); in sshkey_file_tests()
176 cp = sshkey_fingerprint(k2, SSH_DIGEST_SHA256, SSH_FP_BASE64); in sshkey_file_tests()
181 sshkey_free(k2); in sshkey_file_tests()
214 (const char *)sshbuf_ptr(pw), &k2, NULL), 0); in sshkey_file_tests()
216 ASSERT_PTR_NE(k2, NULL); in sshkey_file_tests()
217 ASSERT_INT_EQ(sshkey_equal(k1, k2), 1); in sshkey_file_tests()
218 sshkey_free(k2); in sshkey_file_tests()
223 ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k2, NULL), 0); in sshkey_file_tests()
225 ASSERT_PTR_NE(k2, NULL); in sshkey_file_tests()
226 ASSERT_INT_EQ(sshkey_equal(k1, k2), 1); in sshkey_file_tests()
227 sshkey_free(k2); in sshkey_file_tests()
233 (const char *)sshbuf_ptr(pw), &k2, NULL), 0); in sshkey_file_tests()
235 ASSERT_PTR_NE(k2, NULL); in sshkey_file_tests()
236 ASSERT_INT_EQ(sshkey_equal(k1, k2), 1); in sshkey_file_tests()
237 sshkey_free(k2); in sshkey_file_tests()
241 ASSERT_INT_EQ(sshkey_load_public(test_data_file("dsa_1.pub"), &k2, in sshkey_file_tests()
243 ASSERT_PTR_NE(k2, NULL); in sshkey_file_tests()
244 ASSERT_INT_EQ(sshkey_equal(k1, k2), 1); in sshkey_file_tests()
245 sshkey_free(k2); in sshkey_file_tests()
249 ASSERT_INT_EQ(sshkey_load_cert(test_data_file("dsa_1"), &k2), 0); in sshkey_file_tests()
250 ASSERT_PTR_NE(k2, NULL); in sshkey_file_tests()
251 ASSERT_INT_EQ(k2->type, KEY_DSA_CERT); in sshkey_file_tests()
252 ASSERT_INT_EQ(sshkey_equal(k1, k2), 0); in sshkey_file_tests()
253 ASSERT_INT_EQ(sshkey_equal_public(k1, k2), 1); in sshkey_file_tests()
267 cp = sshkey_fingerprint(k2, SSH_DIGEST_SHA256, SSH_FP_BASE64); in sshkey_file_tests()
272 sshkey_free(k2); in sshkey_file_tests()
312 (const char *)sshbuf_ptr(pw), &k2, NULL), 0); in sshkey_file_tests()
314 ASSERT_PTR_NE(k2, NULL); in sshkey_file_tests()
315 ASSERT_INT_EQ(sshkey_equal(k1, k2), 1); in sshkey_file_tests()
316 sshkey_free(k2); in sshkey_file_tests()
321 ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k2, NULL), 0); in sshkey_file_tests()
323 ASSERT_PTR_NE(k2, NULL); in sshkey_file_tests()
324 ASSERT_INT_EQ(sshkey_equal(k1, k2), 1); in sshkey_file_tests()
325 sshkey_free(k2); in sshkey_file_tests()
331 (const char *)sshbuf_ptr(pw), &k2, NULL), 0); in sshkey_file_tests()
333 ASSERT_PTR_NE(k2, NULL); in sshkey_file_tests()
334 ASSERT_INT_EQ(sshkey_equal(k1, k2), 1); in sshkey_file_tests()
335 sshkey_free(k2); in sshkey_file_tests()
339 ASSERT_INT_EQ(sshkey_load_public(test_data_file("ecdsa_1.pub"), &k2, in sshkey_file_tests()
341 ASSERT_PTR_NE(k2, NULL); in sshkey_file_tests()
342 ASSERT_INT_EQ(sshkey_equal(k1, k2), 1); in sshkey_file_tests()
343 sshkey_free(k2); in sshkey_file_tests()
347 ASSERT_INT_EQ(sshkey_load_cert(test_data_file("ecdsa_1"), &k2), 0); in sshkey_file_tests()
348 ASSERT_PTR_NE(k2, NULL); in sshkey_file_tests()
349 ASSERT_INT_EQ(k2->type, KEY_ECDSA_CERT); in sshkey_file_tests()
350 ASSERT_INT_EQ(sshkey_equal(k1, k2), 0); in sshkey_file_tests()
351 ASSERT_INT_EQ(sshkey_equal_public(k1, k2), 1); in sshkey_file_tests()
365 cp = sshkey_fingerprint(k2, SSH_DIGEST_SHA256, SSH_FP_BASE64); in sshkey_file_tests()
370 sshkey_free(k2); in sshkey_file_tests()
397 (const char *)sshbuf_ptr(pw), &k2, NULL), 0); in sshkey_file_tests()
399 ASSERT_PTR_NE(k2, NULL); in sshkey_file_tests()
400 ASSERT_INT_EQ(sshkey_equal(k1, k2), 1); in sshkey_file_tests()
401 sshkey_free(k2); in sshkey_file_tests()
405 ASSERT_INT_EQ(sshkey_load_public(test_data_file("ed25519_1.pub"), &k2, in sshkey_file_tests()
407 ASSERT_PTR_NE(k2, NULL); in sshkey_file_tests()
408 ASSERT_INT_EQ(sshkey_equal(k1, k2), 1); in sshkey_file_tests()
409 sshkey_free(k2); in sshkey_file_tests()
413 ASSERT_INT_EQ(sshkey_load_cert(test_data_file("ed25519_1"), &k2), 0); in sshkey_file_tests()
414 ASSERT_PTR_NE(k2, NULL); in sshkey_file_tests()
415 ASSERT_INT_EQ(k2->type, KEY_ED25519_CERT); in sshkey_file_tests()
416 ASSERT_INT_EQ(sshkey_equal(k1, k2), 0); in sshkey_file_tests()
417 ASSERT_INT_EQ(sshkey_equal_public(k1, k2), 1); in sshkey_file_tests()
431 cp = sshkey_fingerprint(k2, SSH_DIGEST_SHA256, SSH_FP_BASE64); in sshkey_file_tests()
436 sshkey_free(k2); in sshkey_file_tests()