aboutsummaryrefslogtreecommitdiff
path: root/crypto/openssl/test/slh_dsa_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/test/slh_dsa_test.c')
-rw-r--r--crypto/openssl/test/slh_dsa_test.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/crypto/openssl/test/slh_dsa_test.c b/crypto/openssl/test/slh_dsa_test.c
index eff9071937a2..35a8d784de40 100644
--- a/crypto/openssl/test/slh_dsa_test.c
+++ b/crypto/openssl/test/slh_dsa_test.c
@@ -183,10 +183,11 @@ static int slh_dsa_key_validate_failure_test(void)
* Loading 128s private key data into a 128f algorithm will have an incorrect
* public key.
*/
- if (!TEST_ptr(key = slh_dsa_key_from_data("SLH-DSA-SHA2-128f",
- slh_dsa_sha2_128s_0_keygen_priv,
- sizeof(slh_dsa_sha2_128s_0_keygen_priv), 0)))
- return 0;
+ key = slh_dsa_key_from_data("SLH-DSA-SHA2-128f",
+ slh_dsa_sha2_128s_0_keygen_priv,
+ sizeof(slh_dsa_sha2_128s_0_keygen_priv), 0);
+ if (!TEST_ptr(key))
+ goto end;
if (!TEST_ptr(vctx = EVP_PKEY_CTX_new_from_pkey(lib_ctx, key, NULL)))
goto end;
if (!TEST_int_eq(EVP_PKEY_pairwise_check(vctx), 0))