[openssl] master update

Richard Levitte levitte at openssl.org
Sun Jul 5 12:08:00 UTC 2020


The branch master has been updated
       via  dd76b90ef6cf9bd344c9a6cd0de536a734d1b6a3 (commit)
      from  1dc1ea182be183d8a393fdce4494360aee059cd2 (commit)


- Log -----------------------------------------------------------------
commit dd76b90ef6cf9bd344c9a6cd0de536a734d1b6a3
Author: Richard Levitte <levitte at openssl.org>
Date:   Fri Jul 3 14:12:54 2020 +0200

    CORE: perform post-condition in algorithm_do_this() under all circumstances
    
    When ossl_provider_query_operation() returned NULL, the post-condition
    callback wasn't called, and could make algorithm_do_this() falsely
    tell the caller that there was an error.  Because of this, a provider
    that answered with NULL for a particular operation identity would
    effectively block the same query on all following providers.
    
    Fixes #12293
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    Reviewed-by: Shane Lontis <shane.lontis at oracle.com>
    (Merged from https://github.com/openssl/openssl/pull/12365)

-----------------------------------------------------------------------

Summary of changes:
 crypto/core_algorithm.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/crypto/core_algorithm.c b/crypto/core_algorithm.c
index b035ecfbb4..f4a20cb2d1 100644
--- a/crypto/core_algorithm.c
+++ b/crypto/core_algorithm.c
@@ -58,13 +58,12 @@ static int algorithm_do_this(OSSL_PROVIDER *provider, void *cbdata)
 
         map = ossl_provider_query_operation(provider, cur_operation,
                                             &no_store);
-        if (map == NULL)
-            continue;
-
-        while (map->algorithm_names != NULL) {
-            const OSSL_ALGORITHM *thismap = map++;
+        if (map != NULL) {
+            while (map->algorithm_names != NULL) {
+                const OSSL_ALGORITHM *thismap = map++;
 
-            data->fn(provider, thismap, no_store, data->data);
+                data->fn(provider, thismap, no_store, data->data);
+            }
         }
 
         /* Do we fulfill post-conditions? */


More information about the openssl-commits mailing list