summaryrefslogtreecommitdiff
path: root/src/regress/lib (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* parse test file: add helper to skip to end of linetb2024-12-271-8/+12
|
* OpenSSL 1.1 is dead. Make this optionally use 3.3 instead.tb2024-12-271-4/+4
|
* Fix the unittest with Emscriptentb2024-12-261-5/+26
| | | | | | Split main into two helper functions since having a few ML-KEM key blobs on the stack makes Emscripten's stack explode, leading to inscrutable silent failures unles ASAN is enabled. Go figure.
* mlkem iteration test: drop extraneous typedeftb2024-12-261-4/+1
|
* mlkem tests: whitespace tweak and fix an error messagetb2024-12-261-5/+7
|
* fat fingerstb2024-12-261-2/+2
|
* Overhaul ML-KEM regress once moretb2024-12-2620-2571/+2110
| | | | | | | | | | | | | | | | | | | | | | Implement a file parser that drives a state machine to extract the test data from the .txt files and manages the parsed data. Comments and empty lines are ignored. The code currently assumes that instruction lines are at the start of the file (which isn't generally true) and only supports two line types for now. This is good enough for all the ML-KEM tests but should be easy enough to extend. Once all data for a test case is parsed in the expected order, a test handler is called which can retrieve the test data via a simple API and throw warnings and errors with information on the test case line number, etc. Merge the tests into three programs: one parsing the .txt files and running the corresponding test cases, a unit test and the iteration tests. Deduplicate the actual test code and let the caller pass in an object containing the API functions, private keys and arrays that need to be different between the 768 version and the 1024 version. This way we don't have two sets of half a dozen .c files differing only in 3 or 4 occurrences of 768 and 1024. All this will also make it a lot easier to hook these tests into portable.
* Remove already disabled tests for elliptic curves of small ordertb2024-12-243-880/+3
|
* mlkem regress: garbage collect two global variablestb2024-12-201-4/+1
|
* Fix whitespace in Makefiletb2024-12-201-22/+22
|
* That works better with a Gtb2024-12-201-2/+2
|
* cant't -> can'ttb2024-12-2010-20/+20
| | | | (the mystery of spotting typos right after commit strikes again)
* Rework and fix the mlkem teststb2024-12-2016-997/+1824
| | | | | | | | | | | | | | | | | Make proper use of CBB and CBS. If a CBS ever owns data, you're holding it wrong. Ditch gross macros, sscanf, and globals. The use of fgets is annoying here, so replace it with getline, which be provided by portable if needed. Most importantly, make the tests actually signal failure rather than only printing an error. Fix the state machines in a few of them. Some tests didn't parse the .txt file at all. Others mostly did but didn't actually test what they were supposed to be testing. Such failures were hidden by the way the tests were written. This basically needed a complete revamp. It still isn't pretty and much of it could be deduplicated, but I only have so much time alotted on this blue planet.
* mlkem regress: reach around into bytestring againtb2024-12-191-1/+2
|
* Close fp before exit since we clean up other stufftb2024-12-174-4/+8
| | | | From Kenjiro Nakayama
* Plug leak coming from debug leftovertb2024-12-172-4/+2
| | | | There's still CBS holding data in here. Yuck.
* Stop reaching into libcrypto/bytestringtb2024-12-141-2/+1
|
* Normalize top of filestb2024-12-1415-109/+138
| | | | RCS marker, KNF for comment, fix and sort includes as usual.
* Add ML-KEM 1024 from BoringSSLbeck2024-12-1313-3/+5262
| | | | | | | | | | | | | | | Changes include conversion from C++, basic KNF, then adaptation to use our sha3 functions for sha3 and shake instead of the BorinSSL version. This Adds units tests to run against BoringSSL and NIST test vectors. The future public API is the same as Boring's - but is not yet exposed pending making bytestring.h public (which will happen separately) and a minor bump Currently this will just ensure we build and run regress. ok tb@ to get it into the tree and massage from there.
* Add ML-KEM 768 from BoringSSLbeck2024-12-1316-1/+5426
| | | | | | | | | | | | | | | Changes include conversion from C++, basic KNF, then adaptation to use our sha3 functions for sha3 and shake instead of the BorinSSL version. This Adds units tests to run against BoringSSL and NIST test vectors. The future public API is the same as Boring's - but is not yet exposed pending making bytesring.h public (which will happen separately) and a minor bump Currently this will just ensure we build and run regress. ok tb@ to get it into the tree and massage from there.
* Add regress coverage for tls_peer_cert_common_name()tb2024-12-102-0/+17
|
* Mark four "struct *_st" types declared in evp.h as intentionally undocumentedschwarze2024-12-091-0/+2
| | | | | because they are intended as internal, and applications are supposed to use the documented aliases DH, DSA, EC_KEY, and RSA from ossl_typ.h instead.
* Mark four EVP_PKEY_GOST* constants as intentionally undocumentedschwarze2024-12-091-0/+2
| | | | because they are completely unused by anything.
* Mark two symbols as intentionally undocumentedschwarze2024-12-091-1/+3
| | | | that are obsolete after PBE was mostly removed from LibreSSL.
* Mark four EVP control constants as intentionally undocumentedschwarze2024-12-091-2/+3
| | | | that are only used for GOST.
* Mark EVP_CTRL constants for RC5 as intentionally undocumentedschwarze2024-12-091-0/+1
| | | | | because LibreSSL does not support RC5 and because these constants are almost unused in the wild.
* Mark three EVP_PKEY control constants for CMS as intentionally undocumentedschwarze2024-12-051-0/+2
| | | | that are internal to the library and unused in the wild
* mark three more EVP_PKEY control constants as intentionally undocumentedschwarze2024-12-051-0/+3
| | | | that are only intended for internal use and unused in the wild
* ignore DECLARE_PKCS12_STACK_OF such that pkcs12.h can be parsedschwarze2024-12-051-0/+1
|
* Mark six EVP_PKEY control constants as intentionally undocumentedschwarze2024-11-291-0/+4
| | | | | that are only intended for internal use, do very little (only validity checking), are unused in the wild, and marked obsolete in OpenSSL 3.
* Mark nine unused EVP constants as intentionally undocumented.schwarze2024-11-291-5/+10
| | | | Fix related indentation while here.
* Disable regression tests for small builtin curvestb2024-11-244-5/+29
|
* Add regress coverage for the size_t constant time comparisions.jsing2024-11-081-26/+120
|
* ec_asn1_test: remove extra parenstb2024-11-081-4/+4
|
* bn_convert: avoid a zero-sized allocationtb2024-11-051-2/+2
|
* ec_asn1_test: remove debug leftover that broke the build on Windowstb2024-11-051-3/+1
|
* ec tests: allow linking against eopenssltb2024-11-042-3/+16
|
* Add regress coverage for BN_bn2binpad() and BN_bn2lebinpad().jsing2024-11-031-3/+137
|
* Add some additional BN conversion test cases.jsing2024-11-031-3/+21
|
* ec_asn1_test: I somehow managed to commit the version without freezero...tb2024-11-021-3/+4
|
* ec_asn1_test: set compressed coordinates for the "simple" generatortb2024-11-011-3/+3
|
* Also exercise the "simple" version of the builtin curves, not only "mont"tb2024-11-011-27/+124
|
* Split ec_key_test_point_encoding() into chunks of saner sizetb2024-10-291-49/+172
|
* ec_asn1_test: point doubling is fine, the leak is elsewheretb2024-10-291-3/+1
| | | | (will be fixed shortly).
* Disable point doubling for now, it leaks due to a doc bug.tb2024-10-291-1/+3
| | | | | Can't replace it with adding the point to itself since that also leaks (another doc bug). Who would've thought.
* unifdef -m -DCORRECT_PRIV_KEY_PADDING=1 ec_asn1_test.ctb2024-10-281-9/+1
|
* Enable the tests that depend on correct private key paddingtb2024-10-281-2/+2
|
* c2sp: run test against openssl/3.4 if it is installedtb2024-10-281-2/+2
|
* {d2i,i2d}_ECParameters() also want a bit of exercisingtb2024-10-261-1/+28
|
* ec_asn1_test: play some silly games to cover a few more code pathstb2024-10-261-1/+47
|