From: Pauli Date: Wed, 18 Jun 2025 00:21:49 +0000 (+1000) Subject: prov: rework cipher include files to support improved parameter handling X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fa92dd9427665428d5132a395b71833bdf779b13;p=thirdparty%2Fopenssl.git prov: rework cipher include files to support improved parameter handling Reviewed-by: Shane Lontis Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/27847) --- diff --git a/providers/implementations/include/prov/ciphercommon.h b/providers/implementations/include/prov/ciphercommon.h index 7d908c03aa3..46efdc80033 100644 --- a/providers/implementations/include/prov/ciphercommon.h +++ b/providers/implementations/include/prov/ciphercommon.h @@ -372,8 +372,4 @@ int ossl_cipher_trailingdata(unsigned char *buf, size_t *buflen, size_t blocksize, const unsigned char **in, size_t *inlen); -/* Machine generated TRIE based OSSL_PARAM name parsers */ -int ossl_cipher_aead_get_ctx_params_find_pidx(const char *); -int ossl_cipher_aead_set_ctx_params_find_pidx(const char *); - #endif diff --git a/providers/implementations/include/prov/ciphercommon_aead.h b/providers/implementations/include/prov/ciphercommon_aead.h index 8d709f10ea6..12369b58aac 100644 --- a/providers/implementations/include/prov/ciphercommon_aead.h +++ b/providers/implementations/include/prov/ciphercommon_aead.h @@ -49,9 +49,9 @@ const OSSL_DISPATCH ossl_##alg##kbits##lc##_functions[] = { \ { OSSL_FUNC_CIPHER_GETTABLE_PARAMS, \ (void (*)(void))ossl_cipher_generic_gettable_params }, \ { OSSL_FUNC_CIPHER_GETTABLE_CTX_PARAMS, \ - (void (*)(void))ossl_cipher_aead_gettable_ctx_params }, \ + (void (*)(void))ossl_##lc##_gettable_ctx_params }, \ { OSSL_FUNC_CIPHER_SETTABLE_CTX_PARAMS, \ - (void (*)(void))ossl_cipher_aead_settable_ctx_params }, \ + (void (*)(void))ossl_##lc##_settable_ctx_params }, \ OSSL_DISPATCH_END \ } diff --git a/providers/implementations/include/prov/ciphercommon_ccm.h b/providers/implementations/include/prov/ciphercommon_ccm.h index ce1a2aa0e73..e064df589d7 100644 --- a/providers/implementations/include/prov/ciphercommon_ccm.h +++ b/providers/implementations/include/prov/ciphercommon_ccm.h @@ -89,6 +89,9 @@ OSSL_FUNC_cipher_set_ctx_params_fn ossl_ccm_set_ctx_params; OSSL_FUNC_cipher_update_fn ossl_ccm_stream_update; OSSL_FUNC_cipher_final_fn ossl_ccm_stream_final; OSSL_FUNC_cipher_cipher_fn ossl_ccm_cipher; +OSSL_FUNC_cipher_gettable_ctx_params_fn ossl_ccm_gettable_ctx_params; +OSSL_FUNC_cipher_settable_ctx_params_fn ossl_ccm_settable_ctx_params; + void ossl_ccm_initctx(PROV_CCM_CTX *ctx, size_t keybits, const PROV_CCM_HW *hw); int ossl_ccm_generic_setiv(PROV_CCM_CTX *ctx, const unsigned char *nonce, diff --git a/providers/implementations/include/prov/ciphercommon_gcm.h b/providers/implementations/include/prov/ciphercommon_gcm.h index ee0b23b9278..e447b892374 100644 --- a/providers/implementations/include/prov/ciphercommon_gcm.h +++ b/providers/implementations/include/prov/ciphercommon_gcm.h @@ -111,6 +111,9 @@ OSSL_FUNC_cipher_set_ctx_params_fn ossl_gcm_set_ctx_params; OSSL_FUNC_cipher_cipher_fn ossl_gcm_cipher; OSSL_FUNC_cipher_update_fn ossl_gcm_stream_update; OSSL_FUNC_cipher_final_fn ossl_gcm_stream_final; +OSSL_FUNC_cipher_gettable_ctx_params_fn ossl_gcm_gettable_ctx_params; +OSSL_FUNC_cipher_settable_ctx_params_fn ossl_gcm_settable_ctx_params; + void ossl_gcm_initctx(void *provctx, PROV_GCM_CTX *ctx, size_t keybits, const PROV_GCM_HW *hw);