openssl/providers/implementations
Viktor Dukhovni 35f6e7ea02 Make the provider context available to encoders
At the moment the provider context is only available to
encoders that encrypt, but it is useful more generally.

A similar change has already been merged to "master" on the
decoder side, this is the mirror change for encoders.  The
only significant difference is that PEM_ASN1_write_bio needed
to be "extended" (cloned) to allow it to pass the provider context
down to the `k2d` function it uses to encode the data.

I had to "hold my nose" and live with the random "20" added to the data
size in order to accomodate encryption with padding, which may produce
one more cipher block than the input length.  This really should ask
the EVP layer about the block length of the cipher, and allocate the
right amount.  This should be a separate fix for both the old
PEM_ASN1_write_bio() and the new PEM_ASN1_write_bio_ctx().

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/26475)
2025-01-21 17:19:07 +11:00
..
asymciphers Add utility function ossl_param_is_empty() 2024-10-09 11:13:46 +02:00
ciphers Add utility function ossl_param_is_empty() 2024-10-09 11:13:46 +02:00
digests Add CTX copy function for EVP_MD to optimize the performance of EVP_MD_CTX_copy_ex. 2024-11-20 14:12:53 +01:00
encode_decode Make the provider context available to encoders 2025-01-21 17:19:07 +11:00
exchange Add utility function ossl_param_is_empty() 2024-10-09 11:13:46 +02:00
include/prov Add CTX copy function for EVP_MD to optimize the performance of EVP_MD_CTX_copy_ex. 2024-11-20 14:12:53 +01:00
kdfs Code & comments changes to make them in consistent 2024-12-06 15:27:51 +01:00
kem ec_kem.c: Fix ikmlen check 2024-12-30 17:13:43 +01:00
keymgmt Fix memleak in dsa_gen() 2024-11-29 19:01:01 +01:00
macs Add utility function ossl_param_is_empty() 2024-10-09 11:13:46 +02:00
rands drbg: provide requested amount of entropy, rather than self-strength 2025-01-14 12:12:02 +01:00
signature Add utility function ossl_param_is_empty() 2024-10-09 11:13:46 +02:00
storemgmt Avoid undefined behaviour with the <ctype.h> functions. 2024-10-10 20:47:48 +02:00
build.info Add KEM (Key encapsulation mechanism) support to providers 2020-09-19 18:08:46 +10:00