1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-31 00:03:07 +03:00

tests: Add null checks in torture_threads_pki_rsa.c

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Anderson Toshiyuki Sasaki
2018-09-13 16:52:58 +02:00
committed by Andreas Schneider
parent 8170e30073
commit 63aa274f4b

View File

@ -274,12 +274,14 @@ static void *thread_pki_rsa_publickey_from_privatekey(void *threadid)
NULL,
&key);
assert_true(rc == 0);
assert_non_null(key);
ok = ssh_key_is_private(key);
assert_true(ok);
rc = ssh_pki_export_privkey_to_pubkey(key, &pubkey);
assert_true(rc == SSH_OK);
assert_non_null(pubkey);
ssh_key_free(key);
ssh_key_free(pubkey);