]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
fips: add additional argument to KDF derive call in self test
authorPauli <ppzgs1@gmail.com>
Fri, 26 Feb 2021 00:09:07 +0000 (10:09 +1000)
committerPauli <ppzgs1@gmail.com>
Sun, 28 Feb 2021 07:25:49 +0000 (17:25 +1000)
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14310)

providers/fips/self_test_kats.c

index 79b78f0ba5ce441f9f2ac884083117070eadb715..7f59bb508afb2b193b5140b18b9d2ea0e6ed4328 100644 (file)
@@ -217,12 +217,10 @@ static int self_test_kdf(const ST_KAT_KDF *t, OSSL_SELF_TEST *st,
     params = OSSL_PARAM_BLD_to_param(bld);
     if (params == NULL)
         goto err;
-    if (!EVP_KDF_CTX_set_params(ctx, params))
-        goto err;
 
     if (t->expected_len > sizeof(out))
         goto err;
-    if (EVP_KDF_derive(ctx, out, t->expected_len) <= 0)
+    if (EVP_KDF_derive(ctx, out, t->expected_len, params) <= 0)
         goto err;
 
     OSSL_SELF_TEST_oncorrupt_byte(st, out);