Fix a copy&paste error in evp_extra_test
authorMatt Caswell <matt@openssl.org>
Mon, 1 Mar 2021 10:48:59 +0000 (10:48 +0000)
committerMatt Caswell <matt@openssl.org>
Tue, 2 Mar 2021 14:58:40 +0000 (14:58 +0000)
test_EC_priv_pub fails to test the case where both a private and public
key have been supplied.

Fixes #14349

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14351)

test/evp_extra_test.c

index 2195f21a9db6e7c61f988d735b4b0254fcb9dd53..33a8af717b69bf5247500f29782ca5eed63b6b45 100644 (file)
@@ -700,9 +700,8 @@ static int test_EC_priv_pub(void)
         || !TEST_true(OSSL_PARAM_BLD_push_octet_string(bld,
                                                        OSSL_PKEY_PARAM_PUB_KEY,
                                                        ec_pub, sizeof(ec_pub)))
-        || !TEST_true(OSSL_PARAM_BLD_push_octet_string(bld,
-                                                       OSSL_PKEY_PARAM_PUB_KEY,
-                                                       ec_pub, sizeof(ec_pub))))
+        || !TEST_true(OSSL_PARAM_BLD_push_BN(bld, OSSL_PKEY_PARAM_PRIV_KEY,
+                                             priv)))
         goto err;
     if (!TEST_ptr(params = OSSL_PARAM_BLD_to_param(bld)))
         goto err;