mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-10 10:26:47 +09:00
tests: Cover recent changes for importing certs to keys
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Sahana Prasad <sahana@redhat.com>
This commit is contained in:
committed by
Sahana Prasad
parent
4f903812e6
commit
7d4f210234
@@ -337,6 +337,11 @@ static void torture_pki_ecdsa_import_cert_file(void **state)
|
||||
enum ssh_keytypes_e type;
|
||||
struct pki_st *test_state = *((struct pki_st **)state);
|
||||
|
||||
/* Importing public key as cert should fail */
|
||||
rc = ssh_pki_import_cert_file(LIBSSH_ECDSA_TESTKEY ".pub", &cert);
|
||||
assert_int_equal(rc, SSH_ERROR);
|
||||
assert_null(cert);
|
||||
|
||||
rc = ssh_pki_import_cert_file(LIBSSH_ECDSA_TESTKEY "-cert.pub", &cert);
|
||||
assert_int_equal(rc, 0);
|
||||
assert_non_null(cert);
|
||||
|
||||
Reference in New Issue
Block a user