summaryrefslogtreecommitdiff
path: root/src/regress/lib (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* biotest: Tweak long comment a bittb2022-12-081-11/+13
|
* Add BIO_push() and BIO_set_next() regress coveragetb2022-12-081-1/+367
| | | | | | This tests for the behavior changes in bio_lib.c r1.40 and r1.41 and makes sure that BIO_push() and BIO_set_next() act on two chains in the expected and now documented way.
* bn_mod_exp test: drop extra parentheses for readabilitytb2022-12-081-4/+4
|
* Add a few missing headers and drop a few unused onestb2022-12-067-20/+20
| | | | In bn_test.c include bn_local.h instead of using copy-pasted prototypes.
* Unbreak rust-openssl-tests on sparc64tb2022-12-051-8/+4
| | | | | For the test compilation using the CC crate, base clang is good enough, so we don't need to pull in another heavy dependency just for this test.
* bn_mod_exp.c doesn't need <string.h>tb2022-12-051-2/+1
|
* userspace: remove vestigial '?' cases from top-level getopt(3) loopscheloha2022-12-042-4/+2
| | | | | | | | | | | | | getopt(3) returns '?' when it encounters a flag not present in the in the optstring or if a flag is missing its option argument. We can handle this case with the "default" failure case with no loss of legibility. Hence, remove all the redundant "case '?':" lines. Prompted by dlg@. With help from dlg@ and millert@. Link: https://marc.info/?l=openbsd-tech&m=167011979726449&w=2 ok naddy@ millert@ dlg@
* zap weird spaces $EDITOR added in previoustb2022-12-041-2/+2
|
* skip rust-openssl-tests on sparc64tb2022-12-031-3/+17
| | | | | | | | The issue is likely that the build is trying to compile some generated C code with the prehistoric gcc from base, so add a tentative workaround for that. Since I don't currently have access to a sparc64 box where I could validate this easily and check if the workaround is enough, let's not waste lots of cycles on this.
* Clean up makefiletb2022-12-031-8/+6
|
* biotest needs bio_local.h nowtb2022-12-031-6/+7
| | | | Should have been part of the previous commit
* Test BIO_{push,pop}() along a linear chaintb2022-12-031-1/+135
|
* More cleanuptb2022-12-031-11/+8
| | | | | Drop unnecessary loading of error strings, fix error path and consistently print to stdout.
* Refactor and fix bn_mod_exp testtb2022-12-031-80/+86
| | | | | | | | | | | The amount of copy-paste in this test led to a few bugs and it was hard to spot them since things were done in random order. Use a different approach: compute the result of a^b (mod m) according to BN_mod_exp_simple(), then compare the results of all the other *_mod_exp* functions to that. Reuse the test structure from bn_mod_exp_zero.c to loop over the list of functions. This way we test more functions and don't forget to check some crucial bits.
* Add missing checks for BN_mod_exp_{non,}ct()tb2022-12-031-6/+8
| | | | | | Someone added a few more functions to test, but forgot to check their results, so if they would not do the expected thing that would only be noticed if one of the already tested functions would break.
* Fix some ancient silliness with a random bytetb2022-12-031-8/+5
| | | | | | | For nearly 25 years this test has attempted to generate random numbers of bit length between 192 and 319 bits. Unfortunately, it used an unsigned char so instead of generating numbers in the interval [-64..63] and add them to 256, it used numbers in the intervals [0..63] and [192..255]...
* bn_mod_exp.c: printing to stdout needs no BIOtb2022-12-021-17/+9
|
* bn_mod_exp: we have a BN_CTX available...tb2022-12-021-19/+15
| | | | Use BN_CTX_get() instead of BN_new()/BN_free().
* Check BN_rand() and BN_mod() return valuestb2022-12-021-6/+11
| | | | | CID 430848 CID 430849
* Link new bn_mod_exp_zero test to buildtb2022-12-021-1/+3
|
* Rewrite the tests that various modular exponentiation functionstb2022-12-022-148/+189
| | | | compute a^0 = 0 (mod 1) for all a from scratch.
* libcrypto/bn: switch back to manual regress targetstb2022-12-021-3/+8
| | | | | The previous change had the undesired side effect of running the super verbose run-regress-bn_test.
* regres/libssl/unit: simplify Makefiletb2022-12-021-20/+10
|
* Use regress framework rather than handrolling ittb2022-12-021-12/+1
|
* Use the default targets from bsd.regress.mk as far as possibletb2022-12-021-9/+4
|
* Let bsd.regress.mk take care of running teststb2022-12-021-8/+1
|
* bn_add_sub: no need for a BIO to print to stderrtb2022-12-021-21/+13
|
* Unhook exptb2022-12-011-2/+1
|
* Fix typo, move one .PHONY target nearer to the target itselftb2022-12-011-4/+3
|
* zap extra blank linetb2022-12-011-2/+1
|
* Check that the bn_isqrt -C output isn't changedtb2022-12-012-1/+43
| | | | | | bn_isqrt -C generates code included in lib/libcrypto/lib/bn_isqrt.c. The regress tests already ensure that the content of the tables don't change. Ensure further that the code generation doesn't get out of sync.
* regress/libcrypto: merge exp/ into bn/tb2022-12-013-11/+4
| | | | | | | Move exp/exptest.c to bn/bn_mod_exp.c. This is a BN test that mostly tests a variety of BN_mod_exp*() API behavior and correctness. Commit stolen from jsing
* Silence this test and sprinkle some KNFtb2022-12-011-11/+6
| | | | | This test is fast enough even on very slow machines that printing dots doesn't seem necessary.
* Flatten structure of libcrypto/bn teststb2022-12-0115-116/+62
| | | | | | | | | The bn tests were distributed into three subdirectories rather randomly. It's cleaner and easier to maintain if all this is in a single directory. Use consistent names for the .c files, unify handling of the tests with the exception of bn_test, which is special. Discussed with jsing
* Test prime constants exposed in public BN APItb2022-12-011-1/+97
| | | | | Run the prime constants exposed in BN_get0_nist_prime_*() and BN_get_rfc3526_prime_*() through Ballie-PSW.
* Make tests silent on success.tb2022-12-012-21/+17
| | | | Also, run all x25519 tests, don't stop on first failure.
* Refrain from printing SUCCESS in some of my teststb2022-12-0113-50/+16
| | | | Silence is good. On failure, the regress framework will make it clear.
* BN_one() can fail, check its return value.jsing2022-12-011-3/+5
|
* Add regress coverage for BN_cmp()/BN_ucmp().jsing2022-11-302-3/+347
| | | | | Some tests current fail due to a bug in BN_ucmp(), which will be fixed soon.
* Tweak x509_constraints_uri_host() regress to test for NULL deref intb2022-11-281-1/+3
| | | | fixed in x509_constraints.c r1.29.
* Make internal header file names consistenttb2022-11-2619-38/+38
| | | | | | | | | | | | | | | | Libcrypto currently has a mess of *_lcl.h, *_locl.h, and *_local.h names used for internal headers. Move all these headers we inherited from OpenSSL to *_local.h, reserving the name *_internal.h for our own code. Similarly, move dtls_locl.h and ssl_locl.h to dtls_local and ssl_local.h. constant_time_locl.h is moved to constant_time.h since it's special. Adjust all .c files in libcrypto, libssl and regress. The diff is mechanical with the exception of tls13_quic.c, where #include <ssl_locl.h> was fixed manually. discussed with jsing, no objection bcook
* Units generally help...tb2022-11-251-2/+2
|
* Mark BN_options() and BN_prime_checks as obsolete;schwarze2022-11-241-1/+2
| | | | | it appears that all BN public symbols are now documented, except those intentionally undocumented.
* Fix sparc64 build/runkn2022-11-231-3/+2
| | | | | | constraints.c:269: warning: ISO C90 forbids mixed declarations and code from tb
* Add void casts since gcc 4.2.1 on sparc64 doesn't like the missing returntb2022-11-231-5/+5
| | | | checks for BIO_reset().
* Several improvements required for <openssl/bn.h>:schwarze2022-11-231-26/+39
| | | | | | | | | | * List internal constants and types that are intentionally undocumented. * List unused constants and types that are intentionally undocumented. * Cope with intentionally undocumented identifiers being declared more than once (in this case, because of #if and #else). * Require exact matches for man -k searches (in this case, such that BN_BITS does not match BN_BITS2). * Handle the weird BN_ULONG, which is #define'd instead of using typedef.
* Make a stupid compiler on a stupid OS happy.tb2022-11-231-1/+2
| | | | from bcook
* bn_unit: appease coveritytb2022-11-231-2/+6
| | | | | | | Apparently, the '0' in memset(a, '0', size - 1); could be a typo for '\0'. Randomize the decimal digit to make the intent clear. CID 377009
* asn1_string_to_utf8 test: appease coveritytb2022-11-231-2/+8
| | | | | | | | | | Check for ASN_STRING_to_UTF8() failure before checking it matches our expectations. This should convey clearly that test->want_len is never negative. CID 377011 Diagnosed by jsing
* Neuter getrlimit dance, it's not portable enough. Stupid Windows.tb2022-11-231-14/+4
|