summaryrefslogtreecommitdiff
path: root/src/regress (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* 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.
* More thorough write-afetr-free checks.otto2023-06-041-6/+21
| | | | | | | | | | | | | | | | | | | On free, chunks (the pieces of a pages used for smaller allocations) are junked and then validated after they leave the delayed free list. So after free, a chunk always contains junk bytes. This means that if we start with the right contents for a new page of chunks, we can *validate* instead of *write* junk bytes when (re)-using a chunk. With this, we can detect write-after-free when a chunk is recycled, not justy when a chunk is in the delayed free list. We do a little bit more work on initial allocation of a page of chunks and when re-using (as we validate now even on junk level 1). Also: some extra consistency checks for recallocaray(3) and fixes in error messages to make them more consistent, with man page bits. Plus regress additions.
* 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
|
* Remove the speed test againtb2023-06-011-7/+2
| | | | | It takes too much time and we now know that all covered ciphers can cope with unaligned input and output on all tested architectures.
* 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@
* Refactor tls_check_common_name to use lower level API.beck2023-05-281-2/+4
| | | | | | | | | | | | | | | | | | | | X509_NAME_get_text_by_NID is kind of a bad interface that we wish to make safer, and does not give us the visibility we really want here to detect hostile things. Instead call the lower level functions to do some better checking that should be done by X509_NAME_get_text_by_NID, but is not in the OpenSSL version. Specifically we will treat the input as hostile and fail if: 1) The certificate contains more than one CN in the subject. 2) The CN does not decode as UTF-8 3) The CN is of invalid length (must be between 1 and 64 bytes) 4) The CN contains a 0 byte 4) matches the existing logic, 1 and 2, and 3 are new checks. ok tb@
* Add coverage for calling BN_{dec,hex}2bn() with NULL inputs.jsing2023-05-271-9/+37
|
* Copy the verify param hostflags independently of the host listtb2023-05-241-3/+1
| | | | | | | | | | | | | | | | Without this, hostflags set on the SSL_CTX would not propagate to newly created SSL. This is surprising behavior that was changed in OpenSSL 1.1 by Christian Heimes after the issue was flagged by Quentin Pradet: https://bugs.python.org/issue43522 This is a version of the fix that landed in OpenSSL. There used to be a workaround in place in urllib3, but that was removed at some point. We haven't fixed this earlier since it wasn't reported. It only showed up after recent fallout of extraordinarily strict library checking in urllib3 coming from their own interpretation of the implications of PEP 644. ok jsing
* Add a test to verify that an SSL inherits the hostflags from the SSL_CTXtb2023-05-242-1/+105
| | | | This is currently an expected failure that will be fixed shortly.
* Provide CRYPTO_INT for statically linking libcrypto for libssl regresstb2023-05-241-0/+2
| | | | This will be needed for the ssl_verify_param test
* 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
|
* Add a slow regress target that runs openssl speed with proper alignmenttb2023-05-201-2/+7
| | | | | and with an unaligned offset. Let's see if all ciphers on our strict alignment arches can deal with this.
* 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
* asn1oct: add a couple more teststb2023-05-121-1/+10
|
* asn1oct: minor tweak in error messagetb2023-05-121-3/+3
|
* Add regress coverage for {s2i,i2s}_ASN1_OCTET_STRINGtb2023-05-122-1/+271
|
* Make malloc tests that set flags more robust against the user alsootto2023-05-092-15/+19
| | | | having flags set.
* Add regress coverage for -1 modulus as well.tb2023-05-091-25/+38
|
* Enable malloc_errs testotto2023-05-081-2/+2
|
* Add a regress test to test various malloc API and heap mismanagementotto2023-05-082-0/+291
| | | | | errors which should cause abort. A few are not enabled yet, they will be once the corresponding diffs in malloc are committed.
* symbols.awk: Remove cfb dancetb2023-05-041-4/+2
| | | | With e_old.c gone, we no longer need this.
* sigh. typotb2023-05-041-2/+2
|
* Let ecdsatest exercise ECParameters_dup() a bittb2023-05-041-2/+3
| | | | This currently leaks, which will fixed in a follow-on commit.
* Remove x9_62_test_internal()tb2023-05-041-72/+1
| | | | | | This test depends on RAND_set_rand_method() allowing stupid things like making ECDSA signatures deterministic. This was gutted a long time ago and the function should have followed its wrappers into the attic.
* Revert utf-8 fix for X509_NAME_get_index_by_NID to avoid libtlsbeck2023-05-031-77/+2
| | | | | | | regress for the moment. this will come back after we rethink the failure versus not there case. ok tb@ jsing@
* Change X509_NAME_get_index_by[NID|OBJ] to be safer.beck2023-05-021-2/+77
| | | | | | | | | | | | | | | | | | | | | | Currently these functions return raw ASN1_STRING bytes as a C string and ignore the encoding in a "hold my beer I am a toolkit not a functioning API surely it's just for testing and you'd never send nasty bytes" kind of way. Sadly some callers seem to use them to fetch things liks subject name components for comparisons, and often just use the result as a C string. Instead, encode the resulting bytes as UTF-8 so it is something like "text", Add a failure case if the length provided is inadequate or if the resulting text would contain an nul byte. based on boringssl. nits by dlg@ ok tb@
* Mark the BIO_F_* function codes as intentionally undocumentedschwarze2023-05-021-1/+1
| | | | | | and for now, skip the the BIO_R_* reason codes. It looks like all public symbols in the BIO library are now documented or marked as intentionally undocumented.
* Simplify slightly and use i2d_PKCS7_bio_stream()tb2023-05-021-3/+3
| | | | | This is a wrapper of i2d_ASN1_bio_stream() that doesn't require us to pass in PKCS7_it.
* Make warnings more precisejob2023-05-011-4/+4
|
* x509_asn1: make this test pass again after reinstating DER preservationtb2023-04-301-5/+5
|
* check_complete.pl: update for recent changes in bntb2023-04-301-4/+3
|
* Sort alphabeticallytb2023-04-301-2/+2
|
* Remove unnecessary targettb2023-04-301-4/+1
|
* policy test: simplify Makefiletb2023-04-301-9/+2
|
* Free all libcrypto global state memory before returningjob2023-04-281-1/+3
| | | | Found with the help of Otto's malloc memory leak detector!
* Return a non-zero error exit code on any DER cache discrepanciesjob2023-04-281-3/+3
|
* Fix leaks reported by ASANtb2023-04-281-5/+1
| | | | debugged with job
* Mark the obsolete PROXY_PARAM and SOCKS BIO_ctrl(3) command constantsschwarze2023-04-281-0/+2
| | | | | as intentionally undocumented. Do that here because no related manual pages exist.
* Enable policy checking by default now that we are DAG implementation based.beck2023-04-281-1/+12
| | | | | | | This ensures that we will no longer silently ignore a certificate with a critical policy extention by default. ok tb@
* The policy test is no longer expected to failtb2023-04-281-2/+1
|
* Rearrange freeing of memory in the regress testjob2023-04-281-13/+9
|
* make the policy test compile on sparc64tb2023-04-281-5/+6
|
* Add X509_REQ_add_extensions and to X509_REQ_add1_attr to DER cache testjob2023-04-281-1/+139
| | | | | These new tests won't bubble up a non-zero error exit code because other libcrypto bits still need to land first.
* Hook up the the x509 policy regression tests to x509 regress.beck2023-04-282-3/+4
| | | | | | | | | These were adapted from BoringSSL's regress tests for x509 policy. They are currently marked as expected to fail as we have not enabled LIBRESSL_HAS_POLICY_DAG by default yet, and the old tree based policy code from OpenSSL is special. These tests pass when we build with LIBRESSL_HAS_POLICY_DAG.
* Fix copyright, convert boringssl comments to C stylebeck2023-04-281-30/+51
|