Pass the correct ctx to provider KDF functions
authorMatt Caswell <matt@openssl.org>
Wed, 11 Sep 2019 10:52:47 +0000 (11:52 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 12 Sep 2019 09:24:54 +0000 (10:24 +0100)
Make sure we pass the provider side ctx and not the libcrypto side ctx.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/9865)

crypto/evp/kdf_lib.c

index dedb250988f674ba3d5b4f6db5689de10ffec554..9f055a61d0df72f829d567acc1fbe7488d86868c 100644 (file)
@@ -117,7 +117,7 @@ size_t EVP_KDF_size(EVP_KDF_CTX *ctx)
 
     *params = OSSL_PARAM_construct_size_t(OSSL_KDF_PARAM_SIZE, &s);
     if (ctx->meth->get_ctx_params != NULL
-        && ctx->meth->get_ctx_params(ctx, params))
+        && ctx->meth->get_ctx_params(ctx->data, params))
             return s;
     if (ctx->meth->get_params != NULL
         && ctx->meth->get_params(params))