mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-07-31 00:03:07 +03:00
tests: Fix torture_pki with libcrypto
This stops asking for a passphrase on commandline. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@ -399,6 +399,7 @@ static void torture_pki_import_privkey_base64_passphrase(void **state) {
|
|||||||
&key);
|
&key);
|
||||||
assert_true(rc == -1);
|
assert_true(rc == -1);
|
||||||
|
|
||||||
|
#ifndef HAVE_LIBCRYPTO
|
||||||
/* test if it returns -1 if passphrase is NULL */
|
/* test if it returns -1 if passphrase is NULL */
|
||||||
/* libcrypto asks for a passphrase, so skip this test */
|
/* libcrypto asks for a passphrase, so skip this test */
|
||||||
rc = ssh_pki_import_privkey_base64(torture_get_testkey(SSH_KEYTYPE_DSS, 0, 1),
|
rc = ssh_pki_import_privkey_base64(torture_get_testkey(SSH_KEYTYPE_DSS, 0, 1),
|
||||||
@ -407,7 +408,8 @@ static void torture_pki_import_privkey_base64_passphrase(void **state) {
|
|||||||
NULL,
|
NULL,
|
||||||
&key);
|
&key);
|
||||||
assert_true(rc == -1);
|
assert_true(rc == -1);
|
||||||
# endif
|
#endif /* HAVE_LIBCRYPTO */
|
||||||
|
#endif /* HAVE_DSA */
|
||||||
/* same for ED25519 */
|
/* same for ED25519 */
|
||||||
rc = ssh_pki_import_privkey_base64(torture_get_testkey(SSH_KEYTYPE_ED25519, 0, 1),
|
rc = ssh_pki_import_privkey_base64(torture_get_testkey(SSH_KEYTYPE_ED25519, 0, 1),
|
||||||
passphrase,
|
passphrase,
|
||||||
|
Reference in New Issue
Block a user