From 9bc050d07d37cf229aca54279066f3d6db0a670c Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 6 Aug 2018 08:44:28 +0200 Subject: [PATCH] tests: Check return code of ssh_pki_import_privkey_base64 CID 1393906 Signed-off-by: Andreas Schneider --- tests/unittests/torture_options.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/unittests/torture_options.c b/tests/unittests/torture_options.c index a3000aec..412df102 100644 --- a/tests/unittests/torture_options.c +++ b/tests/unittests/torture_options.c @@ -364,7 +364,9 @@ static void torture_bind_options_import_key(void **state) /* set rsa key */ base64_key = torture_get_testkey(SSH_KEYTYPE_RSA, 0, 0); - ssh_pki_import_privkey_base64(base64_key, NULL, NULL, NULL, &key); + rc = ssh_pki_import_privkey_base64(base64_key, NULL, NULL, NULL, &key); + assert_int_equal(rc, SSH_OK); + rc = ssh_bind_options_set(bind, SSH_BIND_OPTIONS_IMPORT_KEY, key); assert_int_equal(rc, 0); #ifdef HAVE_DSA