mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
fd7d252060
The function rsa_ossl_mod_exp uses the function BN_with_flags to create a temporary copy (local_r1) of a BIGNUM (r1) with modified flags. This temporary copy shares some state with the original r1. If the state of r1 gets updated then local_r1's state will be stale. This was occurring in the function so that when local_r1 was freed a call to bn_check_top was made which failed an assert due to the stale state. To resolve this we must free local_r1 immediately after we have finished using it and not wait until the end of the function. This problem prompted a review of all BN_with_flag usage within the codebase. All other usage appears to be correct, although often not obviously so. This commit refactors things to make it much clearer for these other uses. Reviewed-by: Emilia Käsper <emilia@openssl.org> |
||
---|---|---|
.. | ||
dh192.pem | ||
dh512.pem | ||
dh1024.pem | ||
dh2048.pem | ||
dh4096.pem | ||
dh_ameth.c | ||
dh_asn1.c | ||
dh_check.c | ||
dh_depr.c | ||
dh_err.c | ||
dh_gen.c | ||
dh_kdf.c | ||
dh_key.c | ||
dh_lib.c | ||
dh_pmeth.c | ||
dh_prn.c | ||
dh_rfc5114.c | ||
example | ||
generate | ||
Makefile |