More changes coming out of the bignum auditing. BN_CTX_get() should ideally
authorGeoff Thorpe <geoff@openssl.org>
Tue, 9 Mar 2004 03:47:35 +0000 (03:47 +0000)
committerGeoff Thorpe <geoff@openssl.org>
Tue, 9 Mar 2004 03:47:35 +0000 (03:47 +0000)
commite7716b7a197d551a22dfdb4df6021db8e92bae5d
treeb3a2f3c4f91ad0e393714aa148d99bf1eb795df7
parenta4e3150f00c379a2922180c77eb622ccabfeebd8
More changes coming out of the bignum auditing. BN_CTX_get() should ideally
return a "zero" bignum as BN_new() does - so reset 'top'. During
BN_CTX_end(), released bignums should be consistent so enforce this in
debug builds. Also, reduce the number of wasted BN_clear_free() calls from
BN_CTX_end() (typically by 75% or so).

Submitted by: Nils Larsch
Reviewed by: Geoff Thorpe, Ulf Möller
crypto/bn/bn_ctx.c