diff options
author | Neil Horman <nhorman@openssl.org> | 2023-08-28 12:07:16 -0400 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2023-09-04 10:15:58 +1000 |
commit | 61cfc22b60e33bc77b1e1944759af48c8e58f0d2 (patch) | |
tree | 28532ea7f227fe8f7c5ab6f989678f837e39f061 /providers/fips-sources.checksums | |
parent | 12d08fe3a50f28fe80ff591e05d7f8253148afb4 (diff) |
Implement dupctx for chacha20 cipher
Implement the dupctx method for the chacha20 cipher, so that
EVP_PKEY_CTX_copy works
Its pretty straightforward, its basically just a memdup. Checking the
pointers that might need fixing up:
in PROV_CHACHA20_CTX all members are statically declared, so memduping
should be fine
in PROV_CHACHA20_CTX->base (PROV_CIPHER_CTX):
Non statically declared members:
*tlsmac needs to get memduped to avoid double free
conditions, but only if base.alloced is set
*hw pointer is always assigned to the chacha20_hw global
variable, so can be left alone
*libctx can be left alone as provctx is always NULL in
chacha20_newctx
*ks appears unused by chacha20, so can be ignored
Fixes #20978
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21878)
Diffstat (limited to 'providers/fips-sources.checksums')
0 files changed, 0 insertions, 0 deletions