summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_err.c
AgeCommit message (Collapse)Author
2019-09-12util/mkerr.pl: make it not depend on the function codeRichard Levitte
The output C code was made to use ERR_func_error_string() to see if a string table was already loaded or not. Since this function returns NULL always, this check became useless. Change it to use ERR_reason_error_string() instead, as there's no reason to believe we will get rid of reason strings, ever. To top it off, we rebuild all affected C sources. Fixes #9756 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9756)
2019-07-16Regenerate mkerr filesRich Salz
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9058)
2019-07-15Make sure all BIGNUM operations work within the FIPS providerMatt Caswell
The FIPS provider does not have a default OPENSSL_CTX so, where necessary, we need to ensure we can always access an explicit OPENSSL_CTX. We remove functions from the FIPS provider that use the default OPENSSL_CTX, and fixup some places which were using those removed functions. Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9310)
2019-06-12Make BIGNUM code available from within the FIPS moduleMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9130)
2019-06-12Create BN_CTX_new_ex() and BN_CTX_secure_new_ex()Matt Caswell
These variants of BN_CTX_new() and BN_CTX_secure_new() enable passing an OPENSSL_CTX so that we can access this where needed throughout the BIGNUM sub library. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9130)
2018-12-06Following the license change, modify the boilerplates in crypto/bn/Richard Levitte
[skip ci] Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7777)
2018-04-26Add missing error code when alloc-return-nullFdaSilvaYY
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6085)
2018-04-03Set error code on alloc failuresRich Salz
Almost all *alloc failures now set an error code. Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/5842)
2017-08-03Add RAND_priv_bytes() for private keysRich Salz
Add a new global DRBG for private keys used by RAND_priv_bytes. Add BN_priv_rand() and BN_priv_rand_range() which use RAND_priv_bytes(). Change callers to use the appropriate BN_priv... function. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/4076)
2017-06-07make error tables const and separate header fileRich Salz
Run perltidy on util/mkerr Change some mkerr flags, write some doc comments Make generated tables "const" when genearting lib-internal ones. Add "state" file for mkerr Renerate error tables and headers Rationalize declaration of ERR_load_XXX_strings Fix out-of-tree build Add -static; sort flags/vars for options. Also tweak code output Moved engines/afalg to engines (from master) Use -static flag Standard engine #include's of errors Don't linewrap err string tables unless necessary Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3392)
2016-07-20Check for errors allocating the error strings.Kurt Roeckx
Reviewed-by: Richard Levitte <levitte@openssl.org> GH: #1330
2016-05-23Remove unused error/function codes.Rich Salz
Add script to find unused err/reason codes Remove unused reason codes. Remove entries for unused functions Reviewed-by: Matt Caswell <matt@openssl.org>
2016-05-17Manual fixes after copyright consolidationRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-26Remove /* foo.c */ commentsRich Salz
This was done by the following find . -name '*.[ch]' | /tmp/pl where /tmp/pl is the following three-line script: print unless $. == 1 && m@/\* .*\.[ch] \*/@; close ARGV if eof; # Close file to reset $. And then some hand-editing of other files. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2015-11-05Rebuild error source files.Dr. Stephen Henson
Rebuild error source files: the new mkerr.pl functionality will now pick up and translate static function names properly. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-05-22Reject negative shifts for BN_rshift and BN_lshiftMatt Caswell
The functions BN_rshift and BN_lshift shift their arguments to the right or left by a specified number of bits. Unpredicatable results (including crashes) can occur if a negative number is supplied for the shift value. Thanks to Mateusz Kocielski (LogicalTrust), Marek Kroemeke and Filip Palian for discovering and reporting this issue. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-04-27Error checking and memory leak fixes in NISTZ256.Emilia Kasper
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-08Prepare for bn opaquify. Implement internal helper functions.Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2013-06-13Add secure DSA nonce flag.Adam Langley
This change adds the option to calculate (EC)DSA nonces by hashing the message and private key along with entropy to avoid leaking the private key if the PRNG fails.
2013-06-04Ensure that, when generating small primes, the result is actually of theAdam Langley
requested size. Fixes OpenSSL #2701. This change does not address the cases of generating safe primes, or where the |add| parameter is non-NULL. Conflicts: crypto/bn/bn.h crypto/bn/bn_err.c
2007-04-19fix error codesBodo Möller
2006-11-21Update from 0.9.8 stable. Eliminate duplicate error codes.Dr. Stephen Henson
2005-05-16Implement fixed-window exponentiation to mitigate hyper-threadingBodo Möller
timing attacks. BN_FLG_EXP_CONSTTIME requests this algorithm, and this done by default for RSA/DSA/DH private key computations unless RSA_FLAG_NO_EXP_CONSTTIME/DSA_FLAG_NO_EXP_CONSTTIME/ DH_FLAG_NO_EXP_CONSTTIME is set. Submitted by: Matthew D Wood Reviewed by: Bodo Moeller
2005-05-11Fix more error codes.Bodo Möller
(Also improve util/ck_errf.pl script, and occasionally fix source code formatting.)
2005-04-26some updates for the blinding code; summary:Nils Larsch
- possibility of re-creation of the blinding parameters after a fixed number of uses (suggested by Bodo) - calculatition of the rsa::e in case it's absent and p and q are present (see bug report #785) - improve the performance when if one rsa structure is shared by more than a thread (see bug report #555) - fix the problem described in bug report #827 - hide the definition ot the BN_BLINDING structure in bn_blind.c
2005-04-26Fix various incorrect error function codes.Bodo Möller
("perl util/ck_errf.pl */*.c */*/*.c" still reports many more.)
2005-04-12Rebuild error codes.Dr. Stephen Henson
2004-07-06Improve error handling if decompression of an ec point fails, and cleanupGeoff Thorpe
ec_curve.c (unify comments, etc). Submitted by: Nils Larsch Reviewed by: Bodo Moeller, Geoff Thorpe
2003-03-20Make sure we get the definition of OPENSSL_NO_ERR.Richard Levitte
2002-08-02Binary field arithmetic contributed by Sun Microsystems.Bodo Möller
The 'OPENSSL_NO_SUN_DIV' default is still subject to change, so I didn't bother to finish the CHANGES entry yet. Submitted by: Douglas Stebila <douglas.stebila@sun.com>, Sheueling Chang <sheueling.chang@sun.com> (CHANGES entry by Bodo Moeller)
2001-02-19Make all configuration macros available for application by makingRichard Levitte
sure they are available in opensslconf.h, by giving them names starting with "OPENSSL_" to avoid conflicts with other packages and by making sure e_os2.h will cover all platform-specific cases together with opensslconf.h. I've checked fairly well that nothing breaks with this (apart from external software that will adapt if they have used something like NO_KRB5), but I can't guarantee it completely, so a review of this change would be a good thing.
2001-02-08Integrate my implementation of a countermeasure againstBodo Möller
Bleichenbacher's DSA attack. With this implementation, the expected number of iterations never exceeds 2. New semantics for BN_rand_range(): BN_rand_range(r, min, range) now generates r such that min <= r < min+range. (Previously, BN_rand_range(r, min, max) generated r such that min <= r < max. It is more convenient to have the range; also the previous prototype was misleading because max was larger than the actual maximum.)
2000-12-04Change error message to "bignum too long"Bodo Möller
2000-12-03Don't allow BIGNUMs to become so large that computations with dmaxBodo Möller
might overflow.
2000-11-30BN_sqrtBodo Möller
2000-11-29Expand expspeed.c to make BN_kronecker timings.Bodo Möller
This caused a segmentation fault in calls to malloc, so I cleaned up bn_lib.c a little so that it is easier to see what is going on. The bug turned out to be an off-by-one error in BN_bin2bn.
2000-11-26More BN_mod_... functions.Bodo Möller
2000-06-08Slightly faster DSA verification (BN_mod_exp2_mont),Bodo Möller
marginally faster BN_mod_exp for 1024 bit exponents.
2000-06-07Speed up DH with small generator.Bodo Möller
2000-03-05Preserve reason strings in automatically build tables.Bodo Möller
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.
1999-04-24Complete rewrite of the error code generation script. It now runs as a singleDr. Stephen Henson
script, translates function codes better and doesn't need the K&R function prototypes to work (NB. the K&R prototypes can't be wiped just yet: they are still needed by the DEF generator...). I also ran the script with the -rewrite option to update all the header and source files.
1999-04-23Change #include filenames from <foo.h> to <openssl.h>.Bodo Möller
Submitted by: Reviewed by: PR:
1999-04-19Change functions to ANSI C.Ulf Möller
1999-04-19Fix typos in error codes.Ulf Möller
1999-01-28Fixes to BN code. Previously the default was to define BN_RECURSIONMark J. Cox
but the BN code had some problems that would cause failures when doing certificate verification and some other functions. Submitted by: Eric A Young from a C2Net version of SSLeay Reviewed by: Mark J Cox PR:
1998-12-22Various cleanups and fixed by Marc and Ralf to start the OpenTLS projectRalf S. Engelschall
1998-12-21Import of old SSLeay release: SSLeay 0.9.1b (unreleased)SSLeayRalf S. Engelschall