[openssl] master update

Dr. Paul Dale pauli at openssl.org
Fri Feb 26 08:13:41 UTC 2021


The branch master has been updated
       via  db7fbd54cf0636e25d4f8b8fddd829741064b831 (commit)
       via  2e36321aec5579610da77d43ac27eb8732676654 (commit)
       via  e79fb279dfc146af0948d2727656f72226ef104f (commit)
       via  fe20a66ed4f911f641af4123f931319677b1e8b7 (commit)
       via  292b4184d6fda8e0c5c62c22170e8ad464a1a3a7 (commit)
       via  644c5dd366913d9297db8e0693a754e2d45c9089 (commit)
       via  35c76a528bb14611d7ff2c77762b16cf28c1fef3 (commit)
       via  8dd233bb07607239bea31f33224df2ac37eddb57 (commit)
       via  5a7134ee102f2a975d20353a0cfa0031d155dfcf (commit)
       via  eee323c3390fbee9e7129719473809ab1634c2d7 (commit)
       via  1e8e5c6092bfa90254dd293ee87f15f9edfdbdde (commit)
       via  de43d82b6db142a179485221a56e35fb7d83c64e (commit)
       via  a5120afda32e67435624cef1fe0d49bf699e4ca5 (commit)
       via  530cacb56fbe02da8aca436c4c1ae8000200e69c (commit)
       via  caa60428cd8f0aa60cd2fb7e6da4f5aa9664ae16 (commit)
       via  1c9eaf42510d0756ce0d219c5127dff2f1a0b83d (commit)
       via  a3f091fddd1f5349a14f3874d0e3a6d77cba9865 (commit)
       via  90fec26dc681bec9af25fb5bd232109f1f261965 (commit)
       via  d618ac6fd7e24a99122b04cd23b84130b2537d87 (commit)
       via  6de3a06dd45c68edd67b5ce1dbc94f3952a84a77 (commit)
       via  aa95e08b291aa605fc2cf8f8b1df5d74eb5f228f (commit)
       via  e772f25ca856d830b46927464c8e79c819746974 (commit)
      from  5a6a6d59a642e0ee437e3753c152b67e92d3cb3f (commit)


- Log -----------------------------------------------------------------
commit db7fbd54cf0636e25d4f8b8fddd829741064b831
Author: Pauli <ppzgs1 at gmail.com>
Date:   Wed Feb 24 09:24:29 2021 +1000

    fuzzer: add ctx gettable/settable to the fuzzer RNG
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/14240)

commit 2e36321aec5579610da77d43ac27eb8732676654
Author: Pauli <ppzgs1 at gmail.com>
Date:   Wed Feb 24 09:24:26 2021 +1000

    test: add ctx gettable/settable to the generic fake random number generator
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/14240)

commit e79fb279dfc146af0948d2727656f72226ef104f
Author: Pauli <ppzgs1 at gmail.com>
Date:   Tue Feb 23 11:49:55 2021 +1000

    core: support modified gettable/settable ctx calls for ciphers
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/14240)

commit fe20a66ed4f911f641af4123f931319677b1e8b7
Author: Pauli <ppzgs1 at gmail.com>
Date:   Tue Feb 23 11:49:20 2021 +1000

    changes to match the updated context gettable/settable calls for ciphers
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/14240)

commit 292b4184d6fda8e0c5c62c22170e8ad464a1a3a7
Author: Pauli <ppzgs1 at gmail.com>
Date:   Tue Feb 23 11:48:57 2021 +1000

    evp: upport modified gettable/settable ctx calls for ciphers
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/14240)

commit 644c5dd366913d9297db8e0693a754e2d45c9089
Author: Pauli <ppzgs1 at gmail.com>
Date:   Tue Feb 23 11:48:35 2021 +1000

    prov: upport modified gettable/settable ctx calls for ciphers
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/14240)

commit 35c76a528bb14611d7ff2c77762b16cf28c1fef3
Author: Pauli <ppzgs1 at gmail.com>
Date:   Tue Feb 23 11:03:49 2021 +1000

    evp: support modified gettable/settable ctx calls for MACs
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/14240)

commit 8dd233bb07607239bea31f33224df2ac37eddb57
Author: Pauli <ppzgs1 at gmail.com>
Date:   Tue Feb 23 11:03:31 2021 +1000

    doc: changes to match the updated context gettable/settable calls for MACs
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/14240)

commit 5a7134ee102f2a975d20353a0cfa0031d155dfcf
Author: Pauli <ppzgs1 at gmail.com>
Date:   Tue Feb 23 11:03:08 2021 +1000

    core: core: support modified gettable/settable ctx calls for MACs
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/14240)

commit eee323c3390fbee9e7129719473809ab1634c2d7
Author: Pauli <ppzgs1 at gmail.com>
Date:   Tue Feb 23 11:02:49 2021 +1000

    prov: support modified gettable/settable ctx calls for MACs
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/14240)

commit 1e8e5c6092bfa90254dd293ee87f15f9edfdbdde
Author: Pauli <ppzgs1 at gmail.com>
Date:   Tue Feb 23 10:47:18 2021 +1000

    prov: support modified gettable/settable ctx calls for KDFs
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/14240)

commit de43d82b6db142a179485221a56e35fb7d83c64e
Author: Pauli <ppzgs1 at gmail.com>
Date:   Tue Feb 23 10:46:58 2021 +1000

    core: support modified gettable/settable ctx calls for KDFs
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/14240)

commit a5120afda32e67435624cef1fe0d49bf699e4ca5
Author: Pauli <ppzgs1 at gmail.com>
Date:   Tue Feb 23 10:46:08 2021 +1000

    evp: support modified gettable/settable ctx calls for KDFs
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/14240)

commit 530cacb56fbe02da8aca436c4c1ae8000200e69c
Author: Pauli <ppzgs1 at gmail.com>
Date:   Tue Feb 23 10:45:39 2021 +1000

    doc: changes to match the updated context gettable/settable calls
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/14240)

commit caa60428cd8f0aa60cd2fb7e6da4f5aa9664ae16
Author: Pauli <ppzgs1 at gmail.com>
Date:   Tue Feb 23 09:52:15 2021 +1000

    evp: support modified gettable/settable ctx calls for RNGs
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/14240)

commit 1c9eaf42510d0756ce0d219c5127dff2f1a0b83d
Author: Pauli <ppzgs1 at gmail.com>
Date:   Tue Feb 23 09:51:48 2021 +1000

    core: update RNG gettable/settable ctx param calls
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/14240)

commit a3f091fddd1f5349a14f3874d0e3a6d77cba9865
Author: Pauli <ppzgs1 at gmail.com>
Date:   Tue Feb 23 09:51:10 2021 +1000

    prov: update RNGs to support modified gettable/settable CTX params
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/14240)

commit 90fec26dc681bec9af25fb5bd232109f1f261965
Author: Pauli <ppzgs1 at gmail.com>
Date:   Tue Feb 23 09:50:17 2021 +1000

    doc: note changes to rand gettable/settable provider call
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/14240)

commit d618ac6fd7e24a99122b04cd23b84130b2537d87
Author: Pauli <ppzgs1 at gmail.com>
Date:   Mon Feb 22 12:07:15 2021 +1000

    doc: note changes to digest gettable/settable provider calls
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/14240)

commit 6de3a06dd45c68edd67b5ce1dbc94f3952a84a77
Author: Pauli <ppzgs1 at gmail.com>
Date:   Mon Feb 22 12:06:48 2021 +1000

    modify EVP to support digest gettable/settable calls
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/14240)

commit aa95e08b291aa605fc2cf8f8b1df5d74eb5f228f
Author: Pauli <ppzgs1 at gmail.com>
Date:   Mon Feb 22 12:06:30 2021 +1000

    core: update digest gettable/settable ctx params calls
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/14240)

commit e772f25ca856d830b46927464c8e79c819746974
Author: Pauli <ppzgs1 at gmail.com>
Date:   Mon Feb 22 12:06:04 2021 +1000

    prov: update digests to support modified ctx params
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/14240)

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

Summary of changes:
 crypto/evp/digest.c                                | 34 +++++++++++------
 crypto/evp/evp_enc.c                               | 40 +++++++++++++++++---
 crypto/evp/evp_rand.c                              | 32 ++++++++++++++--
 crypto/evp/kdf_meth.c                              | 30 ++++++++++++++-
 crypto/evp/mac_meth.c                              | 30 ++++++++++++++-
 doc/man3/EVP_DigestInit.pod                        | 43 +++++++++++++++-------
 doc/man3/EVP_EncryptInit.pod                       | 39 ++++++++++++++++----
 doc/man3/EVP_KDF.pod                               | 33 +++++++++++++----
 doc/man3/EVP_MAC.pod                               | 29 ++++++++++++---
 doc/man3/EVP_RAND.pod                              | 29 ++++++++++++---
 doc/man7/provider-cipher.pod                       | 20 ++++++----
 doc/man7/provider-digest.pod                       | 22 +++++++----
 doc/man7/provider-kdf.pod                          | 19 ++++++----
 doc/man7/provider-mac.pod                          | 21 +++++++----
 doc/man7/provider-rand.pod                         | 19 ++++++----
 fuzz/fuzz_rand.c                                   |  3 +-
 include/openssl/core_dispatch.h                    | 20 +++++-----
 include/openssl/evp.h                              |  6 +++
 include/openssl/kdf.h                              |  2 +
 .../ciphers/cipher_aes_cbc_hmac_sha.c              |  6 ++-
 providers/implementations/ciphers/cipher_aes_ocb.c |  6 ++-
 providers/implementations/ciphers/cipher_aes_siv.c |  7 ++--
 providers/implementations/ciphers/cipher_aes_xts.c |  3 +-
 .../implementations/ciphers/cipher_chacha20.c      |  6 ++-
 .../ciphers/cipher_chacha20_poly1305.c             |  2 +-
 providers/implementations/ciphers/cipher_null.c    |  6 ++-
 .../implementations/ciphers/cipher_rc4_hmac_md5.c  |  6 ++-
 providers/implementations/ciphers/ciphercommon.c   |  6 +--
 providers/implementations/digests/md5_sha1_prov.c  |  3 +-
 providers/implementations/digests/mdc2_prov.c      |  3 +-
 providers/implementations/digests/sha2_prov.c      |  3 +-
 providers/implementations/digests/sha3_prov.c      |  3 +-
 .../implementations/include/prov/ciphercommon.h    |  6 ++-
 providers/implementations/kdfs/hkdf.c              |  6 ++-
 providers/implementations/kdfs/kbkdf.c             |  6 ++-
 providers/implementations/kdfs/krb5kdf.c           |  6 ++-
 providers/implementations/kdfs/pbkdf2.c            |  6 ++-
 providers/implementations/kdfs/pkcs12kdf.c         |  6 ++-
 providers/implementations/kdfs/scrypt.c            |  6 ++-
 providers/implementations/kdfs/sshkdf.c            |  6 ++-
 providers/implementations/kdfs/sskdf.c             |  6 ++-
 providers/implementations/kdfs/tls1_prf.c          |  6 ++-
 providers/implementations/kdfs/x942kdf.c           |  6 ++-
 providers/implementations/macs/blake2_mac_impl.c   |  6 ++-
 providers/implementations/macs/cmac_prov.c         |  6 ++-
 providers/implementations/macs/gmac_prov.c         |  3 +-
 providers/implementations/macs/hmac_prov.c         |  6 ++-
 providers/implementations/macs/kmac_prov.c         |  6 ++-
 providers/implementations/macs/poly1305_prov.c     |  3 +-
 providers/implementations/macs/siphash_prov.c      | 11 ++++--
 providers/implementations/rands/drbg_ctr.c         |  6 ++-
 providers/implementations/rands/drbg_hash.c        |  6 ++-
 providers/implementations/rands/drbg_hmac.c        |  6 ++-
 providers/implementations/rands/seed_src.c         |  3 +-
 providers/implementations/rands/test_rng.c         |  6 ++-
 test/testutil/fake_random.c                        |  3 +-
 util/libcrypto.num                                 |  8 ++++
 57 files changed, 493 insertions(+), 183 deletions(-)

diff --git a/crypto/evp/digest.c b/crypto/evp/digest.c
index e322654241..858a9926cf 100644
--- a/crypto/evp/digest.c
+++ b/crypto/evp/digest.c
@@ -656,14 +656,19 @@ int EVP_MD_CTX_set_params(EVP_MD_CTX *ctx, const OSSL_PARAM params[])
 
 const OSSL_PARAM *EVP_MD_settable_ctx_params(const EVP_MD *md)
 {
-    if (md != NULL && md->settable_ctx_params != NULL)
-        return md->settable_ctx_params(ossl_provider_ctx(EVP_MD_provider(md)));
+    void *alg;
+
+    if (md != NULL && md->settable_ctx_params != NULL) {
+        alg = ossl_provider_ctx(EVP_MD_provider(md));
+        return md->settable_ctx_params(NULL, alg);
+    }
     return NULL;
 }
 
 const OSSL_PARAM *EVP_MD_CTX_settable_params(EVP_MD_CTX *ctx)
 {
     EVP_PKEY_CTX *pctx;
+    void *alg;
 
     if (ctx == NULL)
         return NULL;
@@ -678,9 +683,10 @@ const OSSL_PARAM *EVP_MD_CTX_settable_params(EVP_MD_CTX *ctx)
         return pctx->op.sig.signature->settable_ctx_md_params(
                    pctx->op.sig.sigprovctx);
 
-    if (ctx->digest != NULL && ctx->digest->settable_ctx_params != NULL)
-        return ctx->digest->settable_ctx_params(
-                  ossl_provider_ctx(EVP_MD_provider(ctx->digest)));
+    if (ctx->digest != NULL && ctx->digest->settable_ctx_params != NULL) {
+        alg = ossl_provider_ctx(EVP_MD_provider(ctx->digest));
+        return ctx->digest->settable_ctx_params(ctx->provctx, alg);
+    }
 
     return NULL;
 }
@@ -706,14 +712,19 @@ int EVP_MD_CTX_get_params(EVP_MD_CTX *ctx, OSSL_PARAM params[])
 
 const OSSL_PARAM *EVP_MD_gettable_ctx_params(const EVP_MD *md)
 {
-    if (md != NULL && md->gettable_ctx_params != NULL)
-        return md->gettable_ctx_params(ossl_provider_ctx(EVP_MD_provider(md)));
+    void *alg;
+
+    if (md != NULL && md->gettable_ctx_params != NULL) {
+        alg = ossl_provider_ctx(EVP_MD_provider(md));
+        return md->gettable_ctx_params(NULL, alg);
+    }
     return NULL;
 }
 
 const OSSL_PARAM *EVP_MD_CTX_gettable_params(EVP_MD_CTX *ctx)
 {
     EVP_PKEY_CTX *pctx;
+    void *alg;
 
     if (ctx == NULL)
         return NULL;
@@ -728,11 +739,10 @@ const OSSL_PARAM *EVP_MD_CTX_gettable_params(EVP_MD_CTX *ctx)
         return pctx->op.sig.signature->gettable_ctx_md_params(
                     pctx->op.sig.sigprovctx);
 
-    if (ctx->digest != NULL
-            && ctx->digest->gettable_ctx_params != NULL)
-        return ctx->digest->gettable_ctx_params(
-                   ossl_provider_ctx(EVP_MD_provider(ctx->digest)));
-
+    if (ctx->digest != NULL && ctx->digest->gettable_ctx_params != NULL) {
+        alg = ossl_provider_ctx(EVP_MD_provider(ctx->digest));
+        return ctx->digest->gettable_ctx_params(ctx->provctx, alg);
+    }
     return NULL;
 }
 
diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c
index ebb876a8dc..851c6d5d9a 100644
--- a/crypto/evp/evp_enc.c
+++ b/crypto/evp/evp_enc.c
@@ -1220,17 +1220,45 @@ const OSSL_PARAM *EVP_CIPHER_gettable_params(const EVP_CIPHER *cipher)
 
 const OSSL_PARAM *EVP_CIPHER_settable_ctx_params(const EVP_CIPHER *cipher)
 {
-    if (cipher != NULL && cipher->settable_ctx_params != NULL)
-        return cipher->settable_ctx_params(
-                   ossl_provider_ctx(EVP_CIPHER_provider(cipher)));
+    void *alg;
+
+    if (cipher != NULL && cipher->settable_ctx_params != NULL) {
+        alg = ossl_provider_ctx(EVP_CIPHER_provider(cipher));
+        return cipher->settable_ctx_params(NULL, alg);
+    }
     return NULL;
 }
 
 const OSSL_PARAM *EVP_CIPHER_gettable_ctx_params(const EVP_CIPHER *cipher)
 {
-    if (cipher != NULL && cipher->gettable_ctx_params != NULL)
-        return cipher->gettable_ctx_params(
-                   ossl_provider_ctx(EVP_CIPHER_provider(cipher)));
+    void *alg;
+
+    if (cipher != NULL && cipher->gettable_ctx_params != NULL) {
+        alg = ossl_provider_ctx(EVP_CIPHER_provider(cipher));
+        return cipher->gettable_ctx_params(NULL, alg);
+    }
+    return NULL;
+}
+
+const OSSL_PARAM *EVP_CIPHER_CTX_settable_params(EVP_CIPHER_CTX *cctx)
+{
+    void *alg;
+
+    if (cctx != NULL && cctx->cipher->settable_ctx_params != NULL) {
+        alg = ossl_provider_ctx(EVP_CIPHER_provider(cctx->cipher));
+        return cctx->cipher->settable_ctx_params(cctx->provctx, alg);
+    }
+    return NULL;
+}
+
+const OSSL_PARAM *EVP_CIPHER_CTX_gettable_params(EVP_CIPHER_CTX *cctx)
+{
+    void *alg;
+
+    if (cctx != NULL && cctx->cipher->gettable_ctx_params != NULL) {
+        alg = ossl_provider_ctx(EVP_CIPHER_provider(cctx->cipher));
+        return cctx->cipher->gettable_ctx_params(cctx->provctx, alg);
+    }
     return NULL;
 }
 
diff --git a/crypto/evp/evp_rand.c b/crypto/evp/evp_rand.c
index b27f4e11a0..bc8c24b3b5 100644
--- a/crypto/evp/evp_rand.c
+++ b/crypto/evp/evp_rand.c
@@ -428,18 +428,42 @@ const OSSL_PARAM *EVP_RAND_gettable_params(const EVP_RAND *rand)
 
 const OSSL_PARAM *EVP_RAND_gettable_ctx_params(const EVP_RAND *rand)
 {
+    void *provctx;
+
     if (rand->gettable_ctx_params == NULL)
         return NULL;
-    return rand->gettable_ctx_params(
-               ossl_provider_ctx(EVP_RAND_provider(rand)));
+    provctx = ossl_provider_ctx(EVP_RAND_provider(rand));
+    return rand->gettable_ctx_params(NULL, provctx);
 }
 
 const OSSL_PARAM *EVP_RAND_settable_ctx_params(const EVP_RAND *rand)
 {
+    void *provctx;
+
     if (rand->settable_ctx_params == NULL)
         return NULL;
-    return rand->settable_ctx_params(
-               ossl_provider_ctx(EVP_RAND_provider(rand)));
+    provctx = ossl_provider_ctx(EVP_RAND_provider(rand));
+    return rand->settable_ctx_params(NULL, provctx);
+}
+
+const OSSL_PARAM *EVP_RAND_CTX_gettable_params(EVP_RAND_CTX *ctx)
+{
+    void *provctx;
+
+    if (ctx->meth->gettable_ctx_params == NULL)
+        return NULL;
+    provctx = ossl_provider_ctx(EVP_RAND_provider(ctx->meth));
+    return ctx->meth->gettable_ctx_params(ctx->data, provctx);
+}
+
+const OSSL_PARAM *EVP_RAND_CTX_settable_params(EVP_RAND_CTX *ctx)
+{
+    void *provctx;
+
+    if (ctx->meth->settable_ctx_params == NULL)
+        return NULL;
+    provctx = ossl_provider_ctx(EVP_RAND_provider(ctx->meth));
+    return ctx->meth->settable_ctx_params(ctx->data, provctx);
 }
 
 void EVP_RAND_do_all_provided(OSSL_LIB_CTX *libctx,
diff --git a/crypto/evp/kdf_meth.c b/crypto/evp/kdf_meth.c
index 40e71e8cd8..659788a58d 100644
--- a/crypto/evp/kdf_meth.c
+++ b/crypto/evp/kdf_meth.c
@@ -174,16 +174,42 @@ const OSSL_PARAM *EVP_KDF_gettable_params(const EVP_KDF *kdf)
 
 const OSSL_PARAM *EVP_KDF_gettable_ctx_params(const EVP_KDF *kdf)
 {
+    void *alg;
+
     if (kdf->gettable_ctx_params == NULL)
         return NULL;
-    return kdf->gettable_ctx_params(ossl_provider_ctx(EVP_KDF_provider(kdf)));
+    alg = ossl_provider_ctx(EVP_KDF_provider(kdf));
+    return kdf->gettable_ctx_params(NULL, alg);
 }
 
 const OSSL_PARAM *EVP_KDF_settable_ctx_params(const EVP_KDF *kdf)
 {
+    void *alg;
+
     if (kdf->settable_ctx_params == NULL)
         return NULL;
-    return kdf->settable_ctx_params(ossl_provider_ctx(EVP_KDF_provider(kdf)));
+    alg = ossl_provider_ctx(EVP_KDF_provider(kdf));
+    return kdf->settable_ctx_params(NULL, alg);
+}
+
+const OSSL_PARAM *EVP_KDF_CTX_gettable_params(EVP_KDF_CTX *ctx)
+{
+    void *alg;
+
+    if (ctx->meth->gettable_ctx_params == NULL)
+        return NULL;
+    alg = ossl_provider_ctx(EVP_KDF_provider(ctx->meth));
+    return ctx->meth->gettable_ctx_params(ctx->data, alg);
+}
+
+const OSSL_PARAM *EVP_KDF_CTX_settable_params(EVP_KDF_CTX *ctx)
+{
+    void *alg;
+
+    if (ctx->meth->settable_ctx_params == NULL)
+        return NULL;
+    alg = ossl_provider_ctx(EVP_KDF_provider(ctx->meth));
+    return ctx->meth->settable_ctx_params(ctx->data, alg);
 }
 
 void EVP_KDF_do_all_provided(OSSL_LIB_CTX *libctx,
diff --git a/crypto/evp/mac_meth.c b/crypto/evp/mac_meth.c
index edf08389e9..85f87e4c61 100644
--- a/crypto/evp/mac_meth.c
+++ b/crypto/evp/mac_meth.c
@@ -181,16 +181,42 @@ const OSSL_PARAM *EVP_MAC_gettable_params(const EVP_MAC *mac)
 
 const OSSL_PARAM *EVP_MAC_gettable_ctx_params(const EVP_MAC *mac)
 {
+    void *alg;
+
     if (mac->gettable_ctx_params == NULL)
         return NULL;
-    return mac->gettable_ctx_params(ossl_provider_ctx(EVP_MAC_provider(mac)));
+    alg = ossl_provider_ctx(EVP_MAC_provider(mac));
+    return mac->gettable_ctx_params(NULL, alg);
 }
 
 const OSSL_PARAM *EVP_MAC_settable_ctx_params(const EVP_MAC *mac)
 {
+    void *alg;
+
     if (mac->settable_ctx_params == NULL)
         return NULL;
-    return mac->settable_ctx_params(ossl_provider_ctx(EVP_MAC_provider(mac)));
+    alg = ossl_provider_ctx(EVP_MAC_provider(mac));
+    return mac->settable_ctx_params(NULL, alg);
+}
+
+const OSSL_PARAM *EVP_MAC_CTX_gettable_params(EVP_MAC_CTX *ctx)
+{
+    void *alg;
+
+    if (ctx->meth->gettable_ctx_params == NULL)
+        return NULL;
+    alg = ossl_provider_ctx(EVP_MAC_provider(ctx->meth));
+    return ctx->meth->gettable_ctx_params(ctx->data, alg);
+}
+
+const OSSL_PARAM *EVP_MAC_CTX_settable_params(EVP_MAC_CTX *ctx)
+{
+    void *alg;
+
+    if (ctx->meth->settable_ctx_params == NULL)
+        return NULL;
+    alg = ossl_provider_ctx(EVP_MAC_provider(ctx->meth));
+    return ctx->meth->settable_ctx_params(ctx->data, alg);
 }
 
 void EVP_MAC_do_all_provided(OSSL_LIB_CTX *libctx,
diff --git a/doc/man3/EVP_DigestInit.pod b/doc/man3/EVP_DigestInit.pod
index c4cecad3a7..ac527e407e 100644
--- a/doc/man3/EVP_DigestInit.pod
+++ b/doc/man3/EVP_DigestInit.pod
@@ -180,18 +180,29 @@ See L</PARAMETERS> below for more information.
 Sets the list of I<params> into a MD context I<ctx>.
 See L</PARAMETERS> below for more information.
 
-=item EVP_MD_gettable_params(), EVP_MD_gettable_ctx_params(),
-EVP_MD_settable_ctx_params(), EVP_MD_CTX_gettable_params(),
-EVP_MD_CTX_settable_params()
-
-Get a B<OSSL_PARAM> array that describes the retrievable and settable
-parameters. EVP_MD_gettable_params() returns parameters that can be used with
-EVP_MD_get_params(). EVP_MD_gettable_ctx_params() and
-EVP_MD_CTX_gettable_params() return parameters that can be used with
-EVP_MD_CTX_get_params(). EVP_MD_settable_ctx_params() and
-EVP_MD_CTX_settable_params() return parameters that can be used with
-EVP_MD_CTX_set_params().
-See L<OSSL_PARAM(3)> for the use of B<OSSL_PARAM> as parameter descriptor.
+=item EVP_MD_gettable_params()
+
+Get a constant B<OSSL_PARAM> array that describes the retrievable parameters
+that can be used with EVP_MD_get_params().  See L<OSSL_PARAM(3)> for the
+use of B<OSSL_PARAM> as a parameter descriptor.
+
+=item EVP_MD_gettable_ctx_params(), EVP_MD_CTX_gettable_params()
+
+Get a constant B<OSSL_PARAM> array that describes the retrievable parameters
+that can be used with EVP_MD_CTX_get_params().  EVP_MD_gettable_ctx_params()
+returns the parameters that can be retrieved from the algorithm, whereas
+EVP_MD_CTX_gettable_params() returns the parameters that can be retrieved
+in the context's current state.  See L<OSSL_PARAM(3)> for the use of
+B<OSSL_PARAM> as a parameter descriptor.
+
+=item EVP_MD_settable_ctx_params(), EVP_MD_CTX_settable_params()
+
+Get a constant B<OSSL_PARAM> array that describes the settable parameters
+that can be used with EVP_MD_CTX_set_params().  EVP_MD_settable_ctx_params()
+returns the parameters that can be set from the algorithm, whereas
+EVP_MD_CTX_settable_params() returns the parameters that can be set in the
+context's current state.  See L<OSSL_PARAM(3)> for the use of B<OSSL_PARAM>
+as a parameter descriptor.
 
 =item EVP_MD_CTX_set_flags(), EVP_MD_CTX_clear_flags(), EVP_MD_CTX_test_flags()
 
@@ -658,8 +669,12 @@ The EVP_dss1() function was removed in OpenSSL 1.1.0.
 
 The EVP_MD_CTX_set_pkey_ctx() function was added in OpenSSL 1.1.1.
 
-The EVP_MD_fetch(), EVP_MD_free(), EVP_MD_up_ref(), EVP_MD_CTX_set_params()
-and EVP_MD_CTX_get_params() functions were added in OpenSSL 3.0.
+The EVP_MD_fetch(), EVP_MD_free(), EVP_MD_up_ref(),
+EVP_MD_get_params(), EVP_MD_CTX_set_params(), EVP_MD_CTX_get_params(),
+EVP_MD_gettable_params(), EVP_MD_gettable_ctx_params(),
+EVP_MD_settable_ctx_params(), EVP_MD_CTX_settable_params() and
+EVP_MD_CTX_gettable_params() functions were added in OpenSSL 3.0.
+
 The EVP_MD_CTX_update_fn() and EVP_MD_CTX_set_update_fn() were deprecated
 in OpenSSL 3.0.
 
diff --git a/doc/man3/EVP_EncryptInit.pod b/doc/man3/EVP_EncryptInit.pod
index 7cc9cebb51..63b416289b 100644
--- a/doc/man3/EVP_EncryptInit.pod
+++ b/doc/man3/EVP_EncryptInit.pod
@@ -48,8 +48,10 @@ EVP_CIPHER_CTX_name,
 EVP_CIPHER_CTX_nid,
 EVP_CIPHER_CTX_get_params,
 EVP_CIPHER_gettable_ctx_params,
+EVP_CIPHER_CTX_gettable_params,
 EVP_CIPHER_CTX_set_params,
 EVP_CIPHER_settable_ctx_params,
+EVP_CIPHER_CTX_settable_params,
 EVP_CIPHER_CTX_block_size,
 EVP_CIPHER_CTX_key_length,
 EVP_CIPHER_CTX_iv_length,
@@ -147,6 +149,8 @@ EVP_CIPHER_do_all_provided
  const OSSL_PARAM *EVP_CIPHER_gettable_params(const EVP_CIPHER *cipher);
  const OSSL_PARAM *EVP_CIPHER_settable_ctx_params(const EVP_CIPHER *cipher);
  const OSSL_PARAM *EVP_CIPHER_gettable_ctx_params(const EVP_CIPHER *cipher);
+ const OSSL_PARAM *EVP_CIPHER_CTX_settable_params(EVP_CIPHER_CTX *ctx);
+ const OSSL_PARAM *EVP_CIPHER_CTX_gettable_params(EVP_CIPHER_CTX *ctx);
  int EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *ctx);
  int EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx);
  int EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx);
@@ -302,12 +306,28 @@ context B<ctx>.
 EVP_CIPHER_CTX_get_params() retrieves the requested list of operation
 B<params> from CIPHER context B<ctx>.
 
-EVP_CIPHER_gettable_params(), EVP_CIPHER_gettable_ctx_params(), and
-EVP_CIPHER_settable_ctx_params() get a constant B<OSSL_PARAM> array
-that describes the retrievable and settable parameters, i.e. parameters
-that can be used with EVP_CIPHER_get_params(), EVP_CIPHER_CTX_get_params()
-and EVP_CIPHER_CTX_set_params(), respectively.
-See L<OSSL_PARAM(3)> for the use of B<OSSL_PARAM> as parameter descriptor.
+EVP_CIPHER_gettable_params() returns an B<OSSL_PARAM> array that describes
+the retrievable and settable parameters.  EVP_CIPHER_gettable_params()
+returns parameters that can be used with EVP_CIPHER_get_params().  See
+L<OSSL_PARAM(3)> for the use of B<OSSL_PARAM> as a parameter descriptor.
+
+EVP_CIPHER_gettable_ctx_params() and EVP_CIPHER_CTX_gettable_params()
+return constant B<OSSL_PARAM> arrays that describe the retrievable
+parameters that can be used with EVP_CIPHER_CTX_get_params().
+EVP_CIPHER_gettable_ctx_params() returns the parameters that can be
+retrieved from the algorithm, whereas EVP_CIPHER_CTX_gettable_params()
+returns the parameters that can be retrieved in the context's current
+state.  See L<OSSL_PARAM(3)> for the use of B<OSSL_PARAM> as a parameter
+descriptor.
+
+EVP_CIPHER_settable_ctx_params() and EVP_CIPHER_CTX_settable_params()
+return constant B<OSSL_PARAM> arrays that describe the settable
+parameters that can be used with EVP_CIPHER_CTX_set_params().
+EVP_CIPHER_settable_ctx_params() returns the parameters that can be
+retrieved from the algorithm, whereas EVP_CIPHER_CTX_settable_params()
+returns the parameters that can be retrieved in the context's current
+state.  See L<OSSL_PARAM(3)> for the use of B<OSSL_PARAM> as a parameter
+descriptor.
 
 EVP_CIPHER_key_length() and EVP_CIPHER_CTX_key_length() return the key
 length of a cipher when passed an B<EVP_CIPHER> or B<EVP_CIPHER_CTX>
@@ -884,8 +904,11 @@ disappeared.  EVP_CIPHER_CTX_init() remains as an alias for
 EVP_CIPHER_CTX_reset().
 
 The EVP_CIPHER_fetch(), EVP_CIPHER_free(), EVP_CIPHER_up_ref(),
-EVP_CIPHER_CTX_set_params() and EVP_CIPHER_CTX_get_params() functions
-were added in 3.0.
+EVP_CIPHER_get_params(), EVP_CIPHER_CTX_set_params(),
+EVP_CIPHER_CTX_get_params(), EVP_CIPHER_gettable_params(),
+EVP_CIPHER_settable_ctx_params(), EVP_CIPHER_gettable_ctx_params(),
+EVP_CIPHER_CTX_settable_params() and EVP_CIPHER_CTX_gettable_params()
+functions were added in 3.0.
 
 =head1 COPYRIGHT
 
diff --git a/doc/man3/EVP_KDF.pod b/doc/man3/EVP_KDF.pod
index 3afc0bd9b1..90e8f5adcf 100644
--- a/doc/man3/EVP_KDF.pod
+++ b/doc/man3/EVP_KDF.pod
@@ -8,8 +8,9 @@ EVP_KDF_CTX_reset, EVP_KDF_derive,
 EVP_KDF_CTX_get_kdf_size, EVP_KDF_provider, EVP_KDF_CTX_kdf, EVP_KDF_is_a,
 EVP_KDF_number, EVP_KDF_name, EVP_KDF_names_do_all,
 EVP_KDF_CTX_get_params, EVP_KDF_CTX_set_params, EVP_KDF_do_all_provided,
-EVP_KDF_get_params, EVP_KDF_gettable_ctx_params, EVP_KDF_settable_ctx_params,
-EVP_KDF_gettable_params - EVP KDF routines
+EVP_KDF_get_params, EVP_KDF_gettable_params,
+EVP_KDF_gettable_ctx_params, EVP_KDF_settable_ctx_params,
+EVP_KDF_CTX_gettable_params, EVP_KDF_CTX_settable_params - EVP KDF routines
 
 =head1 SYNOPSIS
 
@@ -45,6 +46,8 @@ EVP_KDF_gettable_params - EVP KDF routines
  const OSSL_PARAM *EVP_KDF_gettable_params(const EVP_KDF *kdf);
  const OSSL_PARAM *EVP_KDF_gettable_ctx_params(const EVP_KDF *kdf);
  const OSSL_PARAM *EVP_KDF_settable_ctx_params(const EVP_KDF *kdf);
+ const OSSL_PARAM *EVP_KDF_CTX_gettable_params(const EVP_KDF *kdf);
+ const OSSL_PARAM *EVP_KDF_CTX_settable_params(const EVP_KDF *kdf);
  const OSSL_PROVIDER *EVP_KDF_provider(const EVP_KDF *kdf);
 
 =head1 DESCRIPTION
@@ -124,12 +127,26 @@ simply ignored.
 Also, what happens when a needed parameter isn't passed down is
 defined by the implementation.
 
-EVP_KDF_gettable_params(), EVP_KDF_gettable_ctx_params() and
-EVP_KDF_settable_ctx_params() get a constant B<OSSL_PARAM> array that
-describes the retrievable and settable parameters, i.e. parameters that
-can be used with EVP_KDF_get_params(), EVP_KDF_CTX_get_params()
-and EVP_KDF_CTX_set_params(), respectively.
-See L<OSSL_PARAM(3)> for the use of B<OSSL_PARAM> as parameter descriptor.
+EVP_KDF_gettable_params() returns an B<OSSL_PARAM> array that describes
+the retrievable and settable parameters.  EVP_KDF_gettable_params()
+returns parameters that can be used with EVP_KDF_get_params().
+See L<OSSL_PARAM(3)> for the use of B<OSSL_PARAM> as a parameter descriptor.
+
+EVP_KDF_gettable_ctx_params() and EVP_KDF_CTX_gettable_params()
+return constant B<OSSL_PARAM> arrays that describe the retrievable
+parameters that can be used with EVP_KDF_CTX_get_params().
+EVP_KDF_gettable_ctx_params() returns the parameters that can be retrieved
+from the algorithm, whereas EVP_KDF_CTX_gettable_params() returns
+the parameters that can be retrieved in the context's current state.
+See L<OSSL_PARAM(3)> for the use of B<OSSL_PARAM> as a parameter descriptor.
+
+EVP_KDF_settable_ctx_params() and EVP_KDF_CTX_settable_params() return
+constant B<OSSL_PARAM> arrays that describe the settable parameters that
+can be used with EVP_KDF_CTX_set_params().  EVP_KDF_settable_ctx_params()
+returns the parameters that can be retrieved from the algorithm,
+whereas EVP_KDF_CTX_settable_params() returns the parameters that can
+be retrieved in the context's current state.  See L<OSSL_PARAM(3)>
+for the use of B<OSSL_PARAM> as a parameter descriptor.
 
 =head2 Information functions
 
diff --git a/doc/man3/EVP_MAC.pod b/doc/man3/EVP_MAC.pod
index ff7003b906..b32415aac5 100644
--- a/doc/man3/EVP_MAC.pod
+++ b/doc/man3/EVP_MAC.pod
@@ -9,6 +9,7 @@ EVP_MAC_CTX, EVP_MAC_CTX_new, EVP_MAC_CTX_free, EVP_MAC_CTX_dup,
 EVP_MAC_CTX_mac, EVP_MAC_CTX_get_params, EVP_MAC_CTX_set_params,
 EVP_MAC_CTX_get_mac_size, EVP_MAC_init, EVP_MAC_update, EVP_MAC_final,
 EVP_MAC_gettable_ctx_params, EVP_MAC_settable_ctx_params,
+EVP_MAC_CTX_gettable_params, EVP_MAC_CTX_settable_params,
 EVP_MAC_do_all_provided - EVP MAC routines
 
 =head1 SYNOPSIS
@@ -47,6 +48,8 @@ EVP_MAC_do_all_provided - EVP MAC routines
  const OSSL_PARAM *EVP_MAC_gettable_params(const EVP_MAC *mac);
  const OSSL_PARAM *EVP_MAC_gettable_ctx_params(const EVP_MAC *mac);
  const OSSL_PARAM *EVP_MAC_settable_ctx_params(const EVP_MAC *mac);
+ const OSSL_PARAM *EVP_MAC_CTX_gettable_params(EVP_MAC_CTX *ctx);
+ const OSSL_PARAM *EVP_MAC_CTX_settable_params(EVP_MAC_CTX *ctx);
 
  void EVP_MAC_do_all_provided(OSSL_LIB_CTX *libctx,
                               void (*fn)(EVP_MAC *mac, void *arg),
@@ -153,12 +156,26 @@ simply ignored.
 Also, what happens when a needed parameter isn't passed down is
 defined by the implementation.
 
-EVP_MAC_gettable_params(), EVP_MAC_gettable_ctx_params() and
-EVP_MAC_settable_ctx_params() get a constant B<OSSL_PARAM> array that
-describes the retrievable and settable parameters, i.e. parameters that
-can be used with EVP_MAC_get_params(), EVP_MAC_CTX_get_params()
-and EVP_MAC_CTX_set_params(), respectively.
-See L<OSSL_PARAM(3)> for the use of B<OSSL_PARAM> as parameter descriptor.
+EVP_MAC_gettable_params() returns an B<OSSL_PARAM> array that describes
+the retrievable and settable parameters.  EVP_MAC_gettable_params()
+returns parameters that can be used with EVP_MAC_get_params().
+See L<OSSL_PARAM(3)> for the use of B<OSSL_PARAM> as a parameter descriptor.
+
+EVP_MAC_gettable_ctx_params() and EVP_MAC_CTX_gettable_params()
+return constant B<OSSL_PARAM> arrays that describe the retrievable
+parameters that can be used with EVP_MAC_CTX_get_params().
+EVP_MAC_gettable_ctx_params() returns the parameters that can be retrieved
+from the algorithm, whereas EVP_MAC_CTX_gettable_params() returns
+the parameters that can be retrieved in the context's current state.
+See L<OSSL_PARAM(3)> for the use of B<OSSL_PARAM> as a parameter descriptor.
+
+EVP_MAC_settable_ctx_params() and EVP_MAC_CTX_settable_params() return
+constant B<OSSL_PARAM> arrays that describe the settable parameters that
+can be used with EVP_MAC_CTX_set_params().  EVP_MAC_settable_ctx_params()
+returns the parameters that can be retrieved from the algorithm,
+whereas EVP_MAC_CTX_settable_params() returns the parameters that can
+be retrieved in the context's current state.  See L<OSSL_PARAM(3)>
+for the use of B<OSSL_PARAM> as a parameter descriptor.
 
 =head2 Information functions
 
diff --git a/doc/man3/EVP_RAND.pod b/doc/man3/EVP_RAND.pod
index df92629780..88ee739d94 100644
--- a/doc/man3/EVP_RAND.pod
+++ b/doc/man3/EVP_RAND.pod
@@ -11,6 +11,7 @@ EVP_RAND_provider, EVP_RAND_CTX_rand, EVP_RAND_is_a, EVP_RAND_number,
 EVP_RAND_name, EVP_RAND_names_do_all, EVP_RAND_get_ctx_params,
 EVP_RAND_set_ctx_params, EVP_RAND_do_all_provided, EVP_RAND_get_params,
 EVP_RAND_gettable_ctx_params, EVP_RAND_settable_ctx_params,
+EVP_RAND_CTX_gettable_params, EVP_RAND_CTX_settable_params,
 EVP_RAND_gettable_params, EVP_RAND_STATE_UNINITIALISED, EVP_RAND_STATE_READY,
 EVP_RAND_STATE_ERROR - EVP RAND routines
 
@@ -34,6 +35,8 @@ EVP_RAND_STATE_ERROR - EVP RAND routines
  const OSSL_PARAM *EVP_RAND_gettable_params(const EVP_RAND *rand);
  const OSSL_PARAM *EVP_RAND_gettable_ctx_params(const EVP_RAND *rand);
  const OSSL_PARAM *EVP_RAND_settable_ctx_params(const EVP_RAND *rand);
+ const OSSL_PARAM *EVP_RAND_CTX_gettable_params(EVP_RAND_CTX *ctx);
+ const OSSL_PARAM *EVP_RAND_CTX_settable_params(EVP_RAND_CTX *ctx);
  int EVP_RAND_number(const EVP_RAND *rand);
  const char *EVP_RAND_name(const EVP_RAND *rand);
  int EVP_RAND_is_a(const EVP_RAND *rand, const char *name);
@@ -179,12 +182,26 @@ simply ignored.
 Also, what happens when a needed parameter isn't passed down is
 defined by the implementation.
 
-EVP_RAND_gettable_params(), EVP_RAND_gettable_ctx_params() and
-EVP_RAND_settable_ctx_params() get a constant B<OSSL_PARAM> array that
-describes the retrievable and settable parameters, i.e. parameters that
-can be used with EVP_RAND_get_params(), EVP_RAND_get_ctx_params()
-and EVP_RAND_set_ctx_params(), respectively.
-See L<OSSL_PARAM(3)> for the use of B<OSSL_PARAM> as parameter descriptor.
+EVP_RAND_gettable_params() returns an B<OSSL_PARAM> array that describes
+the retrievable and settable parameters.  EVP_RAND_gettable_params() returns
+parameters that can be used with EVP_RAND_get_params().  See L<OSSL_PARAM(3)>
+for the use of B<OSSL_PARAM> as a parameter descriptor.
+
+EVP_RAND_gettable_ctx_params() and EVP_RAND_CTX_gettable_params() return
+constant B<OSSL_PARAM> arrays that describe the retrievable parameters that
+can be used with EVP_RAND_CTX_get_params().  EVP_RAND_gettable_ctx_params()
+returns the parameters that can be retrieved from the algorithm, whereas
+EVP_RAND_CTX_gettable_params() returns the parameters that can be retrieved
+in the context's current state.  See L<OSSL_PARAM(3)> for the use of
+B<OSSL_PARAM> as a parameter descriptor.
+
+EVP_RAND_settable_ctx_params() and EVP_RAND_CTX_settable_params() return
+constant B<OSSL_PARAM> arrays that describe the settable parameters that
+can be used with EVP_RAND_CTX_set_params().  EVP_RAND_settable_ctx_params()
+returns the parameters that can be retrieved from the algorithm, whereas
+EVP_RAND_CTX_settable_params() returns the parameters that can be retrieved
+in the context's current state.  See L<OSSL_PARAM(3)> for the use of
+B<OSSL_PARAM> as a parameter descriptor.
 
 =head2 Information functions
 
diff --git a/doc/man7/provider-cipher.pod b/doc/man7/provider-cipher.pod
index 34a5ec0a7f..133ee07d67 100644
--- a/doc/man7/provider-cipher.pod
+++ b/doc/man7/provider-cipher.pod
@@ -40,8 +40,10 @@ provider-cipher - The cipher library E<lt>-E<gt> provider functions
  const OSSL_PARAM *OSSL_FUNC_cipher_gettable_params(void *provctx);
 
  /* Cipher operation parameter descriptors */
- const OSSL_PARAM *OSSL_FUNC_cipher_gettable_ctx_params(void *provctx);
- const OSSL_PARAM *OSSL_FUNC_cipher_settable_ctx_params(void *provctx);
+ const OSSL_PARAM *OSSL_FUNC_cipher_gettable_ctx_params(void *cctx,
+                                                        void *provctx);
+ const OSSL_PARAM *OSSL_FUNC_cipher_settable_ctx_params(void *cctx,
+                                                        void *provctx);
 
  /* Cipher parameters */
  int OSSL_FUNC_cipher_get_params(OSSL_PARAM params[]);
@@ -186,11 +188,15 @@ Any parameter settings are additional to any that were previously set.
 OSSL_FUNC_cipher_get_ctx_params() gets cipher operation details details from
 the given provider side cipher context I<cctx> and stores them in I<params>.
 
-OSSL_FUNC_cipher_gettable_params(), OSSL_FUNC_cipher_gettable_ctx_params(), and
-OSSL_FUNC_cipher_settable_ctx_params() all return constant B<OSSL_PARAM> arrays
-as descriptors of the parameters that OSSL_FUNC_cipher_get_params(),
-OSSL_FUNC_cipher_get_ctx_params(), and OSSL_FUNC_cipher_set_ctx_params() can handle,
-respectively.
+OSSL_FUNC_cipher_gettable_params(), OSSL_FUNC_cipher_gettable_ctx_params(),
+and OSSL_FUNC_cipher_settable_ctx_params() all return constant B<OSSL_PARAM>
+arrays as descriptors of the parameters that OSSL_FUNC_cipher_get_params(),
+OSSL_FUNC_cipher_get_ctx_params(), and OSSL_FUNC_cipher_set_ctx_params()
+can handle, respectively.  OSSL_FUNC_cipher_gettable_ctx_params() and
+OSSL_FUNC_cipher_settable_ctx_params() will return the parameters associated
+with the provider side context I<cctx> in its current state if it is
+not NULL.  Otherwise, they return the parameters associated with the
+provider side algorithm I<provctx>.
 
 Parameters currently recognised by built-in ciphers are as follows. Not all
 parameters are relevant to, or are understood by all ciphers:
diff --git a/doc/man7/provider-digest.pod b/doc/man7/provider-digest.pod
index 1c09ee3c40..4f90cf8b62 100644
--- a/doc/man7/provider-digest.pod
+++ b/doc/man7/provider-digest.pod
@@ -33,8 +33,10 @@ provider-digest - The digest library E<lt>-E<gt> provider functions
  const OSSL_PARAM *OSSL_FUNC_digest_gettable_params(void *provctx);
 
  /* Digest operation parameter descriptors */
- const OSSL_PARAM *OSSL_FUNC_digest_gettable_ctx_params(void *provctx);
- const OSSL_PARAM *OSSL_FUNC_digest_settable_ctx_params(void *provctx);
+ const OSSL_PARAM *OSSL_FUNC_digest_gettable_ctx_params(void *dctx,
+                                                        void *provctx);
+ const OSSL_PARAM *OSSL_FUNC_digest_settable_ctx_params(void *dctx,
+                                                        void *provctx);
 
  /* Digest parameters */
  int OSSL_FUNC_digest_get_params(OSSL_PARAM params[]);
@@ -152,11 +154,17 @@ Any parameter settings are additional to any that were previously set.
 OSSL_FUNC_digest_get_ctx_params() gets digest operation details details from
 the given provider side digest context I<dctx> and stores them in I<params>.
 
-OSSL_FUNC_digest_gettable_params(), OSSL_FUNC_digest_gettable_ctx_params(), and
-OSSL_FUNC_digest_settable_ctx_params() all return constant B<OSSL_PARAM> arrays
-as descriptors of the parameters that OSSL_FUNC_digest_get_params(),
-OSSL_FUNC_digest_get_ctx_params(), and OSSL_FUNC_digest_set_ctx_params() can handle,
-respectively.
+OSSL_FUNC_digest_gettable_params() returns a constant B<OSSL_PARAM> array
+containing descriptors of the parameters that OSSL_FUNC_digest_get_params()
+can handle.
+
+OSSL_FUNC_digest_gettable_ctx_params() and
+OSSL_FUNC_digest_settable_ctx_params() both return constant
+B<OSSL_PARAM> arrays as descriptors of the parameters that
+OSSL_FUNC_digest_get_ctx_params() and OSSL_FUNC_digest_set_ctx_params()
+can handle, respectively.  The array is based on the current state of
+the provider side context if I<dctx> is not NULL and on the provider
+side algorithm I<provctx> otherwise.
 
 Parameters currently recognised by built-in digests with this function
 are as follows. Not all parameters are relevant to, or are understood
diff --git a/doc/man7/provider-kdf.pod b/doc/man7/provider-kdf.pod
index 8e2069e34a..4d3d91a4e7 100644
--- a/doc/man7/provider-kdf.pod
+++ b/doc/man7/provider-kdf.pod
@@ -28,8 +28,8 @@ provider-kdf - The KDF library E<lt>-E<gt> provider functions
 
  /* KDF parameter descriptors */
  const OSSL_PARAM *OSSL_FUNC_kdf_gettable_params(void *provctx);
- const OSSL_PARAM *OSSL_FUNC_kdf_gettable_ctx_params(void *provctx);
- const OSSL_PARAM *OSSL_FUNC_kdf_settable_ctx_params(void *provctx);
+ const OSSL_PARAM *OSSL_FUNC_kdf_gettable_ctx_params(void *kcxt, void *provctx);
+ const OSSL_PARAM *OSSL_FUNC_kdf_settable_ctx_params(void *kcxt, void *provctx);
 
  /* KDF parameters */
  int OSSL_FUNC_kdf_get_params(OSSL_PARAM params[]);
@@ -129,11 +129,16 @@ Any parameter settings are additional to any that were previously set.
 OSSL_FUNC_kdf_get_ctx_params() retrieves gettable parameter values associated
 with the given provider side KDF context I<kctx> and stores them in I<params>.
 
-OSSL_FUNC_kdf_gettable_params(), OSSL_FUNC_kdf_gettable_ctx_params(), and
-OSSL_FUNC_kdf_settable_ctx_params() all return constant B<OSSL_PARAM> arrays
-as descriptors of the parameters that OSSL_FUNC_kdf_get_params(),
-OSSL_FUNC_kdf_get_ctx_params(), and OSSL_FUNC_kdf_set_ctx_params() can handle,
-respectively.
+OSSL_FUNC_kdf_gettable_params(), OSSL_FUNC_kdf_gettable_ctx_params(),
+and OSSL_FUNC_kdf_settable_ctx_params() all return constant B<OSSL_PARAM>
+arrays as descriptors of the parameters that OSSL_FUNC_kdf_get_params(),
+OSSL_FUNC_kdf_get_ctx_params(), and OSSL_FUNC_kdf_set_ctx_params()
+can handle, respectively.  OSSL_FUNC_kdf_gettable_ctx_params() and
+OSSL_FUNC_kdf_settable_ctx_params() will return the parameters associated
+with the provider side context I<kctx> in its current state if it is
+not NULL.  Otherwise, they return the parameters associated with the
+provider side algorithm I<provctx>.
+
 
 Parameters currently recognised by built-in KDFs are as follows. Not all
 parameters are relevant to, or are understood by all KDFs:
diff --git a/doc/man7/provider-mac.pod b/doc/man7/provider-mac.pod
index 7ce2ad2a13..fdeda79ab5 100644
--- a/doc/man7/provider-mac.pod
+++ b/doc/man7/provider-mac.pod
@@ -28,9 +28,9 @@ provider-mac - The mac library E<lt>-E<gt> provider functions
  int OSSL_FUNC_mac_final(void *mctx, unsigned char *out, size_t *outl, size_t outsize);
 
  /* MAC parameter descriptors */
- const OSSL_PARAM *OSSL_FUNC_mac_get_params(void *provctx);
- const OSSL_PARAM *OSSL_FUNC_mac_get_ctx_params(void *provctx);
- const OSSL_PARAM *OSSL_FUNC_mac_set_ctx_params(void *provctx);
+ const OSSL_PARAM *OSSL_FUNC_mac_gettable_params(void *provctx);
+ const OSSL_PARAM *OSSL_FUNC_mac_gettable_ctx_params(void *mctx, void *provctx);
+ const OSSL_PARAM *OSSL_FUNC_mac_settable_ctx_params(void *mctx, void *provctx);
 
  /* MAC parameters */
  int OSSL_FUNC_mac_get_params(OSSL_PARAM params[]);
@@ -140,11 +140,16 @@ OSSL_FUNC_mac_get_ctx_params() gets details of currently set parameter values
 associated with the given provider side mac context I<mctx> and stores them
 in I<params>.
 
-OSSL_FUNC_mac_gettable_params(), OSSL_FUNC_mac_gettable_ctx_params(), and
-OSSL_FUNC_mac_settable_ctx_params() all return constant B<OSSL_PARAM> arrays
-as descriptors of the parameters that OSSL_FUNC_mac_get_params(),
-OSSL_FUNC_mac_get_ctx_params(), and OSSL_FUNC_mac_set_ctx_params() can handle,
-respectively.
+OSSL_FUNC_mac_gettable_params(), OSSL_FUNC_mac_gettable_ctx_params(),
+and OSSL_FUNC_mac_settable_ctx_params() all return constant B<OSSL_PARAM>
+arrays as descriptors of the parameters that OSSL_FUNC_mac_get_params(),
+OSSL_FUNC_mac_get_ctx_params(), and OSSL_FUNC_mac_set_ctx_params()
+can handle, respectively.  OSSL_FUNC_mac_gettable_ctx_params() and
+OSSL_FUNC_mac_settable_ctx_params() will return the parameters associated
+with the provider side context I<mctx> in its current state if it is
+not NULL.  Otherwise, they return the parameters associated with the
+provider side algorithm I<provctx>.
+
 
 Parameters currently recognised by built-in macs are as follows. Not all
 parameters are relevant to, or are understood by all macs:
diff --git a/doc/man7/provider-rand.pod b/doc/man7/provider-rand.pod
index 3250e3c11a..5de3a15f38 100644
--- a/doc/man7/provider-rand.pod
+++ b/doc/man7/provider-rand.pod
@@ -53,8 +53,8 @@ functions
 
  /* RAND parameter descriptors */
  const OSSL_PARAM *OSSL_FUNC_rand_gettable_params(void *provctx);
- const OSSL_PARAM *OSSL_FUNC_rand_gettable_ctx_params(void *provctx);
- const OSSL_PARAM *OSSL_FUNC_rand_settable_ctx_params(void *provctx);
+ const OSSL_PARAM *OSSL_FUNC_rand_gettable_ctx_params(void *ctx, void *provctx);
+ const OSSL_PARAM *OSSL_FUNC_rand_settable_ctx_params(void *ctx, void *provctx);
 
  /* RAND parameters */
  int OSSL_FUNC_rand_get_params(OSSL_PARAM params[]);
@@ -163,11 +163,16 @@ OSSL_FUNC_rand_get_ctx_params() gets details of currently set parameter values
 associated with the given provider side rand context I<ctx> and stores them
 in I<params>.
 
-OSSL_FUNC_rand_gettable_params(), OSSL_FUNC_rand_gettable_ctx_params(), and
-OSSL_FUNC_rand_settable_ctx_params() all return constant B<OSSL_PARAM> arrays
-as descriptors of the parameters that OSSL_FUNC_rand_get_params(),
-OSSL_FUNC_rand_get_ctx_params(), and OSSL_FUNC_rand_set_ctx_params() can handle,
-respectively.
+OSSL_FUNC_rand_gettable_params(), OSSL_FUNC_rand_gettable_ctx_params(),
+and OSSL_FUNC_rand_settable_ctx_params() all return constant B<OSSL_PARAM>
+arrays as descriptors of the parameters that OSSL_FUNC_rand_get_params(),
+OSSL_FUNC_rand_get_ctx_params(), and OSSL_FUNC_rand_set_ctx_params()
+can handle, respectively.  OSSL_FUNC_rand_gettable_ctx_params()
+and OSSL_FUNC_rand_settable_ctx_params() will return the parameters
+associated with the provider side context I<ctx> in its current state
+if it is not NULL.  Otherwise, they return the parameters associated
+with the provider side algorithm I<provctx>.
+
 
 Parameters currently recognised by built-in rands are as follows. Not all
 parameters are relevant to, or are understood by all rands:
diff --git a/fuzz/fuzz_rand.c b/fuzz/fuzz_rand.c
index 99c32509c6..cd5371efbd 100644
--- a/fuzz/fuzz_rand.c
+++ b/fuzz/fuzz_rand.c
@@ -91,7 +91,8 @@ static int fuzz_rand_get_ctx_params(void *vrng, OSSL_PARAM params[])
     return 1;
 }
 
-static const OSSL_PARAM *fuzz_rand_gettable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *fuzz_rand_gettable_ctx_params(ossl_unused void *vrng,
+                                                       ossl_unused void *provctx)
 {
     static const OSSL_PARAM known_gettable_ctx_params[] = {
         OSSL_PARAM_int(OSSL_RAND_PARAM_STATE, NULL),
diff --git a/include/openssl/core_dispatch.h b/include/openssl/core_dispatch.h
index 4d1d89ca82..634159524d 100644
--- a/include/openssl/core_dispatch.h
+++ b/include/openssl/core_dispatch.h
@@ -262,9 +262,9 @@ OSSL_CORE_MAKE_FUNC(int, digest_get_ctx_params,
 OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, digest_gettable_params,
                     (void *provctx))
 OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, digest_settable_ctx_params,
-                    (void *provctx))
+                    (void *dctx, void *provctx))
 OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, digest_gettable_ctx_params,
-                    (void *provctx))
+                    (void *dctx, void *provctx))
 
 /* Symmetric Ciphers */
 
@@ -315,9 +315,9 @@ OSSL_CORE_MAKE_FUNC(int, cipher_set_ctx_params, (void *cctx,
 OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, cipher_gettable_params,
                     (void *provctx))
 OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, cipher_settable_ctx_params,
-                    (void *provctx))
+                    (void *cctx, void *provctx))
 OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, cipher_gettable_ctx_params,
-                    (void *provctx))
+                    (void *cctx, void *provctx))
 
 /* MACs */
 
@@ -345,9 +345,9 @@ OSSL_CORE_MAKE_FUNC(int, mac_final,
                      unsigned char *out, size_t *outl, size_t outsize))
 OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, mac_gettable_params, (void *provctx))
 OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, mac_gettable_ctx_params,
-                    (void *provctx))
+                    (void *mctx, void *provctx))
 OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, mac_settable_ctx_params,
-                    (void *provctx))
+                    (void *mctx, void *provctx))
 OSSL_CORE_MAKE_FUNC(int, mac_get_params, (OSSL_PARAM params[]))
 OSSL_CORE_MAKE_FUNC(int, mac_get_ctx_params,
                     (void *mctx, OSSL_PARAM params[]))
@@ -376,9 +376,9 @@ OSSL_CORE_MAKE_FUNC(int, kdf_derive, (void *kctx, unsigned char *key,
                                           size_t keylen))
 OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, kdf_gettable_params, (void *provctx))
 OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, kdf_gettable_ctx_params,
-                    (void *provctx))
+                    (void *kctx, void *provctx))
 OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, kdf_settable_ctx_params,
-                    (void *provctx))
+                    (void *kctx, void *provctx))
 OSSL_CORE_MAKE_FUNC(int, kdf_get_params, (OSSL_PARAM params[]))
 OSSL_CORE_MAKE_FUNC(int, kdf_get_ctx_params,
                     (void *kctx, OSSL_PARAM params[]))
@@ -432,9 +432,9 @@ OSSL_CORE_MAKE_FUNC(int,rand_lock, (void *vctx))
 OSSL_CORE_MAKE_FUNC(void,rand_unlock, (void *vctx))
 OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,rand_gettable_params, (void *provctx))
 OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,rand_gettable_ctx_params,
-                    (void *provctx))
+                    (void *vctx, void *provctx))
 OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,rand_settable_ctx_params,
-                    (void *provctx))
+                    (void *vctx, void *provctx))
 OSSL_CORE_MAKE_FUNC(int,rand_get_params, (OSSL_PARAM params[]))
 OSSL_CORE_MAKE_FUNC(int,rand_get_ctx_params,
                     (void *vctx, OSSL_PARAM params[]))
diff --git a/include/openssl/evp.h b/include/openssl/evp.h
index 38cfefd10b..6a2202d954 100644
--- a/include/openssl/evp.h
+++ b/include/openssl/evp.h
@@ -816,6 +816,8 @@ int EVP_CIPHER_CTX_get_params(EVP_CIPHER_CTX *ctx, OSSL_PARAM params[]);
 const OSSL_PARAM *EVP_CIPHER_gettable_params(const EVP_CIPHER *cipher);
 const OSSL_PARAM *EVP_CIPHER_settable_ctx_params(const EVP_CIPHER *cipher);
 const OSSL_PARAM *EVP_CIPHER_gettable_ctx_params(const EVP_CIPHER *cipher);
+const OSSL_PARAM *EVP_CIPHER_CTX_settable_params(EVP_CIPHER_CTX *ctx);
+const OSSL_PARAM *EVP_CIPHER_CTX_gettable_params(EVP_CIPHER_CTX *ctx);
 
 const BIO_METHOD *BIO_f_md(void);
 const BIO_METHOD *BIO_f_base64(void);
@@ -1149,6 +1151,8 @@ int EVP_MAC_final(EVP_MAC_CTX *ctx,
 const OSSL_PARAM *EVP_MAC_gettable_params(const EVP_MAC *mac);
 const OSSL_PARAM *EVP_MAC_gettable_ctx_params(const EVP_MAC *mac);
 const OSSL_PARAM *EVP_MAC_settable_ctx_params(const EVP_MAC *mac);
+const OSSL_PARAM *EVP_MAC_CTX_gettable_params(EVP_MAC_CTX *ctx);
+const OSSL_PARAM *EVP_MAC_CTX_settable_params(EVP_MAC_CTX *ctx);
 
 void EVP_MAC_do_all_provided(OSSL_LIB_CTX *libctx,
                              void (*fn)(EVP_MAC *mac, void *arg),
@@ -1176,6 +1180,8 @@ int EVP_RAND_set_ctx_params(EVP_RAND_CTX *ctx, const OSSL_PARAM params[]);
 const OSSL_PARAM *EVP_RAND_gettable_params(const EVP_RAND *rand);
 const OSSL_PARAM *EVP_RAND_gettable_ctx_params(const EVP_RAND *rand);
 const OSSL_PARAM *EVP_RAND_settable_ctx_params(const EVP_RAND *rand);
+const OSSL_PARAM *EVP_RAND_CTX_gettable_params(EVP_RAND_CTX *ctx);
+const OSSL_PARAM *EVP_RAND_CTX_settable_params(EVP_RAND_CTX *ctx);
 
 void EVP_RAND_do_all_provided(OSSL_LIB_CTX *libctx,
                               void (*fn)(EVP_RAND *rand, void *arg),
diff --git a/include/openssl/kdf.h b/include/openssl/kdf.h
index 37c1736a8c..f1bc9a7709 100644
--- a/include/openssl/kdf.h
+++ b/include/openssl/kdf.h
@@ -48,6 +48,8 @@ int EVP_KDF_CTX_set_params(EVP_KDF_CTX *ctx, const OSSL_PARAM params[]);
 const OSSL_PARAM *EVP_KDF_gettable_params(const EVP_KDF *kdf);
 const OSSL_PARAM *EVP_KDF_gettable_ctx_params(const EVP_KDF *kdf);
 const OSSL_PARAM *EVP_KDF_settable_ctx_params(const EVP_KDF *kdf);
+const OSSL_PARAM *EVP_KDF_CTX_gettable_params(EVP_KDF_CTX *ctx);
+const OSSL_PARAM *EVP_KDF_CTX_settable_params(EVP_KDF_CTX *ctx);
 
 void EVP_KDF_do_all_provided(OSSL_LIB_CTX *libctx,
                              void (*fn)(EVP_KDF *kdf, void *arg),
diff --git a/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.c b/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.c
index abefc20ab2..b78687ceae 100644
--- a/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.c
+++ b/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.c
@@ -59,7 +59,8 @@ static const OSSL_PARAM cipher_aes_known_settable_ctx_params[] = {
     OSSL_PARAM_size_t(OSSL_CIPHER_PARAM_KEYLEN, NULL),
     OSSL_PARAM_END
 };
-const OSSL_PARAM *aes_settable_ctx_params(ossl_unused void *provctx)
+const OSSL_PARAM *aes_settable_ctx_params(ossl_unused void *cctx,
+                                          ossl_unused void *provctx)
 {
     return cipher_aes_known_settable_ctx_params;
 }
@@ -278,7 +279,8 @@ static const OSSL_PARAM cipher_aes_known_gettable_ctx_params[] = {
     OSSL_PARAM_octet_string(OSSL_CIPHER_PARAM_UPDATED_IV, NULL, 0),
     OSSL_PARAM_END
 };
-const OSSL_PARAM *aes_gettable_ctx_params(ossl_unused void *provctx)
+const OSSL_PARAM *aes_gettable_ctx_params(ossl_unused void *cctx,
+                                          ossl_unused void *provctx)
 {
     return cipher_aes_known_gettable_ctx_params;
 }
diff --git a/providers/implementations/ciphers/cipher_aes_ocb.c b/providers/implementations/ciphers/cipher_aes_ocb.c
index 69ee9f2cc5..627f146273 100644
--- a/providers/implementations/ciphers/cipher_aes_ocb.c
+++ b/providers/implementations/ciphers/cipher_aes_ocb.c
@@ -469,7 +469,8 @@ static const OSSL_PARAM cipher_ocb_known_gettable_ctx_params[] = {
     OSSL_PARAM_octet_string(OSSL_CIPHER_PARAM_AEAD_TAG, NULL, 0),
     OSSL_PARAM_END
 };
-static const OSSL_PARAM *cipher_ocb_gettable_ctx_params(ossl_unused void *p_ctx)
+static const OSSL_PARAM *cipher_ocb_gettable_ctx_params(ossl_unused void *cctx,
+                                                        ossl_unused void *p_ctx)
 {
     return cipher_ocb_known_gettable_ctx_params;
 }
@@ -480,7 +481,8 @@ static const OSSL_PARAM cipher_ocb_known_settable_ctx_params[] = {
     OSSL_PARAM_octet_string(OSSL_CIPHER_PARAM_AEAD_TAG, NULL, 0),
     OSSL_PARAM_END
 };
-static const OSSL_PARAM *cipher_ocb_settable_ctx_params(ossl_unused void *p_ctx)
+static const OSSL_PARAM *cipher_ocb_settable_ctx_params(ossl_unused void *cctx,
+                                                        ossl_unused void *p_ctx)
 {
     return cipher_ocb_known_settable_ctx_params;
 }
diff --git a/providers/implementations/ciphers/cipher_aes_siv.c b/providers/implementations/ciphers/cipher_aes_siv.c
index 25409bf0a8..9a75f6f5b7 100644
--- a/providers/implementations/ciphers/cipher_aes_siv.c
+++ b/providers/implementations/ciphers/cipher_aes_siv.c
@@ -183,7 +183,8 @@ static const OSSL_PARAM aes_siv_known_gettable_ctx_params[] = {
     OSSL_PARAM_octet_string(OSSL_CIPHER_PARAM_AEAD_TAG, NULL, 0),
     OSSL_PARAM_END
 };
-static const OSSL_PARAM *aes_siv_gettable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *aes_siv_gettable_ctx_params(ossl_unused void *cctx,
+                                                     ossl_unused void *provctx)
 {
     return aes_siv_known_gettable_ctx_params;
 }
@@ -233,7 +234,8 @@ static const OSSL_PARAM aes_siv_known_settable_ctx_params[] = {
     OSSL_PARAM_octet_string(OSSL_CIPHER_PARAM_AEAD_TAG, NULL, 0),
     OSSL_PARAM_END
 };
-static const OSSL_PARAM *aes_siv_settable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *aes_siv_settable_ctx_params(ossl_unused void *cctx,
+                                                     ossl_unused void *provctx)
 {
     return aes_siv_known_settable_ctx_params;
 }
@@ -248,7 +250,6 @@ static OSSL_FUNC_cipher_update_fn lc##_stream_update;                          \
 static OSSL_FUNC_cipher_final_fn lc##_stream_final;                            \
 static OSSL_FUNC_cipher_cipher_fn lc##_cipher;                                 \
 static OSSL_FUNC_cipher_get_params_fn alg##_##kbits##_##lc##_get_params;       \
-static OSSL_FUNC_cipher_gettable_params_fn alg##_##lc##_gettable_ctx_params;   \
 static OSSL_FUNC_cipher_get_ctx_params_fn alg##_##lc##_get_ctx_params;         \
 static OSSL_FUNC_cipher_gettable_ctx_params_fn                                 \
             alg##_##lc##_gettable_ctx_params;                                  \
diff --git a/providers/implementations/ciphers/cipher_aes_xts.c b/providers/implementations/ciphers/cipher_aes_xts.c
index e4b18b2719..13552b2a76 100644
--- a/providers/implementations/ciphers/cipher_aes_xts.c
+++ b/providers/implementations/ciphers/cipher_aes_xts.c
@@ -218,7 +218,8 @@ static const OSSL_PARAM aes_xts_known_settable_ctx_params[] = {
     OSSL_PARAM_END
 };
 
-static const OSSL_PARAM *aes_xts_settable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *aes_xts_settable_ctx_params(ossl_unused void *cctx,
+                                                     ossl_unused void *provctx)
 {
     return aes_xts_known_settable_ctx_params;
 }
diff --git a/providers/implementations/ciphers/cipher_chacha20.c b/providers/implementations/ciphers/cipher_chacha20.c
index bee1bb925b..9bce5b0914 100644
--- a/providers/implementations/ciphers/cipher_chacha20.c
+++ b/providers/implementations/ciphers/cipher_chacha20.c
@@ -95,7 +95,8 @@ static const OSSL_PARAM chacha20_known_gettable_ctx_params[] = {
     OSSL_PARAM_size_t(OSSL_CIPHER_PARAM_IVLEN, NULL),
     OSSL_PARAM_END
 };
-const OSSL_PARAM *chacha20_gettable_ctx_params(ossl_unused void *provctx)
+const OSSL_PARAM *chacha20_gettable_ctx_params(ossl_unused void *cctx,
+                                               ossl_unused void *provctx)
 {
     return chacha20_known_gettable_ctx_params;
 }
@@ -135,7 +136,8 @@ static const OSSL_PARAM chacha20_known_settable_ctx_params[] = {
     OSSL_PARAM_size_t(OSSL_CIPHER_PARAM_IVLEN, NULL),
     OSSL_PARAM_END
 };
-const OSSL_PARAM *chacha20_settable_ctx_params(ossl_unused void *provctx)
+const OSSL_PARAM *chacha20_settable_ctx_params(ossl_unused void *cctx,
+                                               ossl_unused void *provctx)
 {
     return chacha20_known_settable_ctx_params;
 }
diff --git a/providers/implementations/ciphers/cipher_chacha20_poly1305.c b/providers/implementations/ciphers/cipher_chacha20_poly1305.c
index 5d9ffad801..78ede20b44 100644
--- a/providers/implementations/ciphers/cipher_chacha20_poly1305.c
+++ b/providers/implementations/ciphers/cipher_chacha20_poly1305.c
@@ -135,7 +135,7 @@ static const OSSL_PARAM chacha20_poly1305_known_gettable_ctx_params[] = {
     OSSL_PARAM_END
 };
 static const OSSL_PARAM *chacha20_poly1305_gettable_ctx_params
-    (ossl_unused void *provctx)
+    (ossl_unused void *cctx, ossl_unused void *provctx)
 {
     return chacha20_poly1305_known_gettable_ctx_params;
 }
diff --git a/providers/implementations/ciphers/cipher_null.c b/providers/implementations/ciphers/cipher_null.c
index 9d33a26f8d..00c97aad7a 100644
--- a/providers/implementations/ciphers/cipher_null.c
+++ b/providers/implementations/ciphers/cipher_null.c
@@ -111,7 +111,8 @@ static const OSSL_PARAM null_known_gettable_ctx_params[] = {
 };
 
 static OSSL_FUNC_cipher_gettable_ctx_params_fn null_gettable_ctx_params;
-static const OSSL_PARAM *null_gettable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *null_gettable_ctx_params(ossl_unused void *cctx,
+                                                  ossl_unused void *provctx)
 {
     return null_known_gettable_ctx_params;
 }
@@ -147,7 +148,8 @@ static const OSSL_PARAM null_known_settable_ctx_params[] = {
 };
 
 static OSSL_FUNC_cipher_settable_ctx_params_fn null_settable_ctx_params;
-static const OSSL_PARAM *null_settable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *null_settable_ctx_params(ossl_unused void *cctx,
+                                                  ossl_unused void *provctx)
 {
     return null_known_settable_ctx_params;
 }
diff --git a/providers/implementations/ciphers/cipher_rc4_hmac_md5.c b/providers/implementations/ciphers/cipher_rc4_hmac_md5.c
index c69b9aecb8..533820cd80 100644
--- a/providers/implementations/ciphers/cipher_rc4_hmac_md5.c
+++ b/providers/implementations/ciphers/cipher_rc4_hmac_md5.c
@@ -77,7 +77,8 @@ static const OSSL_PARAM rc4_hmac_md5_known_gettable_ctx_params[] = {
     OSSL_PARAM_size_t(OSSL_CIPHER_PARAM_AEAD_TLS1_AAD_PAD, NULL),
     OSSL_PARAM_END
 };
-const OSSL_PARAM *rc4_hmac_md5_gettable_ctx_params(ossl_unused void *provctx)
+const OSSL_PARAM *rc4_hmac_md5_gettable_ctx_params(ossl_unused void *cctx,
+                                                   ossl_unused void *provctx)
 {
     return rc4_hmac_md5_known_gettable_ctx_params;
 }
@@ -112,7 +113,8 @@ static const OSSL_PARAM rc4_hmac_md5_known_settable_ctx_params[] = {
     OSSL_PARAM_octet_string(OSSL_CIPHER_PARAM_AEAD_TLS1_AAD, NULL, 0),
     OSSL_PARAM_END
 };
-const OSSL_PARAM *rc4_hmac_md5_settable_ctx_params(ossl_unused void *provctx)
+const OSSL_PARAM *rc4_hmac_md5_settable_ctx_params(ossl_unused void *cctx,
+                                                   ossl_unused void *provctx)
 {
     return rc4_hmac_md5_known_settable_ctx_params;
 }
diff --git a/providers/implementations/ciphers/ciphercommon.c b/providers/implementations/ciphers/ciphercommon.c
index b32f564bf7..3d2fb5b8f8 100644
--- a/providers/implementations/ciphers/ciphercommon.c
+++ b/providers/implementations/ciphers/ciphercommon.c
@@ -33,7 +33,7 @@ static const OSSL_PARAM cipher_known_gettable_params[] = {
     { OSSL_CIPHER_PARAM_TLS_MAC, OSSL_PARAM_OCTET_PTR, NULL, 0, OSSL_PARAM_UNMODIFIED },
     OSSL_PARAM_END
 };
-const OSSL_PARAM *ossl_cipher_generic_gettable_params(void *provctx)
+const OSSL_PARAM *ossl_cipher_generic_gettable_params(ossl_unused void *provctx)
 {
     return cipher_known_gettable_params;
 }
@@ -141,7 +141,7 @@ static const OSSL_PARAM cipher_aead_known_gettable_ctx_params[] = {
     OSSL_PARAM_END
 };
 const OSSL_PARAM *ossl_cipher_aead_gettable_ctx_params(
-        ossl_unused void *provctx
+        ossl_unused void *cctx, ossl_unused void *provctx
     )
 {
     return cipher_aead_known_gettable_ctx_params;
@@ -156,7 +156,7 @@ static const OSSL_PARAM cipher_aead_known_settable_ctx_params[] = {
     OSSL_PARAM_END
 };
 const OSSL_PARAM *ossl_cipher_aead_settable_ctx_params(
-        ossl_unused void *provctx
+        ossl_unused void *cctx, ossl_unused void *provctx
     )
 {
     return cipher_aead_known_settable_ctx_params;
diff --git a/providers/implementations/digests/md5_sha1_prov.c b/providers/implementations/digests/md5_sha1_prov.c
index d96b72676b..d05a7e7d85 100644
--- a/providers/implementations/digests/md5_sha1_prov.c
+++ b/providers/implementations/digests/md5_sha1_prov.c
@@ -30,7 +30,8 @@ static const OSSL_PARAM known_md5_sha1_settable_ctx_params[] = {
     OSSL_PARAM_END
 };
 
-static const OSSL_PARAM *md5_sha1_settable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *md5_sha1_settable_ctx_params(ossl_unused void *ctx,
+                                                      ossl_unused void *provctx)
 {
     return known_md5_sha1_settable_ctx_params;
 }
diff --git a/providers/implementations/digests/mdc2_prov.c b/providers/implementations/digests/mdc2_prov.c
index 91f123d55f..edd73ed89e 100644
--- a/providers/implementations/digests/mdc2_prov.c
+++ b/providers/implementations/digests/mdc2_prov.c
@@ -30,7 +30,8 @@ static const OSSL_PARAM known_mdc2_settable_ctx_params[] = {
     OSSL_PARAM_END
 };
 
-static const OSSL_PARAM *mdc2_settable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *mdc2_settable_ctx_params(ossl_unused void *ctx,
+                                                  ossl_unused void *provctx)
 {
     return known_mdc2_settable_ctx_params;
 }
diff --git a/providers/implementations/digests/sha2_prov.c b/providers/implementations/digests/sha2_prov.c
index 45fa643ed5..96f4cc7004 100644
--- a/providers/implementations/digests/sha2_prov.c
+++ b/providers/implementations/digests/sha2_prov.c
@@ -33,7 +33,8 @@ static const OSSL_PARAM known_sha1_settable_ctx_params[] = {
     {OSSL_DIGEST_PARAM_SSL3_MS, OSSL_PARAM_OCTET_STRING, NULL, 0, 0},
     OSSL_PARAM_END
 };
-static const OSSL_PARAM *sha1_settable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *sha1_settable_ctx_params(ossl_unused void *ctx,
+                                                  ossl_unused void *provctx)
 {
     return known_sha1_settable_ctx_params;
 }
diff --git a/providers/implementations/digests/sha3_prov.c b/providers/implementations/digests/sha3_prov.c
index d4d3befa5e..c8c5df41ed 100644
--- a/providers/implementations/digests/sha3_prov.c
+++ b/providers/implementations/digests/sha3_prov.c
@@ -265,7 +265,8 @@ static const OSSL_PARAM known_shake_settable_ctx_params[] = {
     {OSSL_DIGEST_PARAM_XOFLEN, OSSL_PARAM_UNSIGNED_INTEGER, NULL, 0, 0},
     OSSL_PARAM_END
 };
-static const OSSL_PARAM *shake_settable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *shake_settable_ctx_params(ossl_unused void *ctx,
+                                                   ossl_unused void *provctx)
 {
     return known_shake_settable_ctx_params;
 }
diff --git a/providers/implementations/include/prov/ciphercommon.h b/providers/implementations/include/prov/ciphercommon.h
index c0d7a04b24..d5212c3c81 100644
--- a/providers/implementations/include/prov/ciphercommon.h
+++ b/providers/implementations/include/prov/ciphercommon.h
@@ -333,7 +333,8 @@ static const OSSL_PARAM name##_known_gettable_ctx_params[] = {                 \
 #define CIPHER_DEFAULT_GETTABLE_CTX_PARAMS_END(name)                           \
     OSSL_PARAM_END                                                             \
 };                                                                             \
-const OSSL_PARAM * name##_gettable_ctx_params(ossl_unused void *provctx)       \
+const OSSL_PARAM * name##_gettable_ctx_params(ossl_unused void *cctx,          \
+                                              ossl_unused void *provctx)       \
 {                                                                              \
     return name##_known_gettable_ctx_params;                                   \
 }
@@ -345,7 +346,8 @@ static const OSSL_PARAM name##_known_settable_ctx_params[] = {                 \
 #define CIPHER_DEFAULT_SETTABLE_CTX_PARAMS_END(name)                           \
     OSSL_PARAM_END                                                             \
 };                                                                             \
-const OSSL_PARAM * name##_settable_ctx_params(ossl_unused void *provctx)       \
+const OSSL_PARAM * name##_settable_ctx_params(ossl_unused void *cctx,          \
+                                              ossl_unused void *provctx)       \
 {                                                                              \
     return name##_known_settable_ctx_params;                                   \
 }
diff --git a/providers/implementations/kdfs/hkdf.c b/providers/implementations/kdfs/hkdf.c
index aae923b1db..b24b745216 100644
--- a/providers/implementations/kdfs/hkdf.c
+++ b/providers/implementations/kdfs/hkdf.c
@@ -237,7 +237,8 @@ static int kdf_hkdf_set_ctx_params(void *vctx, const OSSL_PARAM params[])
     return 1;
 }
 
-static const OSSL_PARAM *kdf_hkdf_settable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *kdf_hkdf_settable_ctx_params(ossl_unused void *ctx,
+                                                      ossl_unused void *provctx)
 {
     static const OSSL_PARAM known_settable_ctx_params[] = {
         OSSL_PARAM_utf8_string(OSSL_KDF_PARAM_MODE, NULL, 0),
@@ -262,7 +263,8 @@ static int kdf_hkdf_get_ctx_params(void *vctx, OSSL_PARAM params[])
     return -2;
 }
 
-static const OSSL_PARAM *kdf_hkdf_gettable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *kdf_hkdf_gettable_ctx_params(ossl_unused void *ctx,
+                                                      ossl_unused void *provctx)
 {
     static const OSSL_PARAM known_gettable_ctx_params[] = {
         OSSL_PARAM_size_t(OSSL_KDF_PARAM_SIZE, NULL),
diff --git a/providers/implementations/kdfs/kbkdf.c b/providers/implementations/kdfs/kbkdf.c
index 1dfae38d37..26235e400b 100644
--- a/providers/implementations/kdfs/kbkdf.c
+++ b/providers/implementations/kdfs/kbkdf.c
@@ -343,7 +343,8 @@ static int kbkdf_set_ctx_params(void *vctx, const OSSL_PARAM params[])
     return 1;
 }
 
-static const OSSL_PARAM *kbkdf_settable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *kbkdf_settable_ctx_params(ossl_unused void *ctx,
+                                                   ossl_unused void *provctx)
 {
     static const OSSL_PARAM known_settable_ctx_params[] = {
         OSSL_PARAM_octet_string(OSSL_KDF_PARAM_INFO, NULL, 0),
@@ -374,7 +375,8 @@ static int kbkdf_get_ctx_params(void *vctx, OSSL_PARAM params[])
     return OSSL_PARAM_set_size_t(p, SIZE_MAX);
 }
 
-static const OSSL_PARAM *kbkdf_gettable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *kbkdf_gettable_ctx_params(ossl_unused void *ctx,
+                                                   ossl_unused void *provctx)
 {
     static const OSSL_PARAM known_gettable_ctx_params[] =
         { OSSL_PARAM_size_t(OSSL_KDF_PARAM_SIZE, NULL), OSSL_PARAM_END };
diff --git a/providers/implementations/kdfs/krb5kdf.c b/providers/implementations/kdfs/krb5kdf.c
index a928edbb0c..35d6ccb680 100644
--- a/providers/implementations/kdfs/krb5kdf.c
+++ b/providers/implementations/kdfs/krb5kdf.c
@@ -151,7 +151,8 @@ static int krb5kdf_set_ctx_params(void *vctx, const OSSL_PARAM params[])
     return 1;
 }
 
-static const OSSL_PARAM *krb5kdf_settable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *krb5kdf_settable_ctx_params(ossl_unused void *ctx,
+                                                     ossl_unused void *provctx)
 {
     static const OSSL_PARAM known_settable_ctx_params[] = {
         OSSL_PARAM_utf8_string(OSSL_KDF_PARAM_PROPERTIES, NULL, 0),
@@ -181,7 +182,8 @@ static int krb5kdf_get_ctx_params(void *vctx, OSSL_PARAM params[])
     return -2;
 }
 
-static const OSSL_PARAM *krb5kdf_gettable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *krb5kdf_gettable_ctx_params(ossl_unused void *ctx,
+                                                     ossl_unused void *provctx)
 {
     static const OSSL_PARAM known_gettable_ctx_params[] = {
         OSSL_PARAM_size_t(OSSL_KDF_PARAM_SIZE, NULL),
diff --git a/providers/implementations/kdfs/pbkdf2.c b/providers/implementations/kdfs/pbkdf2.c
index a7f52f0756..9d993dc545 100644
--- a/providers/implementations/kdfs/pbkdf2.c
+++ b/providers/implementations/kdfs/pbkdf2.c
@@ -208,7 +208,8 @@ static int kdf_pbkdf2_set_ctx_params(void *vctx, const OSSL_PARAM params[])
     return 1;
 }
 
-static const OSSL_PARAM *kdf_pbkdf2_settable_ctx_params(ossl_unused void *p_ctx)
+static const OSSL_PARAM *kdf_pbkdf2_settable_ctx_params(ossl_unused void *ctx,
+                                                        ossl_unused void *p_ctx)
 {
     static const OSSL_PARAM known_settable_ctx_params[] = {
         OSSL_PARAM_utf8_string(OSSL_KDF_PARAM_PROPERTIES, NULL, 0),
@@ -231,7 +232,8 @@ static int kdf_pbkdf2_get_ctx_params(void *vctx, OSSL_PARAM params[])
     return -2;
 }
 
-static const OSSL_PARAM *kdf_pbkdf2_gettable_ctx_params(ossl_unused void *p_ctx)
+static const OSSL_PARAM *kdf_pbkdf2_gettable_ctx_params(ossl_unused void *ctx,
+                                                        ossl_unused void *p_ctx)
 {
     static const OSSL_PARAM known_gettable_ctx_params[] = {
         OSSL_PARAM_size_t(OSSL_KDF_PARAM_SIZE, NULL),
diff --git a/providers/implementations/kdfs/pkcs12kdf.c b/providers/implementations/kdfs/pkcs12kdf.c
index 67506c64ba..ce49c2844c 100644
--- a/providers/implementations/kdfs/pkcs12kdf.c
+++ b/providers/implementations/kdfs/pkcs12kdf.c
@@ -246,7 +246,8 @@ static int kdf_pkcs12_set_ctx_params(void *vctx, const OSSL_PARAM params[])
     return 1;
 }
 
-static const OSSL_PARAM *kdf_pkcs12_settable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *kdf_pkcs12_settable_ctx_params(
+        ossl_unused void *ctx, ossl_unused void *provctx)
 {
     static const OSSL_PARAM known_settable_ctx_params[] = {
         OSSL_PARAM_utf8_string(OSSL_KDF_PARAM_PROPERTIES, NULL, 0),
@@ -269,7 +270,8 @@ static int kdf_pkcs12_get_ctx_params(void *vctx, OSSL_PARAM params[])
     return -2;
 }
 
-static const OSSL_PARAM *kdf_pkcs12_gettable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *kdf_pkcs12_gettable_ctx_params(
+        ossl_unused void *ctx, ossl_unused void *provctx)
 {
     static const OSSL_PARAM known_gettable_ctx_params[] = {
         OSSL_PARAM_size_t(OSSL_KDF_PARAM_SIZE, NULL),
diff --git a/providers/implementations/kdfs/scrypt.c b/providers/implementations/kdfs/scrypt.c
index 207120fc77..de53d3e129 100644
--- a/providers/implementations/kdfs/scrypt.c
+++ b/providers/implementations/kdfs/scrypt.c
@@ -233,7 +233,8 @@ static int kdf_scrypt_set_ctx_params(void *vctx, const OSSL_PARAM params[])
     return 1;
 }
 
-static const OSSL_PARAM *kdf_scrypt_settable_ctx_params(ossl_unused void *p_ctx)
+static const OSSL_PARAM *kdf_scrypt_settable_ctx_params(ossl_unused void *ctx,
+                                                        ossl_unused void *p_ctx)
 {
     static const OSSL_PARAM known_settable_ctx_params[] = {
         OSSL_PARAM_octet_string(OSSL_KDF_PARAM_PASSWORD, NULL, 0),
@@ -257,7 +258,8 @@ static int kdf_scrypt_get_ctx_params(void *vctx, OSSL_PARAM params[])
     return -2;
 }
 
-static const OSSL_PARAM *kdf_scrypt_gettable_ctx_params(ossl_unused void *p_ctx)
+static const OSSL_PARAM *kdf_scrypt_gettable_ctx_params(ossl_unused void *ctx,
+                                                        ossl_unused void *p_ctx)
 {
     static const OSSL_PARAM known_gettable_ctx_params[] = {
         OSSL_PARAM_size_t(OSSL_KDF_PARAM_SIZE, NULL),
diff --git a/providers/implementations/kdfs/sshkdf.c b/providers/implementations/kdfs/sshkdf.c
index cc8f946390..90b7666450 100644
--- a/providers/implementations/kdfs/sshkdf.c
+++ b/providers/implementations/kdfs/sshkdf.c
@@ -171,7 +171,8 @@ static int kdf_sshkdf_set_ctx_params(void *vctx, const OSSL_PARAM params[])
     return 1;
 }
 
-static const OSSL_PARAM *kdf_sshkdf_settable_ctx_params(ossl_unused void *p_ctx)
+static const OSSL_PARAM *kdf_sshkdf_settable_ctx_params(ossl_unused void *ctx,
+                                                        ossl_unused void *p_ctx)
 {
     static const OSSL_PARAM known_settable_ctx_params[] = {
         OSSL_PARAM_utf8_string(OSSL_KDF_PARAM_PROPERTIES, NULL, 0),
@@ -194,7 +195,8 @@ static int kdf_sshkdf_get_ctx_params(void *vctx, OSSL_PARAM params[])
     return -2;
 }
 
-static const OSSL_PARAM *kdf_sshkdf_gettable_ctx_params(ossl_unused void *p_ctx)
+static const OSSL_PARAM *kdf_sshkdf_gettable_ctx_params(ossl_unused void *ctx,
+                                                        ossl_unused void *p_ctx)
 {
     static const OSSL_PARAM known_gettable_ctx_params[] = {
         OSSL_PARAM_size_t(OSSL_KDF_PARAM_SIZE, NULL),
diff --git a/providers/implementations/kdfs/sskdf.c b/providers/implementations/kdfs/sskdf.c
index e9f530a9ff..bc0b49c561 100644
--- a/providers/implementations/kdfs/sskdf.c
+++ b/providers/implementations/kdfs/sskdf.c
@@ -484,7 +484,8 @@ static int sskdf_set_ctx_params(void *vctx, const OSSL_PARAM params[])
     return 1;
 }
 
-static const OSSL_PARAM *sskdf_settable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *sskdf_settable_ctx_params(ossl_unused void *ctx,
+                                                   ossl_unused void *provctx)
 {
     static const OSSL_PARAM known_settable_ctx_params[] = {
         OSSL_PARAM_octet_string(OSSL_KDF_PARAM_SECRET, NULL, 0),
@@ -510,7 +511,8 @@ static int sskdf_get_ctx_params(void *vctx, OSSL_PARAM params[])
     return -2;
 }
 
-static const OSSL_PARAM *sskdf_gettable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *sskdf_gettable_ctx_params(ossl_unused void *ctx,
+                                                   ossl_unused void *provctx)
 {
     static const OSSL_PARAM known_gettable_ctx_params[] = {
         OSSL_PARAM_size_t(OSSL_KDF_PARAM_SIZE, NULL),
diff --git a/providers/implementations/kdfs/tls1_prf.c b/providers/implementations/kdfs/tls1_prf.c
index b87cf73596..a3bdc85040 100644
--- a/providers/implementations/kdfs/tls1_prf.c
+++ b/providers/implementations/kdfs/tls1_prf.c
@@ -211,7 +211,8 @@ static int kdf_tls1_prf_set_ctx_params(void *vctx, const OSSL_PARAM params[])
     return 1;
 }
 
-static const OSSL_PARAM *kdf_tls1_prf_settable_ctx_params(ossl_unused void *ctx)
+static const OSSL_PARAM *kdf_tls1_prf_settable_ctx_params(
+        ossl_unused void *ctx, ossl_unused void *provctx)
 {
     static const OSSL_PARAM known_settable_ctx_params[] = {
         OSSL_PARAM_utf8_string(OSSL_KDF_PARAM_PROPERTIES, NULL, 0),
@@ -232,7 +233,8 @@ static int kdf_tls1_prf_get_ctx_params(void *vctx, OSSL_PARAM params[])
     return -2;
 }
 
-static const OSSL_PARAM *kdf_tls1_prf_gettable_ctx_params(ossl_unused void *ctx)
+static const OSSL_PARAM *kdf_tls1_prf_gettable_ctx_params(
+        ossl_unused void *ctx, ossl_unused void *provctx)
 {
     static const OSSL_PARAM known_gettable_ctx_params[] = {
         OSSL_PARAM_size_t(OSSL_KDF_PARAM_SIZE, NULL),
diff --git a/providers/implementations/kdfs/x942kdf.c b/providers/implementations/kdfs/x942kdf.c
index 00ee7cbdce..a220eca80f 100644
--- a/providers/implementations/kdfs/x942kdf.c
+++ b/providers/implementations/kdfs/x942kdf.c
@@ -533,7 +533,8 @@ static int x942kdf_set_ctx_params(void *vctx, const OSSL_PARAM params[])
     return 1;
 }
 
-static const OSSL_PARAM *x942kdf_settable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *x942kdf_settable_ctx_params(ossl_unused void *ctx,
+                                                     ossl_unused void *provctx)
 {
     static const OSSL_PARAM known_settable_ctx_params[] = {
         OSSL_PARAM_utf8_string(OSSL_KDF_PARAM_PROPERTIES, NULL, 0),
@@ -563,7 +564,8 @@ static int x942kdf_get_ctx_params(void *vctx, OSSL_PARAM params[])
     return -2;
 }
 
-static const OSSL_PARAM *x942kdf_gettable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *x942kdf_gettable_ctx_params(ossl_unused void *ctx,
+                                                     ossl_unused void *provctx)
 {
     static const OSSL_PARAM known_gettable_ctx_params[] = {
         OSSL_PARAM_size_t(OSSL_KDF_PARAM_SIZE, NULL),
diff --git a/providers/implementations/macs/blake2_mac_impl.c b/providers/implementations/macs/blake2_mac_impl.c
index d1f4e6331a..4f36991d41 100644
--- a/providers/implementations/macs/blake2_mac_impl.c
+++ b/providers/implementations/macs/blake2_mac_impl.c
@@ -131,7 +131,8 @@ static const OSSL_PARAM known_gettable_ctx_params[] = {
     OSSL_PARAM_size_t(OSSL_MAC_PARAM_SIZE, NULL),
     OSSL_PARAM_END
 };
-static const OSSL_PARAM *blake2_gettable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *blake2_gettable_ctx_params(ossl_unused void *ctx,
+                                                    ossl_unused void *provctx)
 {
     return known_gettable_ctx_params;
 }
@@ -153,7 +154,8 @@ static const OSSL_PARAM known_settable_ctx_params[] = {
     OSSL_PARAM_octet_string(OSSL_MAC_PARAM_SALT, NULL, 0),
     OSSL_PARAM_END
 };
-static const OSSL_PARAM *blake2_mac_settable_ctx_params(ossl_unused void *p_ctx)
+static const OSSL_PARAM *blake2_mac_settable_ctx_params(
+            ossl_unused void *ctx, ossl_unused void *p_ctx)
 {
     return known_settable_ctx_params;
 }
diff --git a/providers/implementations/macs/cmac_prov.c b/providers/implementations/macs/cmac_prov.c
index 9a8b71220f..08c4eebbf3 100644
--- a/providers/implementations/macs/cmac_prov.c
+++ b/providers/implementations/macs/cmac_prov.c
@@ -141,7 +141,8 @@ static const OSSL_PARAM known_gettable_ctx_params[] = {
     OSSL_PARAM_size_t(OSSL_MAC_PARAM_SIZE, NULL),
     OSSL_PARAM_END
 };
-static const OSSL_PARAM *cmac_gettable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *cmac_gettable_ctx_params(ossl_unused void *ctx,
+                                                  ossl_unused void *provctx)
 {
     return known_gettable_ctx_params;
 }
@@ -162,7 +163,8 @@ static const OSSL_PARAM known_settable_ctx_params[] = {
     OSSL_PARAM_octet_string(OSSL_MAC_PARAM_KEY, NULL, 0),
     OSSL_PARAM_END
 };
-static const OSSL_PARAM *cmac_settable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *cmac_settable_ctx_params(ossl_unused void *ctx,
+                                                  ossl_unused void *provctx)
 {
     return known_settable_ctx_params;
 }
diff --git a/providers/implementations/macs/gmac_prov.c b/providers/implementations/macs/gmac_prov.c
index 691d1169b7..3a4600b66a 100644
--- a/providers/implementations/macs/gmac_prov.c
+++ b/providers/implementations/macs/gmac_prov.c
@@ -170,7 +170,8 @@ static const OSSL_PARAM known_settable_ctx_params[] = {
     OSSL_PARAM_octet_string(OSSL_MAC_PARAM_IV, NULL, 0),
     OSSL_PARAM_END
 };
-static const OSSL_PARAM *gmac_settable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *gmac_settable_ctx_params(ossl_unused void *ctx,
+                                                  ossl_unused void *provctx)
 {
     return known_settable_ctx_params;
 }
diff --git a/providers/implementations/macs/hmac_prov.c b/providers/implementations/macs/hmac_prov.c
index 0412aedbef..6d7d3d5118 100644
--- a/providers/implementations/macs/hmac_prov.c
+++ b/providers/implementations/macs/hmac_prov.c
@@ -219,7 +219,8 @@ static const OSSL_PARAM known_gettable_ctx_params[] = {
     OSSL_PARAM_size_t(OSSL_MAC_PARAM_SIZE, NULL),
     OSSL_PARAM_END
 };
-static const OSSL_PARAM *hmac_gettable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *hmac_gettable_ctx_params(ossl_unused void *ctx,
+                                                  ossl_unused void *provctx)
 {
     return known_gettable_ctx_params;
 }
@@ -243,7 +244,8 @@ static const OSSL_PARAM known_settable_ctx_params[] = {
     OSSL_PARAM_size_t(OSSL_MAC_PARAM_TLS_DATA_SIZE, NULL),
     OSSL_PARAM_END
 };
-static const OSSL_PARAM *hmac_settable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *hmac_settable_ctx_params(ossl_unused void *ctx,
+                                                  ossl_unused void *provctx)
 {
     return known_settable_ctx_params;
 }
diff --git a/providers/implementations/macs/kmac_prov.c b/providers/implementations/macs/kmac_prov.c
index d499644f57..76f581ee77 100644
--- a/providers/implementations/macs/kmac_prov.c
+++ b/providers/implementations/macs/kmac_prov.c
@@ -318,7 +318,8 @@ static const OSSL_PARAM known_gettable_ctx_params[] = {
     OSSL_PARAM_size_t(OSSL_MAC_PARAM_SIZE, NULL),
     OSSL_PARAM_END
 };
-static const OSSL_PARAM *kmac_gettable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *kmac_gettable_ctx_params(ossl_unused void *ctx,
+                                                  ossl_unused void *provctx)
 {
     return known_gettable_ctx_params;
 }
@@ -340,7 +341,8 @@ static const OSSL_PARAM known_settable_ctx_params[] = {
     OSSL_PARAM_octet_string(OSSL_MAC_PARAM_CUSTOM, NULL, 0),
     OSSL_PARAM_END
 };
-static const OSSL_PARAM *kmac_settable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *kmac_settable_ctx_params(ossl_unused void *ctx,
+                                                  ossl_unused void *provctx)
 {
     return known_settable_ctx_params;
 }
diff --git a/providers/implementations/macs/poly1305_prov.c b/providers/implementations/macs/poly1305_prov.c
index 27abb58a08..3f784e9c28 100644
--- a/providers/implementations/macs/poly1305_prov.c
+++ b/providers/implementations/macs/poly1305_prov.c
@@ -131,7 +131,8 @@ static const OSSL_PARAM known_settable_ctx_params[] = {
     OSSL_PARAM_octet_string(OSSL_MAC_PARAM_KEY, NULL, 0),
     OSSL_PARAM_END
 };
-static const OSSL_PARAM *poly1305_settable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *poly1305_settable_ctx_params(ossl_unused void *ctx,
+                                                      ossl_unused void *provctx)
 {
     return known_settable_ctx_params;
 }
diff --git a/providers/implementations/macs/siphash_prov.c b/providers/implementations/macs/siphash_prov.c
index 221db4b83b..95a345495e 100644
--- a/providers/implementations/macs/siphash_prov.c
+++ b/providers/implementations/macs/siphash_prov.c
@@ -36,7 +36,7 @@ static OSSL_FUNC_mac_dupctx_fn siphash_dup;
 static OSSL_FUNC_mac_freectx_fn siphash_free;
 static OSSL_FUNC_mac_gettable_ctx_params_fn siphash_gettable_ctx_params;
 static OSSL_FUNC_mac_get_ctx_params_fn siphash_get_ctx_params;
-static OSSL_FUNC_mac_settable_ctx_params_fn siphash_settable_params;
+static OSSL_FUNC_mac_settable_ctx_params_fn siphash_settable_ctx_params;
 static OSSL_FUNC_mac_set_ctx_params_fn siphash_set_params;
 static OSSL_FUNC_mac_init_fn siphash_init;
 static OSSL_FUNC_mac_update_fn siphash_update;
@@ -121,7 +121,8 @@ static const OSSL_PARAM known_gettable_ctx_params[] = {
     OSSL_PARAM_size_t(OSSL_MAC_PARAM_SIZE, NULL),
     OSSL_PARAM_END
 };
-static const OSSL_PARAM *siphash_gettable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *siphash_gettable_ctx_params(ossl_unused void *ctx,
+                                                     ossl_unused void *provctx)
 {
     return known_gettable_ctx_params;
 }
@@ -141,7 +142,9 @@ static const OSSL_PARAM known_settable_ctx_params[] = {
     OSSL_PARAM_octet_string(OSSL_MAC_PARAM_KEY, NULL, 0),
     OSSL_PARAM_END
 };
-static const OSSL_PARAM *siphash_settable_params(void *provctx)
+
+static const OSSL_PARAM *siphash_settable_ctx_params(ossl_unused void *ctx,
+                                                     void *provctx)
 {
     return known_settable_ctx_params;
 }
@@ -177,7 +180,7 @@ const OSSL_DISPATCH ossl_siphash_functions[] = {
       (void (*)(void))siphash_gettable_ctx_params },
     { OSSL_FUNC_MAC_GET_CTX_PARAMS, (void (*)(void))siphash_get_ctx_params },
     { OSSL_FUNC_MAC_SETTABLE_CTX_PARAMS,
-      (void (*)(void))siphash_settable_params },
+      (void (*)(void))siphash_settable_ctx_params },
     { OSSL_FUNC_MAC_SET_CTX_PARAMS, (void (*)(void))siphash_set_params },
     { 0, NULL }
 };
diff --git a/providers/implementations/rands/drbg_ctr.c b/providers/implementations/rands/drbg_ctr.c
index e10b4378b5..066775aa52 100644
--- a/providers/implementations/rands/drbg_ctr.c
+++ b/providers/implementations/rands/drbg_ctr.c
@@ -648,7 +648,8 @@ static int drbg_ctr_get_ctx_params(void *vdrbg, OSSL_PARAM params[])
     return ossl_drbg_get_ctx_params(drbg, params);
 }
 
-static const OSSL_PARAM *drbg_ctr_gettable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *drbg_ctr_gettable_ctx_params(ossl_unused void *vctx,
+                                                      ossl_unused void *provctx)
 {
     static const OSSL_PARAM known_gettable_ctx_params[] = {
         OSSL_PARAM_utf8_string(OSSL_DRBG_PARAM_CIPHER, NULL, 0),
@@ -718,7 +719,8 @@ static int drbg_ctr_set_ctx_params(void *vctx, const OSSL_PARAM params[])
     return ossl_drbg_set_ctx_params(ctx, params);
 }
 
-static const OSSL_PARAM *drbg_ctr_settable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *drbg_ctr_settable_ctx_params(ossl_unused void *vctx,
+                                                      ossl_unused void *provctx)
 {
     static const OSSL_PARAM known_settable_ctx_params[] = {
         OSSL_PARAM_utf8_string(OSSL_DRBG_PARAM_PROPERTIES, NULL, 0),
diff --git a/providers/implementations/rands/drbg_hash.c b/providers/implementations/rands/drbg_hash.c
index a181b8f97e..c89b0cd5c3 100644
--- a/providers/implementations/rands/drbg_hash.c
+++ b/providers/implementations/rands/drbg_hash.c
@@ -442,7 +442,8 @@ static int drbg_hash_get_ctx_params(void *vdrbg, OSSL_PARAM params[])
     return ossl_drbg_get_ctx_params(drbg, params);
 }
 
-static const OSSL_PARAM *drbg_hash_gettable_ctx_params(ossl_unused void *p_ctx)
+static const OSSL_PARAM *drbg_hash_gettable_ctx_params(ossl_unused void *vctx,
+                                                       ossl_unused void *p_ctx)
 {
     static const OSSL_PARAM known_gettable_ctx_params[] = {
         OSSL_PARAM_utf8_string(OSSL_DRBG_PARAM_DIGEST, NULL, 0),
@@ -487,7 +488,8 @@ static int drbg_hash_set_ctx_params(void *vctx, const OSSL_PARAM params[])
     return ossl_drbg_set_ctx_params(ctx, params);
 }
 
-static const OSSL_PARAM *drbg_hash_settable_ctx_params(ossl_unused void *p_ctx)
+static const OSSL_PARAM *drbg_hash_settable_ctx_params(ossl_unused void *vctx,
+                                                       ossl_unused void *p_ctx)
 {
     static const OSSL_PARAM known_settable_ctx_params[] = {
         OSSL_PARAM_utf8_string(OSSL_DRBG_PARAM_PROPERTIES, NULL, 0),
diff --git a/providers/implementations/rands/drbg_hmac.c b/providers/implementations/rands/drbg_hmac.c
index 16c5ae8711..5f193fa57c 100644
--- a/providers/implementations/rands/drbg_hmac.c
+++ b/providers/implementations/rands/drbg_hmac.c
@@ -349,7 +349,8 @@ static int drbg_hmac_get_ctx_params(void *vdrbg, OSSL_PARAM params[])
     return ossl_drbg_get_ctx_params(drbg, params);
 }
 
-static const OSSL_PARAM *drbg_hmac_gettable_ctx_params(ossl_unused void *p_ctx)
+static const OSSL_PARAM *drbg_hmac_gettable_ctx_params(ossl_unused void *vctx,
+                                                       ossl_unused void *p_ctx)
 {
     static const OSSL_PARAM known_gettable_ctx_params[] = {
         OSSL_PARAM_utf8_string(OSSL_DRBG_PARAM_MAC, NULL, 0),
@@ -400,7 +401,8 @@ static int drbg_hmac_set_ctx_params(void *vctx, const OSSL_PARAM params[])
     return ossl_drbg_set_ctx_params(ctx, params);
 }
 
-static const OSSL_PARAM *drbg_hmac_settable_ctx_params(ossl_unused void *p_ctx)
+static const OSSL_PARAM *drbg_hmac_settable_ctx_params(ossl_unused void *vctx,
+                                                       ossl_unused void *p_ctx)
 {
     static const OSSL_PARAM known_settable_ctx_params[] = {
         OSSL_PARAM_utf8_string(OSSL_DRBG_PARAM_PROPERTIES, NULL, 0),
diff --git a/providers/implementations/rands/seed_src.c b/providers/implementations/rands/seed_src.c
index 06364b9074..b87aa0c6cd 100644
--- a/providers/implementations/rands/seed_src.c
+++ b/providers/implementations/rands/seed_src.c
@@ -156,7 +156,8 @@ static int seed_src_get_ctx_params(void *vseed, OSSL_PARAM params[])
     return 1;
 }
 
-static const OSSL_PARAM *seed_src_gettable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *seed_src_gettable_ctx_params(ossl_unused void *vseed,
+                                                      ossl_unused void *provctx)
 {
     static const OSSL_PARAM known_gettable_ctx_params[] = {
         OSSL_PARAM_int(OSSL_RAND_PARAM_STATE, NULL),
diff --git a/providers/implementations/rands/test_rng.c b/providers/implementations/rands/test_rng.c
index a1b847ee78..d28f7e0937 100644
--- a/providers/implementations/rands/test_rng.c
+++ b/providers/implementations/rands/test_rng.c
@@ -163,7 +163,8 @@ static int test_rng_get_ctx_params(void *vtest, OSSL_PARAM params[])
     return 1;
 }
 
-static const OSSL_PARAM *test_rng_gettable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *test_rng_gettable_ctx_params(ossl_unused void *vtest,
+                                                      ossl_unused void *provctx)
 {
     static const OSSL_PARAM known_gettable_ctx_params[] = {
         OSSL_PARAM_int(OSSL_RAND_PARAM_STATE, NULL),
@@ -212,7 +213,8 @@ static int test_rng_set_ctx_params(void *vtest, const OSSL_PARAM params[])
     return 1;
 }
 
-static const OSSL_PARAM *test_rng_settable_ctx_params(ossl_unused void *provctx)
+static const OSSL_PARAM *test_rng_settable_ctx_params(ossl_unused void *vtest,
+                                                      ossl_unused void *provctx)
 {
     static const OSSL_PARAM known_settable_ctx_params[] = {
         OSSL_PARAM_octet_string(OSSL_RAND_PARAM_TEST_ENTROPY, NULL, 0),
diff --git a/test/testutil/fake_random.c b/test/testutil/fake_random.c
index 7e18e72d45..9d9b10feb1 100644
--- a/test/testutil/fake_random.c
+++ b/test/testutil/fake_random.c
@@ -109,7 +109,8 @@ static int fake_rand_get_ctx_params(ossl_unused void *vrng, OSSL_PARAM params[])
     return 1;
 }
 
-static const OSSL_PARAM *fake_rand_gettable_ctx_params(void *vrng)
+static const OSSL_PARAM *fake_rand_gettable_ctx_params(ossl_unused void *vrng,
+                                                       ossl_unused void *provctx)
 {
     static const OSSL_PARAM known_gettable_ctx_params[] = {
         OSSL_PARAM_int(OSSL_RAND_PARAM_STATE, NULL),
diff --git a/util/libcrypto.num b/util/libcrypto.num
index 2f04e81152..aa3071ec30 100644
--- a/util/libcrypto.num
+++ b/util/libcrypto.num
@@ -5302,5 +5302,13 @@ EVP_PKEY_fromdata_settable              ?	3_0_0	EXIST::FUNCTION:
 EVP_PKEY_param_check_quick              ?	3_0_0	EXIST::FUNCTION:
 EVP_PKEY_public_check_quick             ?	3_0_0	EXIST::FUNCTION:
 EVP_PKEY_CTX_is_a                       ?	3_0_0	EXIST::FUNCTION:
+EVP_CIPHER_CTX_settable_params          ?	3_0_0	EXIST::FUNCTION:
+EVP_CIPHER_CTX_gettable_params          ?	3_0_0	EXIST::FUNCTION:
+EVP_KDF_CTX_gettable_params             ?	3_0_0	EXIST::FUNCTION:
+EVP_KDF_CTX_settable_params             ?	3_0_0	EXIST::FUNCTION:
+EVP_MAC_CTX_gettable_params             ?	3_0_0	EXIST::FUNCTION:
+EVP_MAC_CTX_settable_params             ?	3_0_0	EXIST::FUNCTION:
+EVP_RAND_CTX_gettable_params            ?	3_0_0	EXIST::FUNCTION:
+EVP_RAND_CTX_settable_params            ?	3_0_0	EXIST::FUNCTION:
 RAND_set_DRBG_type                      ?	3_0_0	EXIST::FUNCTION:
 RAND_set_seed_source_type               ?	3_0_0	EXIST::FUNCTION:


More information about the openssl-commits mailing list