]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
prov: rework cipher include files to support improved parameter handling
authorPauli <ppzgs1@gmail.com>
Wed, 18 Jun 2025 00:21:49 +0000 (10:21 +1000)
committerPauli <ppzgs1@gmail.com>
Thu, 19 Jun 2025 22:39:29 +0000 (08:39 +1000)
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27847)

providers/implementations/include/prov/ciphercommon.h
providers/implementations/include/prov/ciphercommon_aead.h
providers/implementations/include/prov/ciphercommon_ccm.h
providers/implementations/include/prov/ciphercommon_gcm.h

index 7d908c03aa3252256bcf0e451bf29888ab0242a3..46efdc80033f527e934b88d03a04407db841a8fe 100644 (file)
@@ -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
index 8d709f10ea64e37376ca6365646ca0d3b504931e..12369b58aacce9aef4069804d22df307a3e206de 100644 (file)
@@ -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                                                          \
 }
 
index ce1a2aa0e7365f4b610d03aeb0ea20f641c70da5..e064df589d7ea31cf7f7912e05a58a9ff097e6dd 100644 (file)
@@ -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,
index ee0b23b92785da99e6bbdfc27ceb3581316ddbeb..e447b892374ddde0da34d3c492e848c49a5b142e 100644 (file)
@@ -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);