]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
evp_rand: fix bug in gettable_ctx/settable_ctx calls
authorPauli <paul.dale@oracle.com>
Mon, 21 Sep 2020 22:29:58 +0000 (08:29 +1000)
committerPauli <paul.dale@oracle.com>
Wed, 23 Sep 2020 05:28:29 +0000 (15:28 +1000)
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/12931)

crypto/evp/evp_rand.c

index 2e4edfff34674239b19503d811161e72bf6c2ffd..c0729656cb9aebcc8f10a97c152cebe42aa20730 100644 (file)
@@ -433,7 +433,7 @@ const OSSL_PARAM *EVP_RAND_gettable_params(const EVP_RAND *rand)
 
 const OSSL_PARAM *EVP_RAND_gettable_ctx_params(const EVP_RAND *rand)
 {
-    if (rand->gettable_params == NULL)
+    if (rand->gettable_ctx_params == NULL)
         return NULL;
     return rand->gettable_ctx_params(
                ossl_provider_ctx(EVP_RAND_provider(rand)));
@@ -441,7 +441,7 @@ const OSSL_PARAM *EVP_RAND_gettable_ctx_params(const EVP_RAND *rand)
 
 const OSSL_PARAM *EVP_RAND_settable_ctx_params(const EVP_RAND *rand)
 {
-    if (rand->gettable_params == NULL)
+    if (rand->settable_ctx_params == NULL)
         return NULL;
     return rand->settable_ctx_params(
                ossl_provider_ctx(EVP_RAND_provider(rand)));