Commit 28f4711b01 for openssl.org
commit 28f4711b01926b60c2226a8b1ff48b1bc5ea4eb1
Author: Pauli <paul.dale@oracle.com>
Date: Thu Aug 27 11:10:57 2026 +1000
providers: convert legacy cipher parameter parsing
Use generated trie decoders for the legacy-provider DES, RC2 and RC5 implementations.
Assisted-by: ChatGPT:gpt-5.6Sol
Reviewed-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Merge-date: Thu Sep 3 02:16:55 2026
Merged-from: https://github.com/openssl/openssl/pull/32536
diff --git a/.gitignore b/.gitignore
index 5f9dd45aca..b0c98b5c32 100644
--- a/.gitignore
+++ b/.gitignore
@@ -166,8 +166,11 @@ providers/implementations/ciphers/ciphercommon_gcm.inc
providers/implementations/ciphers/cipher_chacha20.inc
providers/implementations/ciphers/cipher_chacha20_poly1305.inc
providers/implementations/ciphers/cipher_cts.inc
+providers/implementations/ciphers/cipher_des.inc
providers/implementations/ciphers/cipher_null.inc
+providers/implementations/ciphers/cipher_rc2.inc
providers/implementations/ciphers/cipher_rc4_hmac_md5.inc
+providers/implementations/ciphers/cipher_rc5.inc
providers/implementations/ciphers/cipher_sm2_xts.c
providers/implementations/ciphers/cipher_sm4_xts.inc
providers/implementations/ciphers/cipher_tdes.inc
diff --git a/build.info b/build.info
index 2f6c3d83dd..ab5f66168f 100644
--- a/build.info
+++ b/build.info
@@ -148,8 +148,11 @@ DEPEND[]=include/openssl/asn1.h \
providers/implementations/ciphers/cipher_chacha20.inc \
providers/implementations/ciphers/cipher_chacha20_poly1305.inc \
providers/implementations/ciphers/cipher_cts.inc \
+ providers/implementations/ciphers/cipher_des.inc \
providers/implementations/ciphers/cipher_null.inc \
+ providers/implementations/ciphers/cipher_rc2.inc \
providers/implementations/ciphers/cipher_rc4_hmac_md5.inc \
+ providers/implementations/ciphers/cipher_rc5.inc \
providers/implementations/ciphers/cipher_sm4_xts.inc \
providers/implementations/ciphers/cipher_tdes.inc \
providers/implementations/digests/blake2_prov.inc \
@@ -281,8 +284,11 @@ DEPEND[providers/implementations/asymciphers/rsa_enc.inc \
providers/implementations/ciphers/cipher_chacha20.inc \
providers/implementations/ciphers/cipher_chacha20_poly1305.inc \
providers/implementations/ciphers/cipher_cts.inc \
+ providers/implementations/ciphers/cipher_des.inc \
providers/implementations/ciphers/cipher_null.inc \
+ providers/implementations/ciphers/cipher_rc2.inc \
providers/implementations/ciphers/cipher_rc4_hmac_md5.inc \
+ providers/implementations/ciphers/cipher_rc5.inc \
providers/implementations/ciphers/cipher_sm4_xts.inc \
providers/implementations/ciphers/cipher_tdes.inc \
providers/implementations/digests/blake2_prov.inc \
@@ -452,10 +458,16 @@ GENERATE[providers/implementations/ciphers/cipher_chacha20_poly1305.inc]=\
providers/implementations/ciphers/cipher_chacha20_poly1305.inc.in
GENERATE[providers/implementations/ciphers/cipher_cts.inc]=\
providers/implementations/ciphers/cipher_cts.inc.in
+GENERATE[providers/implementations/ciphers/cipher_des.inc]=\
+ providers/implementations/ciphers/cipher_des.inc.in
GENERATE[providers/implementations/ciphers/cipher_null.inc]=\
providers/implementations/ciphers/cipher_null.inc.in
+GENERATE[providers/implementations/ciphers/cipher_rc2.inc]=\
+ providers/implementations/ciphers/cipher_rc2.inc.in
GENERATE[providers/implementations/ciphers/cipher_rc4_hmac_md5.inc]=\
providers/implementations/ciphers/cipher_rc4_hmac_md5.inc.in
+GENERATE[providers/implementations/ciphers/cipher_rc5.inc]=\
+ providers/implementations/ciphers/cipher_rc5.inc.in
GENERATE[providers/implementations/ciphers/cipher_sm4_xts.inc]=\
providers/implementations/ciphers/cipher_sm4_xts.inc.in
GENERATE[providers/implementations/ciphers/cipher_tdes.inc]=\
diff --git a/providers/implementations/ciphers/cipher_des.c b/providers/implementations/ciphers/cipher_des.c
index c907393969..3457d7dab0 100644
--- a/providers/implementations/ciphers/cipher_des.c
+++ b/providers/implementations/ciphers/cipher_des.c
@@ -20,6 +20,15 @@
#include "prov/implementations.h"
#include "prov/providercommon.h"
+struct des_get_ctx_param_list_st {
+ struct ossl_cipher_get_ctx_param_list_st common;
+ OSSL_PARAM *rand;
+};
+
+#define des_get_ctx_params_st des_get_ctx_param_list_st
+
+#include "providers/implementations/ciphers/cipher_des.inc"
+
#define DES_FLAGS PROV_CIPHER_FLAG_RAND_KEY
static OSSL_FUNC_cipher_freectx_fn des_freectx;
@@ -117,7 +126,6 @@ static int des_dinit(void *vctx, const unsigned char *key, size_t keylen,
static int des_generatekey(PROV_CIPHER_CTX *ctx, void *ptr)
{
-
DES_cblock *deskey = ptr;
size_t kl = ctx->keylen;
@@ -127,20 +135,24 @@ static int des_generatekey(PROV_CIPHER_CTX *ctx, void *ptr)
return 1;
}
-CIPHER_DEFAULT_GETTABLE_CTX_PARAMS_START(des)
-OSSL_PARAM_octet_string(OSSL_CIPHER_PARAM_RANDOM_KEY, NULL, 0),
- CIPHER_DEFAULT_GETTABLE_CTX_PARAMS_END(des)
+static const OSSL_PARAM *des_gettable_ctx_params(ossl_unused void *cctx,
+ ossl_unused void *provctx)
+{
+ return des_get_ctx_params_list;
+}
- static int des_get_ctx_params(void *vctx, OSSL_PARAM params[])
+static int des_get_ctx_params(void *vctx, OSSL_PARAM params[])
{
PROV_CIPHER_CTX *ctx = (PROV_CIPHER_CTX *)vctx;
- OSSL_PARAM *p;
+ struct des_get_ctx_param_list_st p;
+
+ if (ctx == NULL || !des_get_ctx_params_decoder(params, &p))
+ return 0;
- if (!ossl_cipher_generic_get_ctx_params(vctx, params))
+ if (!ossl_cipher_common_get_ctx_params(ctx, &p.common))
return 0;
- p = OSSL_PARAM_locate(params, OSSL_CIPHER_PARAM_RANDOM_KEY);
- if (p != NULL && !des_generatekey(ctx, p->data)) {
+ if (p.rand != NULL && !des_generatekey(ctx, p.rand->data)) {
ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_GENERATE_KEY);
return 0;
}
diff --git a/providers/implementations/ciphers/cipher_des.inc.in b/providers/implementations/ciphers/cipher_des.inc.in
new file mode 100644
index 0000000000..5accd2a49d
--- /dev/null
+++ b/providers/implementations/ciphers/cipher_des.inc.in
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2026 The OpenSSL Project Authors. All Rights Reserved.
+ *
+ * Licensed under the Apache License 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. You can obtain a copy
+ * in the file LICENSE in the source distribution or at
+ * https://www.openssl.org/source/license.html
+ */
+
+{-
+use OpenSSL::paramnames qw(produce_param_decoder);
+-}
+
+{- produce_param_decoder('des_get_ctx_params',
+ (['OSSL_CIPHER_PARAM_KEYLEN', 'common.keylen', 'size_t'],
+ ['OSSL_CIPHER_PARAM_IVLEN', 'common.ivlen', 'size_t'],
+ ['OSSL_CIPHER_PARAM_PADDING', 'common.pad', 'uint'],
+ ['OSSL_CIPHER_PARAM_NUM', 'common.num', 'uint'],
+ ['OSSL_CIPHER_PARAM_IV', 'common.iv', 'octet_string'],
+ ['OSSL_CIPHER_PARAM_UPDATED_IV', 'common.updiv', 'octet_string'],
+ ['OSSL_CIPHER_PARAM_RANDOM_KEY', 'rand', 'octet_string'],
+ )); -}
diff --git a/providers/implementations/ciphers/cipher_rc2.c b/providers/implementations/ciphers/cipher_rc2.c
index 546e020133..cea7b7458d 100644
--- a/providers/implementations/ciphers/cipher_rc2.c
+++ b/providers/implementations/ciphers/cipher_rc2.c
@@ -20,6 +20,24 @@
#include "prov/implementations.h"
#include "prov/providercommon.h"
+struct rc2_get_ctx_param_list_st {
+ struct ossl_cipher_get_ctx_param_list_st common;
+ OSSL_PARAM *bits;
+ OSSL_PARAM *algid;
+ OSSL_PARAM *oldid;
+};
+
+struct rc2_set_ctx_param_list_st {
+ struct ossl_cipher_set_ctx_param_list_st common;
+ OSSL_PARAM *bits;
+ OSSL_PARAM *algid;
+};
+
+#define rc2_get_ctx_params_st rc2_get_ctx_param_list_st
+#define rc2_set_ctx_params_st rc2_set_ctx_param_list_st
+
+#include "providers/implementations/ciphers/cipher_rc2.inc"
+
#define RC2_40_MAGIC 0xa0
#define RC2_64_MAGIC 0x78
#define RC2_128_MAGIC 0x3a
@@ -106,17 +124,20 @@ static int rc2_dinit(void *ctx, const unsigned char *key, size_t keylen,
static int rc2_get_ctx_params(void *vctx, OSSL_PARAM params[])
{
PROV_RC2_CTX *ctx = (PROV_RC2_CTX *)vctx;
+ struct rc2_get_ctx_param_list_st prms;
OSSL_PARAM *p, *p1, *p2;
- if (!ossl_cipher_generic_get_ctx_params(vctx, params))
+ if (ctx == NULL || !rc2_get_ctx_params_decoder(params, &prms))
+ return 0;
+ if (!ossl_cipher_common_get_ctx_params(&ctx->base, &prms.common))
return 0;
- p = OSSL_PARAM_locate(params, OSSL_CIPHER_PARAM_RC2_KEYBITS);
+ p = prms.bits;
if (p != NULL && !OSSL_PARAM_set_size_t(p, ctx->key_bits)) {
ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
return 0;
}
- p1 = OSSL_PARAM_locate(params, OSSL_CIPHER_PARAM_ALGORITHM_ID_PARAMS);
- p2 = OSSL_PARAM_locate(params, OSSL_CIPHER_PARAM_ALGORITHM_ID_PARAMS_OLD);
+ p1 = prms.algid;
+ p2 = prms.oldid;
if (p1 != NULL || p2 != NULL) {
long num;
int i;
@@ -174,21 +195,24 @@ static int rc2_get_ctx_params(void *vctx, OSSL_PARAM params[])
static int rc2_set_ctx_params(void *vctx, const OSSL_PARAM params[])
{
PROV_RC2_CTX *ctx = (PROV_RC2_CTX *)vctx;
+ struct rc2_set_ctx_param_list_st prms;
const OSSL_PARAM *p;
if (ossl_param_is_empty(params))
return 1;
- if (!ossl_cipher_var_keylen_set_ctx_params(vctx, params))
+ if (ctx == NULL || !rc2_set_ctx_params_decoder(params, &prms))
return 0;
- p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_RC2_KEYBITS);
+ if (!ossl_cipher_common_set_ctx_params(&ctx->base, &prms.common))
+ return 0;
+ p = prms.bits;
if (p != NULL) {
if (!OSSL_PARAM_get_size_t(p, &ctx->key_bits)) {
ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_GET_PARAMETER);
return 0;
}
}
- p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_ALGORITHM_ID_PARAMS);
+ p = prms.algid;
if (p != NULL) {
ASN1_TYPE *type = NULL;
long num = 0;
@@ -220,16 +244,17 @@ static int rc2_set_ctx_params(void *vctx, const OSSL_PARAM params[])
return 1;
}
-CIPHER_DEFAULT_GETTABLE_CTX_PARAMS_START(rc2)
-OSSL_PARAM_size_t(OSSL_CIPHER_PARAM_RC2_KEYBITS, NULL),
- OSSL_PARAM_octet_string(OSSL_CIPHER_PARAM_ALGORITHM_ID_PARAMS, NULL, 0),
- CIPHER_DEFAULT_GETTABLE_CTX_PARAMS_END(rc2)
+static const OSSL_PARAM *rc2_gettable_ctx_params(ossl_unused void *cctx,
+ ossl_unused void *provctx)
+{
+ return rc2_get_ctx_params_list;
+}
- CIPHER_DEFAULT_SETTABLE_CTX_PARAMS_START(rc2)
- OSSL_PARAM_size_t(OSSL_CIPHER_PARAM_KEYLEN, NULL),
- OSSL_PARAM_size_t(OSSL_CIPHER_PARAM_RC2_KEYBITS, NULL),
- OSSL_PARAM_octet_string(OSSL_CIPHER_PARAM_ALGORITHM_ID_PARAMS, NULL, 0),
- CIPHER_DEFAULT_SETTABLE_CTX_PARAMS_END(rc2)
+static const OSSL_PARAM *rc2_settable_ctx_params(ossl_unused void *cctx,
+ ossl_unused void *provctx)
+{
+ return rc2_set_ctx_params_list;
+}
#define IMPLEMENT_cipher(alg, UCALG, lcmode, UCMODE, flags, kbits, blkbits, \
ivbits, typ) \
@@ -280,8 +305,8 @@ OSSL_PARAM_size_t(OSSL_CIPHER_PARAM_RC2_KEYBITS, NULL),
OSSL_DISPATCH_END \
};
- /* ossl_rc2128ecb_functions */
- IMPLEMENT_cipher(rc2, RC2, ecb, ECB, RC2_FLAGS, 128, 64, 0, block)
+/* ossl_rc2128ecb_functions */
+IMPLEMENT_cipher(rc2, RC2, ecb, ECB, RC2_FLAGS, 128, 64, 0, block)
/* ossl_rc2128cbc_functions */
IMPLEMENT_cipher(rc2, RC2, cbc, CBC, RC2_FLAGS, 128, 64, 64, block)
/* ossl_rc240cbc_functions */
diff --git a/providers/implementations/ciphers/cipher_rc2.inc.in b/providers/implementations/ciphers/cipher_rc2.inc.in
new file mode 100644
index 0000000000..98d54bf894
--- /dev/null
+++ b/providers/implementations/ciphers/cipher_rc2.inc.in
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2026 The OpenSSL Project Authors. All Rights Reserved.
+ *
+ * Licensed under the Apache License 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. You can obtain a copy
+ * in the file LICENSE in the source distribution or at
+ * https://www.openssl.org/source/license.html
+ */
+
+{-
+use OpenSSL::paramnames qw(produce_param_decoder);
+-}
+
+{- produce_param_decoder('rc2_get_ctx_params',
+ (['OSSL_CIPHER_PARAM_KEYLEN', 'common.keylen', 'size_t'],
+ ['OSSL_CIPHER_PARAM_IVLEN', 'common.ivlen', 'size_t'],
+ ['OSSL_CIPHER_PARAM_PADDING', 'common.pad', 'uint'],
+ ['OSSL_CIPHER_PARAM_NUM', 'common.num', 'uint'],
+ ['OSSL_CIPHER_PARAM_IV', 'common.iv', 'octet_string'],
+ ['OSSL_CIPHER_PARAM_UPDATED_IV', 'common.updiv', 'octet_string'],
+ ['OSSL_CIPHER_PARAM_RC2_KEYBITS', 'bits', 'size_t'],
+ ['OSSL_CIPHER_PARAM_ALGORITHM_ID_PARAMS', 'algid', 'octet_string'],
+ ['OSSL_CIPHER_PARAM_ALGORITHM_ID_PARAMS_OLD', 'oldid', 'octet_string'],
+ )); -}
+
+{- produce_param_decoder('rc2_set_ctx_params',
+ (['OSSL_CIPHER_PARAM_PADDING', 'common.pad', 'uint'],
+ ['OSSL_CIPHER_PARAM_NUM', 'common.num', 'uint'],
+ ['OSSL_CIPHER_PARAM_KEYLEN', 'common.keylen', 'size_t'],
+ ['OSSL_CIPHER_PARAM_RC2_KEYBITS', 'bits', 'size_t'],
+ ['OSSL_CIPHER_PARAM_ALGORITHM_ID_PARAMS', 'algid', 'octet_string'],
+ )); -}
diff --git a/providers/implementations/ciphers/cipher_rc5.c b/providers/implementations/ciphers/cipher_rc5.c
index 4bfb40de4e..091139b6d3 100644
--- a/providers/implementations/ciphers/cipher_rc5.c
+++ b/providers/implementations/ciphers/cipher_rc5.c
@@ -20,6 +20,21 @@
#include "prov/implementations.h"
#include "prov/providercommon.h"
+struct rc5_get_ctx_param_list_st {
+ struct ossl_cipher_get_ctx_param_list_st common;
+ OSSL_PARAM *rounds;
+};
+
+struct rc5_set_ctx_param_list_st {
+ struct ossl_cipher_set_ctx_param_list_st common;
+ OSSL_PARAM *rounds;
+};
+
+#define rc5_get_ctx_params_st rc5_get_ctx_param_list_st
+#define rc5_set_ctx_params_st rc5_set_ctx_param_list_st
+
+#include "providers/implementations/ciphers/cipher_rc5.inc"
+
#define RC5_FLAGS PROV_CIPHER_FLAG_VARIABLE_LENGTH
static OSSL_FUNC_cipher_encrypt_init_fn rc5_einit;
@@ -75,19 +90,18 @@ static int rc5_dinit(void *ctx, const unsigned char *key, size_t keylen,
static int rc5_set_ctx_params(void *vctx, const OSSL_PARAM params[])
{
PROV_RC5_CTX *ctx = (PROV_RC5_CTX *)vctx;
- const OSSL_PARAM *p;
+ struct rc5_set_ctx_param_list_st p;
- if (ossl_param_is_empty(params))
- return 1;
+ if (ctx == NULL || !rc5_set_ctx_params_decoder(params, &p))
+ return 0;
- if (!ossl_cipher_var_keylen_set_ctx_params(vctx, params))
+ if (!ossl_cipher_common_set_ctx_params(&ctx->base, &p.common))
return 0;
- p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_ROUNDS);
- if (p != NULL) {
+ if (p.rounds != NULL) {
unsigned int rounds;
- if (!OSSL_PARAM_get_uint(p, &rounds)) {
+ if (!OSSL_PARAM_get_uint(p.rounds, &rounds)) {
ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_GET_PARAMETER);
return 0;
}
@@ -102,24 +116,30 @@ static int rc5_set_ctx_params(void *vctx, const OSSL_PARAM params[])
return 1;
}
-CIPHER_DEFAULT_GETTABLE_CTX_PARAMS_START(rc5)
-OSSL_PARAM_uint(OSSL_CIPHER_PARAM_ROUNDS, NULL),
- CIPHER_DEFAULT_GETTABLE_CTX_PARAMS_END(rc5)
+const OSSL_PARAM *rc5_gettable_ctx_params(ossl_unused void *cctx,
+ ossl_unused void *provctx)
+{
+ return rc5_get_ctx_params_list;
+}
- CIPHER_DEFAULT_SETTABLE_CTX_PARAMS_START(rc5)
- OSSL_PARAM_size_t(OSSL_CIPHER_PARAM_KEYLEN, NULL),
- OSSL_PARAM_uint(OSSL_CIPHER_PARAM_ROUNDS, NULL),
- CIPHER_DEFAULT_SETTABLE_CTX_PARAMS_END(rc5)
+const OSSL_PARAM *rc5_settable_ctx_params(ossl_unused void *cctx,
+ ossl_unused void *provctx)
+{
+ return rc5_set_ctx_params_list;
+}
- static int rc5_get_ctx_params(void *vctx, OSSL_PARAM params[])
+static int rc5_get_ctx_params(void *vctx, OSSL_PARAM params[])
{
PROV_RC5_CTX *ctx = (PROV_RC5_CTX *)vctx;
- OSSL_PARAM *p;
+ struct rc5_get_ctx_param_list_st p;
- if (!ossl_cipher_generic_get_ctx_params(vctx, params))
+ if (ctx == NULL || !rc5_get_ctx_params_decoder(params, &p))
return 0;
- p = OSSL_PARAM_locate(params, OSSL_CIPHER_PARAM_ROUNDS);
- if (p != NULL && !OSSL_PARAM_set_uint(p, ctx->rounds)) {
+
+ if (!ossl_cipher_common_get_ctx_params(&ctx->base, &p.common))
+ return 0;
+
+ if (p.rounds != NULL && !OSSL_PARAM_set_uint(p.rounds, ctx->rounds)) {
ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_SET_PARAMETER);
return 0;
}
diff --git a/providers/implementations/ciphers/cipher_rc5.inc.in b/providers/implementations/ciphers/cipher_rc5.inc.in
new file mode 100644
index 0000000000..5f96c2b7fc
--- /dev/null
+++ b/providers/implementations/ciphers/cipher_rc5.inc.in
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2026 The OpenSSL Project Authors. All Rights Reserved.
+ *
+ * Licensed under the Apache License 2.0 (the "License"). You may not use
+ * this file except in compliance with the License. You can obtain a copy
+ * in the file LICENSE in the source distribution or at
+ * https://www.openssl.org/source/license.html
+ */
+
+{-
+use OpenSSL::paramnames qw(produce_param_decoder);
+-}
+
+{- produce_param_decoder('rc5_get_ctx_params',
+ (['OSSL_CIPHER_PARAM_KEYLEN', 'common.keylen', 'size_t'],
+ ['OSSL_CIPHER_PARAM_IVLEN', 'common.ivlen', 'size_t'],
+ ['OSSL_CIPHER_PARAM_PADDING', 'common.pad', 'uint'],
+ ['OSSL_CIPHER_PARAM_NUM', 'common.num', 'uint'],
+ ['OSSL_CIPHER_PARAM_IV', 'common.iv', 'octet_string'],
+ ['OSSL_CIPHER_PARAM_UPDATED_IV', 'common.updiv', 'octet_string'],
+ ['OSSL_CIPHER_PARAM_ROUNDS', 'rounds', 'uint'],
+ )); -}
+
+{- produce_param_decoder('rc5_set_ctx_params',
+ (['OSSL_CIPHER_PARAM_PADDING', 'common.pad', 'uint'],
+ ['OSSL_CIPHER_PARAM_NUM', 'common.num', 'uint'],
+ ['OSSL_CIPHER_PARAM_KEYLEN', 'common.keylen', 'size_t'],
+ ['OSSL_CIPHER_PARAM_ROUNDS', 'rounds', 'uint'],
+ )); -}
diff --git a/providers/implementations/include/prov/ciphercommon.h b/providers/implementations/include/prov/ciphercommon.h
index 802333e2ec..7cdfcdade0 100644
--- a/providers/implementations/include/prov/ciphercommon.h
+++ b/providers/implementations/include/prov/ciphercommon.h
@@ -348,39 +348,6 @@ PROV_CIPHER_HW_FN ossl_cipher_hw_chunked_ofb128;
dst->ks = &dctx->ks.ks; \
}
-#define CIPHER_DEFAULT_GETTABLE_CTX_PARAMS_START(name) \
- static const OSSL_PARAM name##_known_gettable_ctx_params[] = { \
- OSSL_PARAM_size_t(OSSL_CIPHER_PARAM_KEYLEN, NULL), \
- OSSL_PARAM_size_t(OSSL_CIPHER_PARAM_IVLEN, NULL), \
- OSSL_PARAM_uint(OSSL_CIPHER_PARAM_PADDING, NULL), \
- OSSL_PARAM_uint(OSSL_CIPHER_PARAM_NUM, NULL), \
- OSSL_PARAM_octet_string(OSSL_CIPHER_PARAM_IV, NULL, 0), \
- OSSL_PARAM_octet_string(OSSL_CIPHER_PARAM_UPDATED_IV, NULL, 0),
-
-#define CIPHER_DEFAULT_GETTABLE_CTX_PARAMS_END(name) \
- OSSL_PARAM_END \
- } \
- ; \
- const OSSL_PARAM *name##_gettable_ctx_params(ossl_unused void *cctx, \
- ossl_unused void *provctx) \
- { \
- return name##_known_gettable_ctx_params; \
- }
-
-#define CIPHER_DEFAULT_SETTABLE_CTX_PARAMS_START(name) \
- static const OSSL_PARAM name##_known_settable_ctx_params[] = { \
- OSSL_PARAM_uint(OSSL_CIPHER_PARAM_PADDING, NULL), \
- OSSL_PARAM_uint(OSSL_CIPHER_PARAM_NUM, NULL),
-#define CIPHER_DEFAULT_SETTABLE_CTX_PARAMS_END(name) \
- OSSL_PARAM_END \
- } \
- ; \
- const OSSL_PARAM *name##_settable_ctx_params(ossl_unused void *cctx, \
- ossl_unused void *provctx) \
- { \
- return name##_known_settable_ctx_params; \
- }
-
struct ossl_cipher_get_param_list_st {
OSSL_PARAM *mode;
OSSL_PARAM *keylen;