summaryrefslogtreecommitdiff
path: root/src/regress/lib (follow)
Commit message (Collapse)AuthorAgeFilesLines
* test.c: avoid NULL-dereferencetb2025-05-311-2/+3
| | | | | | | test_init() calls test_new(NULL, NULL), which leads to a segfault. llvm 16 optimizes this away with -O2, however gcc 4.2.1 on sparc64 doesn't. Fix this by only inheriting the out FILE from the parent if the latter is non-NULL.
* Add test whether fflush() complies POSIX for the handling ofyasuoka2025-05-251-1/+82
| | | | pushed-back wchar_t chars.
* Add test for ungetwc().yasuoka2025-05-252-1/+94
|
* Add tests for the functions in <stdio_ext.h>.yasuoka2025-05-257-2/+455
|
* Include "stdio" in SUBDIR. This should have been done along with theyasuoka2025-05-251-4/+4
| | | | previous commit.
* Add regress/lib/libc/stdio/test_fflush.c to test fflush() behavior foryasuoka2025-05-242-0/+236
| | | | | | reading FILE objects. It will fail until fflush() complies POSIX-2008. ok tb asou
* Adapt to new maloc_options declarationotto2025-05-241-2/+2
|
* Adapt test to new malloc_options regimeotto2025-05-241-7/+8
|
* Add the ability to run individual ruby ssl test for figuring outbeck2025-05-231-1/+16
| | | | | | what is going on when these break ok tb@
* asn1: merge invalid generalized time tests into invalid time testsjoshua2025-05-221-16/+10
| | | | | | | | | | | Previously, invalid generalized time tests were split into a separate set of test vectors and a flag was used when calling the test function to indicate they should be tested as generalized only. This simplifies the code a bit, and makes converting to the new test framework easier. ok jsing
* Convert sha_test to use new test frameworkjoshua2025-05-222-153/+141
| | | | ok beck
* Convert md_test to use new test frameworkjoshua2025-05-222-122/+106
| | | | ok jsing tb beck
* Fix test_errorf macro expanding to two linesjoshua2025-05-221-4/+8
| | | | | This caused test_fail to always be called when used in certain conditions, and wrapping with do {} while (0) fixes this.
* Add basic HKDF test using EVP_PKEY_HKDFkenjiro2025-05-221-1/+81
| | | | | | | | Add a basic test case for HKDF using EVP_PKEY_HKDF to evp_test.c. This test verifies the correct derivation of output keying material using SHA-256, matching the test vector from RFC 5869 Appendix A.1. ok tb@ joshua@
* Add initial regress test frameworkjoshua2025-05-213-0/+408
| | | | | | | | | | Add a test framework for use in LibreSSL regression tests. This test framework aims to be as lightweight and as simple to use as possible. The design is mostly inspired by Go's test system, and aims to be a drop-in utility in most existing regress tests. ok jsing tb beck
* Add NULL checks to HKDF and TLS1-PRF EVP_PKEY cleanup functionskenjiro2025-05-211-1/+3
| | | | | | | | Check if ctx->data is NULL before calling freezero(). Also add HKDF and TLS1-PRF to the EVP_PKEY cleanup regression test, as they no longer crash with this change. ok tb@
* mlkem_unittest: fix typo in commenttb2025-05-211-2/+2
|
* Make MLKEM1024_marshal_private_key consistent with the public_key funcitonsbeck2025-05-205-39/+24
| | | | | | | | Even though this should remain internal, make it the same as the public key marshal function, and make the needed fallout changes in regress. ok kenjiro@, tb@
* Fix up MLKEM768_marshal_private_key to not use a passed in CBBbeck2025-05-195-26/+11
| | | | | | | | | | | | Even though this should remain internal, make it the same as the public key marshal function, and make the needed fallout changes in regress. This does not yet do the bikeshed of renaming the structure field in the regress ctx, that will wait until a follow on to convert 1024 in a similar manner ok tb@
* API changes for ML-KEMbeck2025-05-195-98/+77
| | | | | | | | | - Get rid of CBB/CBS usage in public api - Make void functions return int that can fail if malloc fails. Along with some fallout and resulting bikeshedding in the regress tests. ok jsing@, tb@
* bio_dump: only run strncmp if there's something to comparetb2025-05-181-2/+2
|
* Stop using CRYPTO_gcm128_init() and stack allocated GCM128_CONTEXT.jsing2025-05-161-16/+16
| | | | | | | Since struct gcm128_context is not exposed via a public header, there is no way CRYPTO_gcm128_init() can actually be used properly. Instead, use CRYPTO_gcm128_new() and CRYPTO_gcm128_free_bird()^WCRYPTO_gcm128_release() (naming consistency is apparently hard).
* merge the x509name test into x509_name_test.ctb2025-05-054-73/+125
| | | | | | | | | | | | | Remove the old x509name test and its Makefile rule. Its logic has been fully integrated into x509_name_test.c using a new table-driven approach. Each x509 name entry is added and validated step by step, checking both the string representation produced by X509_NAME_print_ex() and the internal RDN set structure. This makes the test easier to extend and maintain, and eliminates the need for an external .expected file or output diff. From Kenjiro Nakayama (with tiny tweaks)
* Improve the pqueue testtb2025-05-043-48/+57
| | | | | | | This simplifies the test in portable and makes the whole thing a bit less ugly overall. From Kenjiro Nakayama with minor tweaks by me
* Remove the three test cases covering prime239v*tb2025-05-041-121/+1
|
* Verify that the selected key share is indeed group 29tb2025-05-031-1/+6
| | | | From Kenjiro Nakayama
* mlkem_unittest: check return value of decap()tb2025-05-031-5/+11
| | | | From Kenjiro Nakayama
* mlkem_tests: add an empty line for consistencytb2025-05-031-1/+2
|
* tlsexttest: remove check that clients receive SNI before ALPNtb2025-04-301-33/+3
| | | | | | The next commit will remove the kludge for compatibility of Apache with older libressl, so remove the corresponding regress coverage and only check that PSK is the last extension.
* c2sp: drop OpenSSL 1.1 and 3.2, add 3.5tb2025-04-271-2/+2
|
* Enable remaining tests with NULL, 0tb2025-04-142-9/+3
| | | | Now that libc is fixed, we can do this also for md5, rmd160 and sha1.
* Link hash regress to buildtb2025-04-141-1/+2
|
* Add some regress coverage for the hashes in libctb2025-04-142-0/+946
| | | | Prompted by a pending diff by claudio
* parse_test_file()tb2025-04-131-1/+3
| | | | | | gcc 14 needs a hint that ld != NULL beyond the use of ld->data in the previous line. I guess aggressive inlining is becoming too aggressive. What a pile of junk.
* Avoid compiler warning on some OStb2025-04-131-1/+1
| | | | | | | | Some OS declare arc4random() with __attribute__((warn_unused_result)) causing this test to whine. So explicitly ignore the return value. Reported by scheiba in libressl/portable Fixes #1151
* Adjust x509_name_regress to the X509_NAME_print() fix in a_strex.c r1.38tb2025-03-191-15/+2
|
* Add regress coverage for X509_NAME_oneline and X509_NAME_printtb2025-03-152-1/+314
|
* Test SSL_OP_NO_RENEGOTIATION and SSL_OP_ALLOW_CLIENT_RENEGOTIATION.jsing2025-03-121-1/+56
| | | | | Extend renegotiation tests to cover SSL_OP_NO_RENEGOTIATION and SSL_OP_ALLOW_CLIENT_RENEGOTIATION.
* ec_asn1_test: Prepare for upcoming bumptb2025-03-082-8/+11
| | | | | Linking statically, pull in ec_local.h and provide a prototype for EC_GROUP_new(), which will be removed from the public API.
* asn1object: improve error message to include returned valuetb2025-02-261-2/+2
| | | | From Kenjiro Nakayama
* recp -> reciprocal renaming in teststb2025-02-122-7/+7
|
* Improve detection and handling of alerts in renegotiation regress.jsing2025-02-011-23/+76
|
* Hook renegotiation regress.jsing2025-02-011-1/+2
|
* Fix certificate paths.jsing2025-02-011-4/+4
|
* Add regress coverage for TLS renegotiation.jsing2025-02-012-0/+560
|
* Remove pointless call to EC_GROUP_precompute_mul()tb2025-01-241-3/+1
|
* ectest: zap stray whitespacetb2025-01-221-2/+2
|
* ectest: fix misleading indentationtb2025-01-221-5/+7
|
* ectest: remove unused definestb2025-01-221-5/+1
|
* ectest: even more lipsticktb2025-01-221-17/+15
|