Commit acde7bc05a for openssl.org

commit acde7bc05a9979abce12c4f92d2a0aa0a3d61175
Author: Norbert Pocs <norbertp@openssl.org>
Date:   Mon Aug 31 07:10:16 2026 +0200

    providers: check OSSL_DECODER_CTX_set_construct_data() return value

    It may return a failure if the decoder is frozen, and its return value
    is checked elsewhere, as was pointed out by Coverity.  Handle the return
    value.

    Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1700562
    Complements: 63f187cfedd2 "STORE: Add a built-in 'file:' storemgmt implementation (loader)"
    Complements: 606e0426a148 "Add support for loading root CAs from Windows crypto API"
    Signed-off-by: Norbert Pocs <norbertp@openssl.org>
    Reviewed-by: Paul Dale <paul.dale@oracle.com>
    Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
    Reviewed-by: Neil Horman <nhorman@openssl.org>
    Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
    Merge-date: Mon Aug 31 05:19:13 2026
    Merged-from: https://github.com/openssl/openssl/pull/32576

diff --git a/providers/implementations/storemgmt/file_store.c b/providers/implementations/storemgmt/file_store.c
index 54be17598b..3dc028d104 100644
--- a/providers/implementations/storemgmt/file_store.c
+++ b/providers/implementations/storemgmt/file_store.c
@@ -587,7 +587,8 @@ static int file_load_file(struct file_ctx_st *ctx,

     data.object_cb = object_cb;
     data.object_cbarg = object_cbarg;
-    OSSL_DECODER_CTX_set_construct_data(ctx->_.file.decoderctx, &data);
+    if (!OSSL_DECODER_CTX_set_construct_data(ctx->_.file.decoderctx, &data))
+        return 0;
     OSSL_DECODER_CTX_set_passphrase_cb(ctx->_.file.decoderctx, pw_cb, pw_cbarg);

     /* Launch */
diff --git a/providers/implementations/storemgmt/winstore_store.c b/providers/implementations/storemgmt/winstore_store.c
index 59318e7547..f525469cc6 100644
--- a/providers/implementations/storemgmt/winstore_store.c
+++ b/providers/implementations/storemgmt/winstore_store.c
@@ -275,7 +275,8 @@ static int winstore_load_using(struct winstore_ctx_st *ctx,
     data.object_cb = object_cb;
     data.object_cbarg = object_cbarg;

-    OSSL_DECODER_CTX_set_construct_data(ctx->dctx, &data);
+    if (!OSSL_DECODER_CTX_set_construct_data(ctx->dctx, &data))
+        return 0;
     OSSL_DECODER_CTX_set_passphrase_cb(ctx->dctx, pw_cb, pw_cbarg);

     if (OSSL_DECODER_from_data(ctx->dctx, &der_, &der_len_) == 0)