tests: Add null checks in torture_pki_ed25519.c
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Этот коммит содержится в:
родитель
48459c37f6
Коммит
77f58a225f
@ -263,6 +263,7 @@ static void torture_pki_ed25519_write_privkey(void **state)
|
||||
NULL,
|
||||
&origkey);
|
||||
assert_true(rc == 0);
|
||||
assert_non_null(origkey);
|
||||
|
||||
unlink(LIBSSH_ED25519_TESTKEY);
|
||||
|
||||
@ -279,6 +280,7 @@ static void torture_pki_ed25519_write_privkey(void **state)
|
||||
NULL,
|
||||
&privkey);
|
||||
assert_true(rc == 0);
|
||||
assert_non_null(privkey);
|
||||
|
||||
rc = ssh_key_cmp(origkey, privkey, SSH_KEY_CMP_PRIVATE);
|
||||
assert_true(rc == 0);
|
||||
@ -307,6 +309,7 @@ static void torture_pki_ed25519_write_privkey(void **state)
|
||||
NULL,
|
||||
&privkey);
|
||||
assert_true(rc == 0);
|
||||
assert_non_null(privkey);
|
||||
|
||||
rc = ssh_key_cmp(origkey, privkey, SSH_KEY_CMP_PRIVATE);
|
||||
assert_true(rc == 0);
|
||||
@ -322,6 +325,7 @@ static void torture_pki_ed25519_write_privkey(void **state)
|
||||
NULL,
|
||||
&origkey);
|
||||
assert_true(rc == 0);
|
||||
assert_non_null(origkey);
|
||||
|
||||
unlink(LIBSSH_ED25519_TESTKEY_PASSPHRASE);
|
||||
rc = ssh_pki_export_privkey_file(origkey,
|
||||
@ -345,6 +349,7 @@ static void torture_pki_ed25519_write_privkey(void **state)
|
||||
NULL,
|
||||
&privkey);
|
||||
assert_true(rc == 0);
|
||||
assert_non_null(privkey);
|
||||
|
||||
rc = ssh_key_cmp(origkey, privkey, SSH_KEY_CMP_PRIVATE);
|
||||
assert_true(rc == 0);
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user