summaryrefslogtreecommitdiffstats
path: root/test/bntest.c
AgeCommit message (Collapse)Author
2016-08-10Change callers to use the new constants.Rich Salz
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1429)
2016-06-07Add a BN_mod_word test()Matt Caswell
The previous commit fixed a bug with BN_mod_word() which would have been caught if we had a test for it. This commit adds one. Reviewed-by: Andy Polyakov <appro@openssl.org>
2016-05-17Copyright consolidation 02/10Rich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-04-06Add missing mem leak test activation and checksFdaSilvaYY
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-11Fix build break; add function declarationRich Salz
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-12Because bn_expand2 is declared non-static, it must not be staticRichard Levitte
That doesn't change even to make a dummy to hide its unavailability. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-03-11Avoid getting unresolved referense to bn_expand2 in test/bntest.cRichard Levitte
Issue identified on Solaris by Erik Forsberg <erik@efca.com> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-02-09Clean up the tests for auto-init/de-initMatt Caswell
Remove the need to explicitly initialise/deinitialise for the tests Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-30Move more BN internals to bn_lcl.hRich Salz
There was an unused macro in ssl_locl.h that used an internal type, so I removed it. Move bio_st from bio.h to ossl_type.h Reviewed-by: Andy Polyakov <appro@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>
2016-01-13Remove test_probable_prime_coprime from test/bntest.cRichard Levitte
This test relies on a private function, which isn't exported. This test would work better as a unit test in crypto/bn/bn_prime.c. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-12-15Don't export internal symbolsMatt Caswell
On Linux when creating the .so file we were exporting all symbols. We should only be exporting public symbols. This commit fixes the issue. It is only applicable to linux currently although the same technique may work for other platforms (e.g. Solaris should work the same way). This also adds symbol version information to our exported symbols. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-03bn/asm/x86_64-mont5.pl: fix carry propagating bug (CVE-2015-3193).Andy Polyakov
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-09-11Enable -Wmissing-variable-declarations andBen Laurie
-Wincompatible-pointer-types-discards-qualifiers (the latter did not require any code changes). Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-09-07Push the line buffer filter on the out BIO on VMSRichard Levitte
VMS files are normally record oriented rather than stream oriented. This means that every write() will create a new record, which is seen as a line of its own, regardless of if there was a \n in there or not. bntest uses BN_print, which prints out number with more than one write(), thereby dividing up the numbers in several lines, which greatly disturbs the post-bntest checks that expect to find a full formula to calculate on one line. So, for VMS, we need to push the linebuffer filter on the out BIO. Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-09-06Have the test executables output in text modeRichard Levitte
The test executables use standard output and standard error for text output, so let's open the corresponding BIOs in text mode. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-08-31BN_mod_exp_mont_consttime: check for zero modulus.Emilia Kasper
Don't dereference |d| when |top| is zero. Also test that various BIGNUM methods behave correctly on zero/even inputs. Follow-up to b11980d79a52ec08844f08bea0e66c04b691840b Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-08-31Fix spurious bntest failures.Emilia Kasper
BN_bntest_rand generates a single-word zero BIGNUM with quite a large probability. A zero BIGNUM in turn will end up having a NULL |d|-buffer, which we shouldn't dereference without checking. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-06-23RT3856: Fix memory leaks in test codeRussell Webb
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-05-01Use BN_ULONG format.Ben Laurie
Reviewed-by: Andy Polyakov
2015-04-30free NULL cleanup 7Rich Salz
This gets BN_.*free: BN_BLINDING_free BN_CTX_free BN_FLG_FREE BN_GENCB_free BN_MONT_CTX_free BN_RECP_CTX_free BN_clear_free BN_free BUF_MEM_free Also fix a call to DSA_SIG_free to ccgost engine and remove some #ifdef'd dead code in engines/e_ubsec. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-03-31Stop symlinking, move files to intended directoryRichard Levitte
Rather than making include/openssl/foo.h a symlink to crypto/foo/foo.h, this change moves the file to include/openssl/foo.h once and for all. Likewise, move crypto/foo/footest.c to test/footest.c, instead of symlinking it there. Originally-by: Geoff Thorpe <geoff@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>