summaryrefslogtreecommitdiff
path: root/src/regress/lib/libcrypto (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Add a regress test exercising BIO_dup_chain() and triggering the leaktb2023-08-071-1/+43
| | | | fixed in bio_lib.c r1.47 as confirmed by ASAN.
* Make the bn_rand_interval() API a bit more ergonomictb2023-08-031-5/+5
| | | | | | | | | | | | | | | | | | Provide bn_rand_in_range() which is a slightly tweaked version of what was previously called bn_rand_range(). The way bn_rand_range() is called in libcrypto, the lower bound is always expressible as a word. In fact, most of the time it is 1, the DH code uses a 2, the MR tests in BPSW use 3 and an exceptinally high number appears in the Tonelli-Shanks implementation where we use 32. Converting these lower bounds to BIGNUMs on the call site is annoying so let bn_rand_interval() do that internally and route that through bn_rand_in_range(). This way we can avoid using BN_sub_word(). Adjust the bn_isqrt() test to use bn_rand_in_range() since that's the only caller that uses actual BIGNUMs as lower bounds. ok jsing
* Retire the bn_rand_interval() testtb2023-08-032-115/+1
| | | | | | This test was never particularly useful. An upcoming API change for the internal bn_rand_interval() API would require some adjustments. It's not worth it.
* Remove unused prototypetb2023-08-011-3/+1
|
* Some of these functions no longer exist or are no longer publictb2023-07-281-4/+1
|
* DSO has left the buildingtb2023-07-281-4/+1
|
* dhtest: simplify printing and make the output slightly less uglytb2023-07-281-34/+29
| | | | CID 463174
* Annotate bogus output as incorrecttb2023-07-271-1/+2
| | | | | | Some people already have way too many simple and not too important diffs in their inbox. This isn't worth kicking something more important out of the queue.
* Prepare this test for the upcoming bumptb2023-07-261-1/+3
|
* Remove comment containing an outdated pathtb2023-07-261-2/+1
|
* Fix EC_POINT_is_on_curve() checks.tb2023-07-241-9/+9
| | | | If not even the idiot who invented this API gets this right...
* bio_asn1 tests: drop unneeded variabletb2023-07-211-3/+2
|
* Remove a few workarounds that are no longer necessarytb2023-07-201-4/+1
|
* Add missing commas to test vectorsjoshua2023-07-191-26/+26
| | | | ok tb@
* Add test coverage for SHA3joshua2023-07-191-27/+344
| | | | ok tb@
* ecc_cdh: plug leak of peer public keytb2023-07-161-1/+2
|
* ecdhtest: Drop unnecessary constant and unneeded includestb2023-07-161-10/+6
|
* ecdhtest: fix a couple bugs plus some cosmetic tweakstb2023-07-161-6/+6
|
* Rework the ecdhtesttb2023-07-151-260/+252
| | | | | | | | | Test keyshare for all built-in curves and simplify, especially printing on failure. Incorporate known answer tests from RFC 5114 and RFC 5903. All in all, this is a lot less code and a lot more test coverage and hopefully a little less eyebleed. Very loosely based on OpenSSL b438f0ed by Billy Brumley
* Fix return value check for ECDH_compute_key()tb2023-07-151-5/+5
| | | | | | ECDH_compute_key() usually returns -1 on error (but sometimes 0). This was also the case in OpenSSL when these tests were written. This will soon change. The check for <= 0 will still be correct.
* Add test coverage for cofactor ECDH using NIST test vectorstb2023-07-152-2/+2509
| | | | | | | | | Since all non-binary NIST curves have cofactor 1, this is in effect plain ECDH. Current regress coverage of ECDH is quite lacking on architectures where Go isn't available. This fixes that. Actual cofactor ECDH support may be added soon to libcrypto, at which point I will also add testcases with cofactor > 1.
* Add test case for negative number with highest bit of top octet settb2023-07-101-1/+13
| | | | | This currently adds an incorrect 00: padding, consistent with OpenSSL's behavior.
* Fix whitespacetb2023-07-081-2/+2
|
* partial fix for make -j8 (bluhm@ is sitting right next to me and agreeing)espie2023-07-081-5/+4
| | | | | there is a subtler issue with make regress/make all that will be way more of a headache to sort !
* upstream portable fix for ocsp_testbcook2023-07-071-1/+6
|
* Add test coverage for leading zero octet dancetb2023-07-071-1/+15
|
* fixup for MS compilersbcook2023-07-071-1/+8
|
* bn_print: remove unused bio, plug leaktb2023-07-061-5/+3
|
* Add regress coverage for bn_printftb2023-07-062-1/+283
| | | | | This must be one of the ugliest tests I've ever written, but I can't think of a better way of doing it.
* Codify BN_asc2bn(NULL, *) behavior in regress.tb2023-06-231-1/+11
|
* symbols: Tweak this test so it works with -j Ntb2023-06-221-6/+4
|
* Add tests for BN_sqr() corner cases.jsing2023-06-211-1/+81
| | | | | Test BN_sqr() with a newly allocated BN, a BN explicitly set to zero and small values that fit in a single BN_ULONG.
* Add BN_cmp()/BN_ucmp() tests with zero padded inputs.jsing2023-06-211-1/+25
| | | | | Currently BN_hex2bn() removes the leading zeros, however this will not be the case in the future.
* Add a BN_num_bits() with zero padded input.jsing2023-06-211-4/+13
| | | | | Currently BN_hex2bn() removes the leading zeros, however this will not be the case in the future.
* Fix copy-paste errortb2023-06-201-2/+2
|
* Add regress coverage for BN_num_bits()jsing2023-06-201-1/+35
|
* Make enginetest work with disabled engine supporttb2023-06-191-1/+10
|
* Fix GOST test with disabled enginetb2023-06-191-1/+5
|
* Fix copy+paste error in x509 asn regressjob2023-06-051-3/+3
|
* bn_mod_inverse tweakstb2023-06-041-2/+4
| | | | | Provide prototype that is hidden behind LIBRESSL_INTERNAL for portable and or in result for future extensibility.
* Add regress coverage for BN_mod_inverse()tb2023-06-032-1/+387
| | | | | This would detect the aliasing issue reported by Guido Vranken fixed in bn_gcd.c r1.28. Most testcases are from BoringSSL's regress test.
* fix typotb2023-06-021-2/+2
|
* Correct test that was pasto'ed incorrectlybeck2023-05-291-3/+7
| | | | This now tests what the comment says it does
* Make X509_NAME_get_text_by[NID|OBJ] safer.beck2023-05-291-2/+77
| | | | | | | | | | | | | | | | This is an un-revert with nits of the previously landed change to do this which broke libtls. libtls has now been changed to not use this function. This change ensures that if something is returned it is "text" (UTF-8) and a C string not containing a NUL byte. Historically callers to this function assume the result is text and a C string however the OpenSSL version simply hands them the bytes from an ASN1_STRING and expects them to know bad things can happen which they almost universally do not check for. Partly inspired by goings on in boringssl. ok jsing@ tb@
* Add coverage for calling BN_{dec,hex}2bn() with NULL inputs.jsing2023-05-271-9/+37
|
* Add empty line for consistencytb2023-05-231-1/+2
|
* Add regress coverage for obj_dat.c r1.52tb2023-05-231-1/+44
|
* ecdhtest: Fix indenttb2023-05-201-2/+2
|
* ecdhtest: check malloc() return valuestb2023-05-161-4/+7
| | | | From Ilya Chipitsine
* Assert that test->want != NULL at this pointtb2023-05-131-1/+3
| | | | Should make coverity happier