[openssl] openssl-3.0 update

Dr. Paul Dale pauli at openssl.org
Tue Jan 11 23:58:08 UTC 2022


The branch openssl-3.0 has been updated
       via  56de678e426e619f01e70247fa669c45986aa205 (commit)
      from  408ba1775a82bad57f2e1a4bb4078e4b82cef10b (commit)


- Log -----------------------------------------------------------------
commit 56de678e426e619f01e70247fa669c45986aa205
Author: Matt Caswell <matt at openssl.org>
Date:   Mon Jan 10 14:45:16 2022 +0000

    Fix Decoder, Encoder and Store loader fetching
    
    Attempting to fetch one of the above and providing a query string was
    failing with an internal assertion error. We must ensure that we give the
    provider when calling ossl_method_store_cache_set()
    
    Fixes #17456
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    Reviewed-by: Paul Dale <pauli at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/17459)
    
    (cherry picked from commit cd1981a0dc165ab6af5e2945beaaa9efe4484cee)

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

Summary of changes:
 crypto/encode_decode/decoder_meth.c | 5 +++--
 crypto/encode_decode/encoder_meth.c | 5 +++--
 crypto/store/store_meth.c           | 5 +++--
 3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/crypto/encode_decode/decoder_meth.c b/crypto/encode_decode/decoder_meth.c
index 6d44437314..25407b8999 100644
--- a/crypto/encode_decode/decoder_meth.c
+++ b/crypto/encode_decode/decoder_meth.c
@@ -375,13 +375,14 @@ inner_ossl_decoder_fetch(struct decoder_data_st *methdata, int id,
             construct_decoder,
             destruct_decoder
         };
+        OSSL_PROVIDER *prov = NULL;
 
         methdata->id = id;
         methdata->names = name;
         methdata->propquery = properties;
         methdata->flag_construct_error_occurred = 0;
         if ((method = ossl_method_construct(methdata->libctx, OSSL_OP_DECODER,
-                                            NULL, 0 /* !force_cache */,
+                                            &prov, 0 /* !force_cache */,
                                             &mcm, methdata)) != NULL) {
             /*
              * If construction did create a method for us, we know that
@@ -392,7 +393,7 @@ inner_ossl_decoder_fetch(struct decoder_data_st *methdata, int id,
             if (id == 0 && name != NULL)
                 id = ossl_namemap_name2num(namemap, name);
             if (id != 0)
-                ossl_method_store_cache_set(store, NULL, id, properties, method,
+                ossl_method_store_cache_set(store, prov, id, properties, method,
                                             up_ref_decoder, free_decoder);
         }
 
diff --git a/crypto/encode_decode/encoder_meth.c b/crypto/encode_decode/encoder_meth.c
index 9c0214db6b..43eca755ac 100644
--- a/crypto/encode_decode/encoder_meth.c
+++ b/crypto/encode_decode/encoder_meth.c
@@ -385,13 +385,14 @@ inner_ossl_encoder_fetch(struct encoder_data_st *methdata, int id,
             construct_encoder,
             destruct_encoder
         };
+        OSSL_PROVIDER *prov = NULL;
 
         methdata->id = id;
         methdata->names = name;
         methdata->propquery = properties;
         methdata->flag_construct_error_occurred = 0;
         if ((method = ossl_method_construct(methdata->libctx, OSSL_OP_ENCODER,
-                                            NULL, 0 /* !force_cache */,
+                                            &prov, 0 /* !force_cache */,
                                             &mcm, methdata)) != NULL) {
             /*
              * If construction did create a method for us, we know that
@@ -401,7 +402,7 @@ inner_ossl_encoder_fetch(struct encoder_data_st *methdata, int id,
              */
             if (id == 0)
                 id = ossl_namemap_name2num(namemap, name);
-            ossl_method_store_cache_set(store, NULL, id, properties, method,
+            ossl_method_store_cache_set(store, prov, id, properties, method,
                                         up_ref_encoder, free_encoder);
         }
 
diff --git a/crypto/store/store_meth.c b/crypto/store/store_meth.c
index e79ec871fd..10b56bc685 100644
--- a/crypto/store/store_meth.c
+++ b/crypto/store/store_meth.c
@@ -317,13 +317,14 @@ inner_loader_fetch(struct loader_data_st *methdata, int id,
             construct_loader,
             destruct_loader
         };
+        OSSL_PROVIDER *prov = NULL;
 
         methdata->scheme_id = id;
         methdata->scheme = scheme;
         methdata->propquery = properties;
         methdata->flag_construct_error_occurred = 0;
         if ((method = ossl_method_construct(methdata->libctx, OSSL_OP_STORE,
-                                            NULL, 0 /* !force_cache */,
+                                            &prov, 0 /* !force_cache */,
                                             &mcm, methdata)) != NULL) {
             /*
              * If construction did create a method for us, we know that there
@@ -332,7 +333,7 @@ inner_loader_fetch(struct loader_data_st *methdata, int id,
              */
             if (id == 0)
                 id = ossl_namemap_name2num(namemap, scheme);
-            ossl_method_store_cache_set(store, NULL, id, properties, method,
+            ossl_method_store_cache_set(store, prov, id, properties, method,
                                         up_ref_loader, free_loader);
         }
 


More information about the openssl-commits mailing list