mirror of
https://github.com/openssl/openssl.git
synced 2025-02-17 14:32:04 +08:00
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) |
||
---|---|---|
.. | ||
build.info | ||
pem_all.c | ||
pem_err.c | ||
pem_info.c | ||
pem_lib.c | ||
pem_local.h | ||
pem_oth.c | ||
pem_pk8.c | ||
pem_pkey.c | ||
pem_sign.c | ||
pem_x509.c | ||
pem_xaux.c | ||
pvkfmt.c |