mirror of
https://github.com/openssl/openssl.git
synced 2025-01-18 13:44:20 +08:00
1fa2bf9b18
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) |
||
---|---|---|
.. | ||
build.info | ||
sm2_crypt.c | ||
sm2_err.c | ||
sm2_key.c | ||
sm2_sign.c |