pki: Add a ssh_key_cmp() function.

This commit is contained in:
Andreas Schneider
2011-09-18 22:04:03 +02:00
parent e799c0ce7d
commit 2c04994443
7 changed files with 209 additions and 0 deletions

View File

@@ -517,6 +517,9 @@ static void torture_pki_duplicate_key_rsa(void **state)
assert_string_equal(b64_key, b64_key_gen);
rc = ssh_key_cmp(privkey, privkey_dup, SSH_KEY_CMP_PRIVATE);
assert_true(rc == 0);
ssh_key_free(pubkey);
ssh_key_free(privkey);
ssh_key_free(privkey_dup);
@@ -560,6 +563,9 @@ static void torture_pki_duplicate_key_dsa(void **state)
assert_string_equal(b64_key, b64_key_gen);
rc = ssh_key_cmp(privkey, privkey_dup, SSH_KEY_CMP_PRIVATE);
assert_true(rc == 0);
ssh_key_free(pubkey);
ssh_key_free(privkey);
ssh_key_free(privkey_dup);