summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_ctx.c
AgeCommit message (Collapse)Author
2004-03-13Document a change I'd already made, and at the same time, correct theGeoff Thorpe
change to work properly; BN_zero() should set 'neg' to zero as well as 'top' to match the behaviour of BN_new().
2004-03-09More changes coming out of the bignum auditing. BN_CTX_get() should ideallyGeoff Thorpe
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
2003-11-04Put the first stage of my bignum debugging adventures into CVS. This codeGeoff Thorpe
is itself experimental, and in addition may cause execution to break on existing openssl "bugs" that previously were harmless or at least invisible.
2003-10-30When a BN_CTX is used for temporary workspace, the variables are sometimesGeoff Thorpe
left in an inconsistent state when they are released for later reuse. This change resets the BIGNUMs when they are released back to the context.
2003-10-29BN_CTX is opaque and the static initialiser BN_CTX_init() is not usedGeoff Thorpe
except internally to the allocator BN_CTX_new(), as such this deprecates the use of BN_CTX_init() in the API. Moreover, the structure definition of BN_CTX is taken out of bn_lcl.h and moved into bn_ctx.c itself. NDEBUG should probably only be "forced" in the top-level configuration, but until it is I will avoid removing it from bn_ctx.c which might surprise people with massive slow-downs in their keygens. So I've left it in bn_ctx.c but tidied up the preprocessor logic a touch and made it more tolerant of debugging efforts.
2001-03-08Hide BN_CTX structure details.Bodo Möller
Incease the number of BIGNUMs in a BN_CTX.
2000-11-08BN_CTX-related fixes.Bodo Möller
2000-06-01There have been a number of complaints from a number of sources that namesRichard Levitte
like Malloc, Realloc and especially Free conflict with already existing names on some operating systems or other packages. That is reason enough to change the names of the OpenSSL memory allocation macros to something that has a better chance of being unique, like prepending them with OPENSSL_. This change includes all the name changes needed throughout all C files.
2000-02-06Improve bntest slightly, and fix another bug in the BN library.Ulf Möller
2000-02-05Commit patch to bn.h that CVS decided to throw away during 'cvs update',Bodo Möller
and initialize too_many because memset(..., 0, ...) is not used here.
2000-02-05Generate just one error code if iterated SSL_CTX_get() fails.Bodo Möller
Avoid enabled 'assert()' in production library.
2000-02-05New functions BN_CTX_start(), BN_CTX_get(), BN_CTX_end() to accessUlf Möller
temporary BIGNUMs. BN_CTX still uses a fixed number of BIGNUMs, but the BN_CTX implementation could now easily be changed.