summaryrefslogtreecommitdiff
path: root/src/regress (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* fix include directive - this is make, not Ctb2023-07-151-2/+2
|
* 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.
* Link symbols test to buildtb2023-07-151-1/+2
|
* remove accidentally imported files againtb2023-07-153-2713/+0
|
* Import a version of libcrypto's symbols test for libssltb2023-07-155-0/+2798
|
* Reenable clienttest and servertesttb2023-07-121-3/+3
|
* Fix last bit of the clienttest, needs ssl_pkt.c r1.66tb2023-07-111-2/+2
|
* Keep servertest silent and align with clienttesttb2023-07-111-2/+3
|
* Neuter expected server test failures with SSLv2tb2023-07-111-1/+6
| | | | This test should either be extended or retired. As it is it is useless.
* Fix most of the clienttest. With this only test cases 9 and 13 fail.tb2023-07-111-23/+39
|
* 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.
* Avoid undefined behavior in tlsexttesttb2023-07-051-11/+18
| | | | | | | | | An empty array cannot be initialized and it is an incomplete type, so the sizeof() operator can't be applied to it. Therefore initialize it with a zero byte and replace sizeof() use with lengths. Slightly tweaked version of a patch by inoguchi in portable. Discussed with bcook, beck, kettenis
* Plug leak in the ssltesttb2023-07-041-1/+2
| | | | | | | | Removing -tls1 moved some tests from the legacy stack to the TLSv1.3 stack. On a HRR, the alpn callback would be called twice and allocate the global twice, thereby leaking. So free it up front. Joint suffering with bcook and beck
* add regress tests for the remainder of the function provided by our uuid.hjasper2023-07-031-5/+137
|
* Stop testing tls 1.0 and 1.1beck2023-07-033-9/+5
| | | | They have gone behind the barn.
* Disable TLS 1.0 and TLS 1.1 in libsslbeck2023-07-027-149/+102
| | | | | | | | | | | | Their time has long since past, and they should not be used. This change restricts ssl to versions 1.2 and 1.3, and changes the regression tests to understand we no longer speak the legacy protocols. For the moment the magical "golden" byte for byte comparison tests of raw handshake values are disabled util jsing fixes them. ok jsing@ tb@
* Remove the ability to do tls 1.0 and 1.1 from libtls.beck2023-07-023-20/+13
| | | | | | | | With this change any requests from configurations to request versions of tls before tls 1.2 will use tls 1.2. This prepares us to deprecate tls 1.0 and tls 1.1 support from libssl. ok tb@
* 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
|
* File new test-bleichenbacher-timing-pregenerate.py under failing teststb2023-06-101-1/+3
| | | | until someone finds time and motivation to figure out how to use this.
* Fix copy+paste error in x509 asn regressjob2023-06-051-3/+3
|
* Make ruby-openssl cope with default ruby changetb2023-06-041-2/+2
|
* 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