diff options
Diffstat (limited to 'tests/unittests/torture_pki.c')
-rw-r--r-- | tests/unittests/torture_pki.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/unittests/torture_pki.c b/tests/unittests/torture_pki.c index bd2c942f..a99f2084 100644 --- a/tests/unittests/torture_pki.c +++ b/tests/unittests/torture_pki.c @@ -350,6 +350,24 @@ static void torture_pki_import_privkey_base64_passphrase(void **state) { assert_true(rc == -1); #endif + /* same for ED25519 */ + + rc = ssh_pki_import_privkey_base64(torture_get_testkey(SSH_KEYTYPE_ED25519, 0, 1), + passphrase, + NULL, + NULL, + &key); + assert_true(rc == 0); + ssh_key_free(key); + + /* test if it returns -1 if passphrase is wrong */ + rc = ssh_pki_import_privkey_base64(torture_get_testkey(SSH_KEYTYPE_ED25519, 0, 1), + "wrong passphrase !!", + NULL, + NULL, + &key); + assert_true(rc == -1); + } static void torture_pki_import_privkey_base64_ed25519(void **state){ |