Rewrite BN_MONT_CTX_set_locked()
authorjsing <jsing@openbsd.org>
Sun, 19 Feb 2023 13:51:00 +0000 (13:51 +0000)
committerjsing <jsing@openbsd.org>
Sun, 19 Feb 2023 13:51:00 +0000 (13:51 +0000)
commitc5afb767794dbf564f69c95bc32ba89292930095
tree6ec0b491362d6612c4047d60aa361db57d87c5cb
parent305d6377b7e380e3dfadea7d9bbd38e001cbef9e
Rewrite BN_MONT_CTX_set_locked()

Rewrite and simplify BN_MONT_CTX_set_locked - in particular, only hold the
lock for a short period of time, rather than holding a write lock for a
module across an expensive operation.

ok tb@
lib/libcrypto/bn/bn_mont.c