#ifndef FIPS_MODULE
const OSSL_PARAM *EVP_PKEY_CTX_gettable_params(EVP_PKEY_CTX *ctx)
{
+ void *provctx;
+
if (EVP_PKEY_CTX_IS_DERIVE_OP(ctx)
&& ctx->op.kex.exchange != NULL
- && ctx->op.kex.exchange->gettable_ctx_params != NULL)
- return ctx->op.kex.exchange->gettable_ctx_params();
+ && ctx->op.kex.exchange->gettable_ctx_params != NULL) {
+ provctx = ossl_provider_ctx(EVP_KEYEXCH_provider(ctx->op.kex.exchange));
+ return ctx->op.kex.exchange->gettable_ctx_params(provctx);
+ }
if (EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx)
&& ctx->op.sig.signature != NULL
- && ctx->op.sig.signature->gettable_ctx_params != NULL)
- return ctx->op.sig.signature->gettable_ctx_params();
+ && ctx->op.sig.signature->gettable_ctx_params != NULL) {
+ provctx = ossl_provider_ctx(
+ EVP_SIGNATURE_provider(ctx->op.sig.signature));
+ return ctx->op.sig.signature->gettable_ctx_params(provctx);
+ }
if (EVP_PKEY_CTX_IS_ASYM_CIPHER_OP(ctx)
&& ctx->op.ciph.cipher != NULL
- && ctx->op.ciph.cipher->gettable_ctx_params != NULL)
- return ctx->op.ciph.cipher->gettable_ctx_params();
+ && ctx->op.ciph.cipher->gettable_ctx_params != NULL) {
+ provctx = ossl_provider_ctx(
+ EVP_ASYM_CIPHER_provider(ctx->op.ciph.cipher));
+ return ctx->op.ciph.cipher->gettable_ctx_params(provctx);
+ }
return NULL;
}
const OSSL_PARAM *EVP_PKEY_CTX_settable_params(EVP_PKEY_CTX *ctx)
{
+ void *provctx;
+
if (EVP_PKEY_CTX_IS_DERIVE_OP(ctx)
&& ctx->op.kex.exchange != NULL
- && ctx->op.kex.exchange->settable_ctx_params != NULL)
- return ctx->op.kex.exchange->settable_ctx_params();
+ && ctx->op.kex.exchange->settable_ctx_params != NULL) {
+ provctx = ossl_provider_ctx(EVP_KEYEXCH_provider(ctx->op.kex.exchange));
+ return ctx->op.kex.exchange->settable_ctx_params(provctx);
+ }
if (EVP_PKEY_CTX_IS_SIGNATURE_OP(ctx)
&& ctx->op.sig.signature != NULL
- && ctx->op.sig.signature->settable_ctx_params != NULL)
- return ctx->op.sig.signature->settable_ctx_params();
+ && ctx->op.sig.signature->settable_ctx_params != NULL) {
+ provctx = ossl_provider_ctx(
+ EVP_SIGNATURE_provider(ctx->op.sig.signature));
+ return ctx->op.sig.signature->settable_ctx_params(provctx);
+ }
if (EVP_PKEY_CTX_IS_ASYM_CIPHER_OP(ctx)
&& ctx->op.ciph.cipher != NULL
- && ctx->op.ciph.cipher->settable_ctx_params != NULL)
- return ctx->op.ciph.cipher->settable_ctx_params();
+ && ctx->op.ciph.cipher->settable_ctx_params != NULL) {
+ provctx = ossl_provider_ctx(
+ EVP_ASYM_CIPHER_provider(ctx->op.ciph.cipher));
+ return ctx->op.ciph.cipher->settable_ctx_params(provctx);
+ }
if (EVP_PKEY_CTX_IS_GEN_OP(ctx)
&& ctx->keymgmt != NULL)
return evp_keymgmt_gen_settable_params(ctx->keymgmt);
(void *vctx, const OSSL_PARAM params[]))
OSSL_CORE_MAKE_FUNC(int, digest_get_ctx_params,
(void *vctx, OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, digest_gettable_params, (void))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, digest_settable_ctx_params, (void))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, digest_gettable_ctx_params, (void))
+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))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, digest_gettable_ctx_params,
+ (void *provctx))
/* Symmetric Ciphers */
OSSL_PARAM params[]))
OSSL_CORE_MAKE_FUNC(int, cipher_set_ctx_params, (void *cctx,
const OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, cipher_gettable_params, (void))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, cipher_settable_ctx_params, (void))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, cipher_gettable_ctx_params, (void))
+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))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, cipher_gettable_ctx_params,
+ (void *provctx))
/* MACs */
OSSL_CORE_MAKE_FUNC(int, mac_final,
(void *mctx,
unsigned char *out, size_t *outl, size_t outsize))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, mac_gettable_params, (void))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, mac_gettable_ctx_params, (void))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, mac_settable_ctx_params, (void))
+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))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, mac_settable_ctx_params,
+ (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[]))
OSSL_CORE_MAKE_FUNC(void, kdf_reset, (void *kctx))
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))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, kdf_gettable_ctx_params, (void))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, kdf_settable_ctx_params, (void))
+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))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, kdf_settable_ctx_params,
+ (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[]))
OSSL_CORE_MAKE_FUNC(int,rand_enable_locking, (void *vctx))
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))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,rand_gettable_ctx_params, (void))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,rand_settable_ctx_params, (void))
+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))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,rand_settable_ctx_params,
+ (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[]))
#define OSSL_FUNC_KEYMGMT_GETTABLE_PARAMS 12
OSSL_CORE_MAKE_FUNC(int, keymgmt_get_params,
(void *keydata, OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keymgmt_gettable_params, (void))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keymgmt_gettable_params, (void *))
#define OSSL_FUNC_KEYMGMT_SET_PARAMS 13
#define OSSL_FUNC_KEYMGMT_SETTABLE_PARAMS 14
OSSL_CORE_MAKE_FUNC(int, keymgmt_set_params,
(void *keydata, const OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keymgmt_settable_params, (void))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keymgmt_settable_params, (void *))
/* Key checks - discovery of supported operations */
# define OSSL_FUNC_KEYMGMT_QUERY_OPERATION_NAME 20
OSSL_CORE_MAKE_FUNC(int, keyexch_set_ctx_params, (void *ctx,
const OSSL_PARAM params[]))
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keyexch_settable_ctx_params,
- (void))
+ (void *provctx))
OSSL_CORE_MAKE_FUNC(int, keyexch_get_ctx_params, (void *ctx,
OSSL_PARAM params[]))
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keyexch_gettable_ctx_params,
- (void))
+ (void *provctx))
/* Signature */
OSSL_CORE_MAKE_FUNC(int, signature_get_ctx_params,
(void *ctx, OSSL_PARAM params[]))
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, signature_gettable_ctx_params,
- (void))
+ (void *provctx))
OSSL_CORE_MAKE_FUNC(int, signature_set_ctx_params,
(void *ctx, const OSSL_PARAM params[]))
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, signature_settable_ctx_params,
- (void))
+ (void *provctx))
OSSL_CORE_MAKE_FUNC(int, signature_get_ctx_md_params,
(void *ctx, OSSL_PARAM params[]))
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, signature_gettable_ctx_md_params,
OSSL_CORE_MAKE_FUNC(int, asym_cipher_get_ctx_params,
(void *ctx, OSSL_PARAM params[]))
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, asym_cipher_gettable_ctx_params,
- (void))
+ (void *provctx))
OSSL_CORE_MAKE_FUNC(int, asym_cipher_set_ctx_params,
(void *ctx, const OSSL_PARAM params[]))
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, asym_cipher_settable_ctx_params,
- (void))
+ (void *provctx))
/* Serializers and deserializers */
# define OSSL_FUNC_SERIALIZER_NEWCTX 1
OSSL_CORE_MAKE_FUNC(int, serializer_set_ctx_params,
(void *ctx, const OSSL_PARAM params[]))
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, serializer_settable_ctx_params,
- (void))
+ (void *provctx))
OSSL_CORE_MAKE_FUNC(int, serializer_serialize_data,
(void *ctx, const OSSL_PARAM[], OSSL_CORE_BIO *out,
OSSL_CORE_MAKE_FUNC(void *, deserializer_newctx, (void *provctx))
OSSL_CORE_MAKE_FUNC(void, deserializer_freectx, (void *ctx))
OSSL_CORE_MAKE_FUNC(int, deserializer_get_params, (OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, deserializer_gettable_params, (void))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, deserializer_gettable_params,
+ (void *provctx))
OSSL_CORE_MAKE_FUNC(int, deserializer_set_ctx_params,
(void *ctx, const OSSL_PARAM params[]))
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, deserializer_settable_ctx_params,
- (void))
+ (void *provctx))
OSSL_CORE_MAKE_FUNC(int, deserializer_deserialize,
(void *ctx, OSSL_CORE_BIO *in,