summaryrefslogtreecommitdiff
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Link new md test to regress.tb2022-09-021-1/+2
|
* New md4/md5 regress teststb2022-09-022-0/+310
| | | | | | These exercise MD4 and MD5 with the test vectors from RFCs 1320 and 1321. From Joshua Sing <joshua () hypera ! dev>
* Add two consttb2022-09-021-3/+3
|
* Make test tables static const and fix a style nittb2022-09-021-5/+4
|
* Simplify and clean up the ecdsa test a little. Use stdio instead of BIOtb2022-09-021-195/+177
| | | | for output, use 'err' as a label and avoid some silly repetitions.
* Retire old SHA teststb2022-09-026-609/+0
| | | | | | The old tests were incomplete, some of them had no license and the code quality was questionable. The new tests by Joshua Sing cover what they did (and additionally SHA-224 and SHA-384). Many thanks!
* Unhook old SHA teststb2022-09-021-4/+1
|
* Add tests for 1 million repeated "a"tb2022-09-021-39/+220
| | | | From Joshua Sing
* Check sk_SSL_CIPHER_push() return valuetb2022-09-011-4/+11
| | | | | | CID 24797 ok jsing
* Link sha test to regresstb2022-09-011-1/+2
|
* Add a nicely licensed, table-driven test for SHAtb2022-09-012-0/+448
| | | | | | | This tests covers the NIST vectors for SHA-{1,224,256,384,256} and will soon be able to replace the old SHA tests entirely. From Joshua Sing <joshua () hypera ! dev>
* Add an empty line for consistency.tb2022-08-311-1/+2
|
* Recommit -r1.45 but without error checking EVP_PKEY_copy_parameters()tb2022-08-311-4/+12
| | | | | | | | EVP_PKEY_copy_parameters() will unconditionally fail if the pkey's ameth has no copy_params(). Obviously this is indistinguishable from actual failure... ok jsing
* Revert r1.46. Causes fireworks in regress.tb2022-08-311-9/+5
|
* Remove most mentions of contexts on the stack.tb2022-08-312-23/+4
|
* nasty whitespacetb2022-08-311-9/+9
|
* Rework DSA_size() and ECDSA_size()tb2022-08-312-43/+32
| | | | | | | | | | | | | | | | | | | DSA_size() and ECDSA_size() have a very special hack. They fudge up an ASN1_INTEGER with a size which is typically > 100 bytes, backed by a buffer of size 4. This was "fine", however, since they set buf[0] = 0xff, where the craziness that was i2c_ASN1_INTEGER() only looks at the first octet (one may then ask why a buffer of size 4 was necessary...). This changed with the rewrite of i2c_ASN1_INTEGER(), which doesn't respect this particular hack and rightly assumes that it is fed an actual ASN1_INTEGER... Instead, create an appropriate signature and use i2d to determine its size. Fixes an out-of-bounds read flagged by ASAN and oss-fuzz. ok jsing
* Avoid division by zero if no connection was made.tb2022-08-311-4/+2
| | | | CID 184043
* Some missing return checkstb2022-08-311-3/+5
|
* Avoid some buffer overflows in ecdsatesttb2022-08-311-2/+15
| | | | | | The ASN.1 encoding of the modified ECDSA signature can grow in size due to padding of the ASN.1 integers. Instead of reusing the same signature buffer freshly allocate it. Avoids some buffer overflows caught by ASAN.
* Revert previous. Committed the wrong version of the diff.tb2022-08-311-14/+4
|
* Avoid some buffer overflows in ecdsatesttb2022-08-311-4/+14
| | | | | | The ASN.1 encoding of the modified ECDSA signature can grow in size due to padding of the ASN.1 integers. Instead of reusing the same signature buffer freshly allocate it. Avoids some buffer overflows caught by ASAN.
* Switch loop bounds from size_t to int in check_hosts()tb2022-08-311-2/+2
| | | | | | | | | sk_num() can return a negative value, in which case the upper bound is SIZE_MAX, which results in a very long for loop. CID 153997 ok jsing
* Check return values in ssl_print_tmp_key()tb2022-08-311-4/+9
| | | | | | | | | | Use EVP_PKEY_get0_EC_KEY() instead of the get1 version to avoid an EVP_PKEY_free(). Check return values: if either EVP_PKEY_get0_EC_KEY() or EC_KEY_get0_group() fail, a NULL dereference occurs. CID 43289 ok jsing
* Avoid potential NULL dereference in ssl_set_pkey()tb2022-08-311-5/+9
| | | | | | | | | | | Switch from X509_get_pubkey() to X509_get0_pubkey() to avoid an unnecessary EVP_PKEY_free(). Check the return values of X509_get0_pubkey() and EVP_PKEY_copy_parameters(). If the former returns NULL, the latter will dereference NULL. CID 25020 ok jsing
* Check HMAC() return value to avoid a later use of uninitializedtb2022-08-301-3/+7
| | | | CID 25421
* Remove a commented-out sk_push that has been hanging around for > 20 yearstb2022-08-301-4/+1
|
* chacha20_poly1305_cleanup() should return 1tb2022-08-301-2/+2
| | | | | | Otherwise EVP_CIPHER_CTX_cleanup() leaks, as spotted by the ASAN CI. ok jsing
* Plug leak of BIO in tls13_quic_init()tb2022-08-301-2/+1
| | | | | | | If rbio and wbio are the same, SSL_free() only frees one BIO, so the BIO_up_ref() before SSL_set_bio() leads to a leak. ok jsing
* Plug memory leak in X509_REQ_print_ex()tb2022-08-301-2/+4
| | | | | | CID 356353 ok jsing
* missing periodtb2022-08-291-2/+2
|
* Provide ERR_R_INIT_FAIL.jsing2022-08-292-3/+4
| | | | | | Needed for an upcoming change. ok tb@
* Provide ASN1_R_TYPE_NOT_PRIMITIVE.jsing2022-08-292-2/+4
| | | | | | Needed for an upcoming change. ok tb@
* static const, not const staticjsg2022-08-291-3/+3
| | | | | | | | | c99 6.11.5: "The placement of a storage-class specifier other than at the beginning of the declaration specifiers in a declaration is an obsolescent feature." ok miod@ tb@
* Plug memory leak in CMS_add_simple_smimecap() in the unlikely event thattb2022-08-281-3/+6
| | | | | | ASN1_INTEGER_set() fails. ok jsing
* Add regress test for the encoding of an ASN1_INTEGER with NULL data.jsing2022-08-281-1/+38
|
* Encode an ASN.1 INTEGER with NULL data to value of zero.jsing2022-08-281-2/+4
| | | | | | | | | | | When an ASN1_INTEGER is created it has NULL data until a value is set - previously, an ASN1_INTEGER in this state encoded to an ASN.1 INTEGER with a value of 0, rather than being treated as an error. While code should really set values, the historical behaviour has not required this. Found the hard way by sthen@ with acme-client. ok tb@
* remove unused blowfish inline definesjsg2022-08-281-8/+1
| | | | inline use was removed in 1998
* Wire up QUIC regress.jsing2022-08-271-1/+2
|
* Add regress for QUIC.jsing2022-08-272-0/+358
| | | | | This exercises the libssl QUIC implementation and completes a TLS handshake using the SSL_QUIC_METHOD interface.
* Handle SSL_do_handshake() being called before SSL_provide_quic_data().jsing2022-08-271-1/+4
| | | | | | | If SSL_do_handshake() is called before SSL_provide_quic_data() has been called, the QUIC read buffer will not have been initialised. In this case we want to return TLS13_IO_WANT_POLLIN so that the QUIC stack will provide handshake data.
* Provide additional defines for EVP AEAD.jsing2022-08-271-1/+18
| | | | | | | While these will not be used by LibreSSL, they are used by some QUIC implementations (such as ngtcp2). ok tb@
* Revise regress now that SSL_QUIC_METHOD exists.jsing2022-08-211-4/+6
|
* Provide the remaining QUIC API.jsing2022-08-212-2/+149
| | | | | | | While more work is still required, this is sufficient to get ngtcp2 to compile with QUIC and for curl to be able to make HTTP/3 requests. ok tb@
* Wire up SSL_QUIC_METHOD callbacks to the record layer callbacks for QUIC.jsing2022-08-213-19/+59
| | | | ok tb@
* Provide SSL_QUIC_METHOD.jsing2022-08-213-9/+172
| | | | | | | | | | | | | | | | | | | This provides SSL_QUIC_METHOD (aka ssl_quic_method_st), which allows for QUIC callback hooks to be passed to an SSL_CTX or SSL. This is largely ported/adapted from BoringSSL. It is worth noting that this struct is not opaque and the original interface exposed by BoringSSL differs to the one they now use. The original interface was copied by quictls and it appears that this API will not be updated to match BoringSSL. To make things even more challenging, at least one consumer does not use named initialisers, making code completely dependent on the order in which the function pointers are defined as struct members. In order to try to support both variants, the set_read_secret/set_write_secret functions are included, however they have to go at the end. ok tb@
* Provide and use QUIC specific error reasons.jsing2022-08-213-5/+9
| | | | ok tb@
* Ensure that SSL_{peek,read,write}() are not called if QUIC is in use.jsing2022-08-211-1/+16
| | | | ok tb@
* Prepare to provide SSL_ERROR_WANT_{ASYNC,ASYNC_JOB,CLIENT_HELLO_CB}jsing2022-08-211-10/+15
| | | | | | | LibreSSL will not return these values, however software is starting to check for these as return values from SSL_get_error(). ok tb@
* fix indent and zap trailing whitespacetb2022-08-211-3/+3
|