summaryrefslogtreecommitdiff
path: root/lib/libssl
AgeCommit message (Collapse)Author
2021-12-16unifdef TLS13_USE_LEGACY_CLIENT_AUTHTheo Buehler
Before the TLSv1.3 stack grew client certificate support, it fell back to the legacy stack. Proper client certificate support was added in a2k20 with a TLS13_USE_LEGACY_CLIENT_AUTH knob to provide an easy fallback in case the new code should have a problem. This was never needed. As ifdefed code is wont to do, this bitrotted a few months later when the client and server methods were merged. discussed with jsing
2021-12-15Use CBS_get_last_u8() to find the content type in TLSv1.3 records.Joel Sing
ok tb@
2021-12-15Provide various CBS_peek_* functions.Joel Sing
These will be used in libcrypto. With input from and ok tb@
2021-12-15Provide CBS_get_u64().Joel Sing
This will be used in the libcrypto certificate transparency code. ok tb@
2021-12-15Provide CBS_get_last_u8().Joel Sing
This will be used in the TLSv1.3 record layer. From BoringSSL. ok tb@
2021-12-09Convert t1_enc.c to opaque EVP_MD_CTX.Theo Buehler
ok inoguchi jsing
2021-12-09Convert ssl_srvr.c to opaque EVP_MD_CTX.Theo Buehler
ok inoguchi jsing
2021-12-09Convert ssl_clnt.c to opaque EVP_MD_CTXTheo Buehler
ok inoguchi jsing
2021-12-09Convert s3_cbc.c to opaque EVP_MD_CTX.Theo Buehler
ok inoguchi jsing
2021-12-04Clean up and refactor server side DHE key exchange.Joel Sing
Provide ssl_kex_generate_dhe_params_auto() which handles DHE key generation based on parameters determined by the specified key bits. Convert the existing DHE auto parameter selection code into a function that just tells us how many key bits to use. Untangle and rework the server side DHE key exchange to use the ssl_kex_* functions. ok inoguchi@ tb@
2021-12-04Move the minimum DHE key size check into ssl_kex_peer_params_dhe()Joel Sing
ok inoguchi@ tb@
2021-12-04Check DH public key in ssl_kex_peer_public_dhe().Joel Sing
Call DH_check_pub_key() after decoding the peer public key - this will be needed for the server DHE key exchange, but also benefits the client. ok inoguchi@ tb@
2021-11-30Align ssl_kex_derive_ecdhe_ecp() with ssl_kex_derive_dhe()Theo Buehler
sk is commonly used for a STACK_OF(), so call the shared key simply key. ok jsing
2021-11-30s/ECDHE/ECDH/Joel Sing
If we can provide an EC key that is used, then it is by definition non-ephemeral. ok tb@
2021-11-29First pass of converting ssl_kex.c to opaque DH.Theo Buehler
Assign the result of BN_dup() and BN_bn2bin() to local BIGNUMs, then set the factors and pubkey on the dh using DH_set0_{pqg,key}(). A second pass will be done during the upcoming bump. ok jsing
2021-11-29Stop using BIO_s_file_inernal() in libssl.Theo Buehler
BIO_s_file_internal() should never have leaked out of libcrypto, but it did. As a first step of getting rid of it, stop using it internally. ok jsing
2021-11-29Convert server serialisation of DHE parameters/public key to new functions.Joel Sing
ok inoguchi@ tb@
2021-11-29Factor out/rewrite DHE key exchange.Joel Sing
This follows what was done previously for ECDHE EC point key exchange and will allow for deduplication and further code improvement. Convert the TLSv1.2 client to use the new DHE key exchange functions. ok inoguchi@ tb@
2021-11-26Stop reaching into EVP_PKEY in the rest of libssl.Theo Buehler
ok inoguchi jsing
2021-11-26Simplify two weirdly formatted pieces of code in ssl_rsa.c and stopTheo Buehler
reaching into the EVP_PKEY struct. ok inoguchi jsing
2021-11-26spellingJonathan Gray
ok schwarze@
2021-11-23Transform a mangled comment into something intelligible.Theo Buehler
from beck
2021-11-19libssl: don't reach for pkey->save_type.Theo Buehler
For some strange historical reason ECDSA_sign() and ECDSA_verify}() have a type argument that they ignore. For another strange historical reason, the type passed to them from libssl is pkey->save_type, which is used to avoid expensive engine lookups when setting the pkey type... Whatever the aforementioned reasons were, we can't access pkey->save_type with the OpenSSL 1.1 API, and this is thus in the way of making EVP_PKEY opaque. Simply pass in 0 instead. ok jsing
2021-11-14Fix a strange check in the auto DH codepathTheo Buehler
The code assumes that the server certificate has an RSA key and bases the calculation of the size of the ephemeral DH key on this assumption. So instead of checking whether we have any key by inspecting the dh part of the union, let's check that we actually have an RSA key. While here, make sure that its length is non-negative. ok jsing
2021-11-09Switch to <endian.h> from <machine/endian.h> for better portability.Brent Cook
ok tb@
2021-11-08Replace <sys/limits.h> with <limits.h>Brent Cook
ok tb@
2021-11-02Do not take the strlen() of a NULL name. Defer the CBS_init() to later.Theo Buehler
Found the hard way by sthen. ok sthen
2021-11-01Ensure SSL_set_tlsext_host_name() is given a valid hostname.Joel Sing
ok inoguchi@ tb@
2021-11-01Improve SNI hostname validation.Joel Sing
For some time now we've validated the hostname provided to the server in the SNI extension. Per RFC 6066, an IP literal is invalid as a hostname - the current code rejects IPv6 literals, but allows IPv4 literals through. Improve this check to explicitly detect both IPv4 and IPv6 literals. Some software has been historically known to include IP literals in SNI, so rather than rejecting this outright (and failing with a decode error), pretend that the SNI extension does not exist (such that we do not break some older clients). ok inoguchi@ tb@
2021-11-01Unifdef LIBRESSL_NEW_API. Now that the library is bumped, this isTheo Buehler
no longer needed. ok jsing
2021-10-31Bump majors after struct visibility changes, symbol removal and symbolTheo Buehler
addition.
2021-10-31Update Symbols.list to include API additionsTheo Buehler
2021-10-31libssl: stop reaching into the X509 struct and simplify some code byTheo Buehler
using X509_get_key_usage(). ok beck jsing
2021-10-31Add explicit CBS_contains_zero_byte() check in CBS_strdup().Joel Sing
If the CBS data contains a zero byte, then CBS_strdup() is only going to return part of the data - add an explicit CBS_contains_zero_byte() and treat such data as an error case. ok tb@
2021-10-27Fix HISTORY section: 6.9 -> 7.0Theo Buehler
2021-10-25sort. alphanumerics have lower ASCII values than '_'Theo Buehler
2021-10-25Install SSL_read_early_data.3. I should have done this during the lastTheo Buehler
libssl bump.
2021-10-25Add record processing limit to DTLS code.Joel Sing
This is effectively the same record processing limit that was previously added to the legacy TLS stack - without this a single session can be made to spin on a stream of alerts or other similar records. ok beck@ tb@
2021-10-25Use ssl_force_want_read() in the DTLS code.Joel Sing
Also mop up some mostly unhelpful comments while here. ok beck@ tb@
2021-10-25Fold SSL_SESSION_INTERNAL back into SSL_SESSION.Joel Sing
ok beck@ tb@
2021-10-24merge documentation for SSL_read_ex(3), SSL_peek_ex(3), and SSL_write_ex(3)Ingo Schwarze
from the OpenSSL 1.1.1 branch, which is still under a free license
2021-10-24Don't leak internal->verfied_chain, clean it up in ssl3_clear and free.Bob Beck
spotted by and ok jsing@
2021-10-23Add SSL_get0_verified_chain - needed by some new stuffBob Beck
symbol will be exposed with tb@'s forthcoming bump ok tb@
2021-10-23fix wrong and missing return types and wrong macros in the SYNOPSIS;Ingo Schwarze
while here, also apply some minor wording improvements
2021-10-23Add new OpenSSL API SSL_CTX_set_num_tickets and friends.Bob Beck
Since we don't support session tickets in LibreSSL at the moment these functions currently do not have any effect. Again, symbols will appear with tb@'s reptar sized bump.. ok tb@
2021-10-23Unhandroll X509_up_ref()Theo Buehler
ok beck jsing
2021-10-23oops, wrong dir.Theo Buehler
pointed out by schwarze
2021-10-23Add new OpenSSL api SSL_write_ex, SSL_read_ex and SSL_peek_exBob Beck
As these still meet the usual expectations for special, I will leave it up to ingo to decide to either document separately or in one man page like OpenSSL did. Will also need Symbols.list additions by tb@ when he starts the rapture ok tb@ jsing@
2021-10-23Import documentation for X509_get_extension_flags, X509_get_key_usage,Theo Buehler
X509_get_extended_key_usage from OpenSSL. Will be linked to the build after the bump. input/lgtm schwarze
2021-10-23Import documentation for X509_SIG_get{0,m} from OpenSSL. Will be linkedTheo Buehler
to the build after the bump. tweak & lgtm schwarze