summaryrefslogtreecommitdiff
path: root/lib/libssl
AgeCommit message (Collapse)Author
2018-01-28Initialize variables to avoid compiler warningsKinichiro Inoguchi
ok jsing@
2018-01-27Complete the TLS extension handling rewrite for the server-side.Joel Sing
This removes ssl_parse_clienthello_tlsext() and allows the CBS to be passed all the way through from ssl3_get_client_hello(). The renegotation check gets pulled up into ssl3_get_client_hello() which is where other such checks exist. The TLS extension parsing now also ensures that we do not get duplicates of any known extensions (the old pre-rewrite code only did this for some extensions). ok inoguchi@
2018-01-27Clarify the comment re the F5 EC curves extension bug.Joel Sing
Also reference the knowledge base article instead of a discussion thread.
2018-01-27Convert ssl3_put_cipher_by_char() to CBB.Joel Sing
While here make the CBS usage in ssl3_get_cipher_by_char() more consistent with other code. ok inoguchi@
2017-11-28Correct TLS extensions handling when no extensions are present.Joel Sing
If no TLS extensions are present in a client hello or server hello, omit the entire extensions block, rather than including it with a length of zero. ok beck@ inoguchi@
2017-11-28Add CBB_discard_child(), which allows for a child CBB to be discarded.Joel Sing
Based on BoringSSL.
2017-10-12Rename ssl3_client_hello() to ssl3_send_client_hello() for consistency.Joel Sing
2017-10-12Fold dtls1_accept() into ssl_accept(), removing a lot of duplicated code.Joel Sing
With review/feedback from inoguchi@
2017-10-12Drop prototypes for ssl23_*() functions, which no longer exist.Joel Sing
2017-10-11Convert ssl3_client_hello() to CBB.Joel Sing
As part of this, change ssl_cipher_list_to_bytes() to take a CBB argument, rather than a pointer/length. Some additional clean up/renames while here. Based on a diff from doug@
2017-10-11Fully convert ssl3_send_server_hello() to CBB.Joel Sing
Based on a diff from doug@
2017-10-10Make ssl_bytes_to_cipher_list() take a CBS, rather than a pointer andJoel Sing
length, since the caller has already been converted to CBS. A small amount of additional clean up whilst here.
2017-10-10((remove) (some) (unnecessary) (parentheses))Joel Sing
Part of a diff from doug@
2017-10-10Merge dtls1_connect() into ssl3_connect(), removing a large amount ofJoel Sing
duplicated code. For now this is essentially adds a diff of the two functions with 'if (SSL_IS_DTLS(s))' - further clean up and improvement will follow. ok inoguchi@
2017-10-08Reduce non-functional differences between dtls1_accept() andJoel Sing
ssl3_accept() - synchronise comments, whitespace, line wrapping, etc.
2017-10-08Reduce non-functional differences between dtls1_connect() andJoel Sing
ssl3_connect() - synchronise comments, whitespace, line wrapping, etc.
2017-10-08Fix some style/whitespace/indentation issues in ssl3_accept().Joel Sing
2017-10-08Fix some style/whitespace/indentation issues in ssl3_connect().Joel Sing
2017-10-08Convert ssl3_send_change_cipher_spec() to use CBB and make it handle DTLS,Joel Sing
which allows us to drop dtls1_send_change_cipher_spec() entirely. ok inoguchi@
2017-09-25Annotate some API-side memory leaks for future resolution.Joel Sing
2017-09-25Fix various issues in the OCSP extension parsing code:Joel Sing
- When parsing the OCSP extension we can have multiple responder IDs - pull these out correctly. - Stop using CBS_stow() - it's unnecessary since we just need access to the data and length (which we can get via CBS_data() and CBS_len()). - Use a temporary pointer when calling d2i_*() functions, since it will increment the pointer by the number of bytes it consumed when decoding. The original code incorrectly passes the pointer allocated via CBS_stow() (using malloc()) to a d2i_*() function and then calls free() on the now incremented pointer, most likely resulting in a crash. This issue was reported by Robert Swiecki who found the issue using honggfuzz. ok beck@
2017-09-25When building the OCSP extension, only add the length prefixed extensionsJoel Sing
after we finish building the responder ID list. Otherwise adding to the responder ID list fails. ok beck@
2017-08-30Move the full extension building into tlsext_{client,server}hello_build(),Joel Sing
leaving ssl_add_{client,server}hello_tlsext() as pointer to CBB wrappers. ok doug@
2017-08-30Bump libssl/libtls minors due to symbol (re)addition.Joel Sing
2017-08-30Bring back the NPN related symbols.Joel Sing
Several pieces of software make use of these based on a conditional around OPENSSL_NPN_NEGOTIATED, rather than using the presence of the symbols, the non-existence of a OPENSSL_NO_NEXTPROTONEG define or even the existence of the TLS extension type. Unfortunately we cannot remove OPENSSL_NPN_NEGOTIATED since the API for ALPN was effectively botched and reuses two parts from the NPN implementation, rather than providing ALPN specific or generic versions.
2017-08-29When OCSP status type is unknown, ignore the extension.Doug Hogan
This needs to skip past the CBS data or it will be treated as a decode error even though it returns 1. ok jsing@
2017-08-29Actually parse the ALPN extension in a client hello, even if no ALPNJoel Sing
callback has been installed. This ensures that the ALPN extension is valid and avoids leaving unprocessed extension data, which leads to a decode error. Found the hard way by jsg@
2017-08-28ECDHE-RSA-DES-CBC3-SHA should not be marked HIGH.Joel Sing
Spotted by Andreas Bartelt <obsd at bartula dot de>
2017-08-28Bump lib{crypto,ssl,tls} majors due to symbol removals.Joel Sing
2017-08-28Completely remove NPN remnants.Joel Sing
Based on a diff from doug@, similar diff from inoguchi@
2017-08-28Remove the original (pre-IETF) chacha20-poly1305 cipher suites.Joel Sing
Support for the IETF standardised chacha20-poly1305 cipher suites was added 16 months ago, which means they exist in both of the currently supported OpenBSD releases. Also prompted by Andreas Bartelt <obsd at bartula dot de>. ok beck@ doug@
2017-08-27Rewrite SRTP extension using CBB/CBS and the new extension framework.Doug Hogan
input + ok beck@, jsing@
2017-08-26Rewrite ALPN extension using CBB/CBS and the new extension framework.Doug Hogan
ok bcook@ beck@ input + ok jsing@
2017-08-23Work around bug in F5's handling of the supported elliptic curves extension.Doug Hogan
RFC 4492 only defines elliptic_curves for ClientHello. However, F5 is sending it in ServerHello. We need to skip over it since our TLS extension parsing code is now more strict. Thanks to Armin Wolfermann and WJ Liu for reporting the issue. input + ok jsing@
2017-08-21import SSL_export_keying_material(3) from OpenSSLIngo Schwarze
2017-08-21merge the applicable parts of SSL_set_tlsext_host_name(3) documentation;Ingo Schwarze
from Paul Yang <yang dot yang at baishancloud dot com> via OpenSSL commit 190b9a03 Jun 28 15:46:13 2017 +0800
2017-08-21Selectively merge OpenSSL commit e091367d May 5 11:56:45 2017 +0100Ingo Schwarze
from Matt Caswell <matt at openssl dot org>. In particular, stop talking about SSL 2.0 and SSL 3.0, but do not start talking about TLS 1.3 just yet.
2017-08-21Mention three functions related to protocol selection by the clientIngo Schwarze
that are deprecated no-ops in LibreSSL, but that OpenSSL explicitly documented on April 19, 2017, without deprecating them.
2017-08-21Delete non-existent function SSL_flush_sessions();Ingo Schwarze
from Rich Salz <rsalz at openssl dot org> via OpenSSL commit 1722496f Jun 8 15:18:38 2017 -0400.
2017-08-21Delete non-existent functions SSL_add_session() and SSL_remove_session() andIngo Schwarze
clarify that SSL_CTX_remove_session(3) marks the session as non-resumable. From Rich Salz <rsalz at openssl dot org> via OpenSSL commit 1722496f Jun 8 15:18:38 2017 -0400 and from Matt Caswell <matt at openssl dot org> via OpenSSL commit b8964668 Apr 26 15:16:18 2017 +0100.
2017-08-20New manual page X509_check_private_key(3), using informationIngo Schwarze
from the OpenSSL manual and from code inspection. Use my own Copyright and license because no Copyright-worthy amount of text from OpenSSL remains. And, no, these functions do *NOT* check private keys, not at all.
2017-08-20remove a duplicate BIO_do_accept() call from an example;Ingo Schwarze
from Beat Bolli <dev at drbeat dot li> via OpenSSL commit 7a67a3ba Jan 18 23:49:43 2017 +0100
2017-08-19fix .Xr ordering, found with mandoc -TlintIngo Schwarze
2017-08-19Import SSL_CTX_set_min_proto_version(3) from OpenSSL, suggested by jsing@.Ingo Schwarze
While importing: * Fix the prototypes, they all contained wrong datatypes. * Delete SSL3_VERSION which is no longer supported. * Delete TLS1_3_VERSION and DTLS1_2_VERSION, not yet supported. * Delete the lie that these would be macros. * Improve SEE ALSO and HISTORY sections.
2017-08-19fix a typo and mention OpenBSD in HISTORY;Ingo Schwarze
both pointed out by jsing@
2017-08-13match function implementation with declaration, ok beck@, doug@Brent Cook
2017-08-13Switch to -Werror with clang for libressl.Doug Hogan
Discussed with beck@ and jsing@ ok beck@
2017-08-13Make SSL{,_CTX}_set_alpn_protos() do atomic updates and handle NULL.Doug Hogan
Previously, the code would accept NULL and 0 length and try to malloc/memcpy it. On OpenBSD, malloc(0) does not return NULL. It could also fail in malloc and leave the old length. Also, add a note that this public API has backwards semantics of what you would expect where 0 is success and 1 is failure. input + ok jsing@ beck@
2017-08-13Remove support for the TLS padding extension.Joel Sing
This was added as a workaround for broken F5 TLS termination, which then created issues talking to broken IronPorts. The size of the padding is hardcoded so it cannot be used in any generic sense. ok bcook@ beck@ doug@
2017-08-13Nuke SSL_OP_CRYPTOPRO_TLSEXT_BUG.Joel Sing
This was a workaround for a server that needed to talk GOST to old/broken CryptoPro clients. This has no impact on TLS clients that are using GOST. ok bcook@ beck@ doug@