openssl/crypto/dsa
Bernd Edlinger 1fa2bf9b18 Fix handling of NULL sig parameter in ECDSA_sign and similar
The problem is, that it almost works to pass sig=NULL to the
ECDSA_sign, ECDSA_sign_ex and DSA_sign, to compute the necessary
space for the resulting signature.
But since the ECDSA signature is non-deterministic
(except when ECDSA_sign_setup/ECDSA_sign_ex are used)
the resulting length may be different when the API is called again.
This can easily cause random memory corruption.
Several internal APIs had the same issue, but since they are
never called with sig=NULL, it is better to make them return an
error in that case, instead of making the code more complex.

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23529)
2024-04-02 17:47:29 +02:00
..
build.info
dsa_ameth.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
dsa_asn1.c
dsa_backend.c Copyright year updates 2023-09-07 09:59:15 +01:00
dsa_check.c Fix typos 2024-01-23 14:31:03 +00:00
dsa_depr.c
dsa_err.c Fix infinite loops in DSA sign code. 2023-03-01 09:20:49 +11:00
dsa_gen.c
dsa_key.c Copyright year updates 2023-09-07 09:59:15 +01:00
dsa_lib.c Don't (re-)initialize the FFC_PARAMs in dh_init and dsa_init 2023-10-04 12:22:04 +02:00
dsa_local.h Implement deterministic ECDSA sign (RFC6979) 2022-11-30 07:31:53 +00:00
dsa_meth.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
dsa_ossl.c Don't (re-)initialize the FFC_PARAMs in dh_init and dsa_init 2023-10-04 12:22:04 +02:00
dsa_pmeth.c dsa/dsa_pmeth.c: Add the checks for the EVP_MD_CTX_get_size() 2024-03-30 14:49:37 -04:00
dsa_prn.c Update copyright year 2021-07-29 15:41:35 +01:00
dsa_sign.c Fix handling of NULL sig parameter in ECDSA_sign and similar 2024-04-02 17:47:29 +02:00
dsa_vrf.c