prov: update provider util to be less agressive about changing things unnecessarily
authorPauli <ppzgs1@gmail.com>
Thu, 25 Feb 2021 03:51:28 +0000 (13:51 +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/common/provider_util.c

index 0df2add..6ed4378 100644 (file)
@@ -72,6 +72,9 @@ int ossl_prov_cipher_load_from_params(PROV_CIPHER *pc,
     const OSSL_PARAM *p;
     const char *propquery;
 
+    if (params == NULL)
+        return 1;
+
     if (!load_common(params, &propquery, &pc->engine))
         return 0;
 
@@ -140,10 +143,12 @@ int ossl_prov_digest_load_from_params(PROV_DIGEST *pd,
     const OSSL_PARAM *p;
     const char *propquery;
 
+    if (params == NULL)
+        return 1;
+
     if (!load_common(params, &propquery, &pd->engine))
         return 0;
 
-
     p = OSSL_PARAM_locate_const(params, OSSL_ALG_PARAM_DIGEST);
     if (p == NULL)
         return 1;