summaryrefslogtreecommitdiffstats
path: root/ssl
AgeCommit message (Collapse)Author
2014-12-17Premaster secret handling fixesAdam Langley
From BoringSSL - Send an alert when the client key exchange isn't correctly formatted. - Reject overly short RSA ciphertexts to avoid a (benign) out-of-bounds memory access. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2014-12-17Clear warnings/errors within TLS_DEBUG code sectionsRichard Levitte
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-17Clear warnings/errors within KSSL_DEBUG code sectionsRichard Levitte
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-17Clear warnings/errors within CIPHER_DEBUG code sectionsRichard Levitte
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-17Clear warnings/errors within CIPHER_DEBUG code sectionsRichard Levitte
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-16The dtls1_output_cert_chain function no longer exists so remove it fromMatt Caswell
ssl_locl.h Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-16Don't set client_version to the ServerHello version.Adam Langley
The client_version needs to be preserved for the RSA key exchange. This change also means that renegotiation will, like TLS, repeat the old client_version rather than advertise only the final version. (Either way, version change on renego is not allowed.) This is necessary in TLS to work around an SChannel bug, but it's not strictly necessary in DTLS. (From BoringSSL) Reviewed-by: Emilia Käsper <emilia@openssl.org>
2014-12-16Add more meaningful OPENSSL_NO_ECDH error message for suite b modeMatt Caswell
Reviewed-by: Emilia Käsper <emilia@openssl.org>
2014-12-16Add OPENSSL_NO_ECDH guardsMatt Caswell
Reviewed-by: Emilia Käsper <emilia@openssl.org>
2014-12-16Remove extraneous white space, and add some bracesMatt Caswell
Reviewed-by: Emilia Käsper <emilia@openssl.org>
2014-12-15DTLS fixes for signed/unsigned issuesMatt Caswell
Reviewed-by: Emilia Käsper <emilia@openssl.org>
2014-12-15Allow using -SSLv2 again when setting Protocol in the config.Kurt Roeckx
RT#3625 Reviewed-by: Emilia Käsper <emilia@openssl.org>
2014-12-13Fixed memory leak if BUF_MEM_grow failsMatt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2014-12-11make updateMatt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-10tls1_heartbeat: check for NULL after allocating bufJonas Maebe
Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Matt Caswell <matt@openssl.org>
2014-12-10tls1_process_heartbeat: check for NULL after allocating bufferJonas Maebe
Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Matt Caswell <matt@openssl.org>
2014-12-10SSL_set_session: check for NULL after allocating s->kssl_ctx->client_princJonas Maebe
Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Matt Caswell <matt@openssl.org>
2014-12-10serverinfo_process_buffer: check result of ↵Jonas Maebe
realloc(ctx->cert->key->serverinfo) and don't leak memory if it fails Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Matt Caswell <matt@openssl.org>
2014-12-10ssl3_digest_cached_records: check for NULL after allocating ↵Jonas Maebe
s->s3->handshake_dgst Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Matt Caswell <matt@openssl.org>
2014-12-10ssl3_get_certificate_request: check for NULL after allocating s->cert->ctypesJonas Maebe
Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Matt Caswell <matt@openssl.org>
2014-12-10SSL_COMP_add_compression_method: exit if allocating the new compression ↵Jonas Maebe
method struct fails Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Matt Caswell <matt@openssl.org>
2014-12-08Include <openssl/foo.h> instead of "foo.h"Geoff Thorpe
Exported headers shouldn't be included as "foo.h" by code from the same module, it should only do so for module-internal headers. This is because the symlinking of exported headers (from include/openssl/foo.h to crypto/foo/foo.h) is being removed, and the exported headers are being moved to the include/openssl/ directory instead. Change-Id: I4c1d80849544713308ddc6999a549848afc25f94 Signed-off-by: Geoff Thorpe <geoff@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2014-12-08Fixed memory leak in the event of a failure of BUF_MEM_growMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2014-12-08Fix memory leak in SSL_new if errors occur.Matt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2014-12-08Remove some unnecessary OPENSSL_FIPS referencesDr. Stephen Henson
FIPS_mode() exists in all versions of OpenSSL but always returns 0 if OpenSSL is not FIPS capable. Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-05Clarify the return values for SSL_get_shared_curve.Emilia Kasper
Reviewed-by: Matt Caswell <matt@openssl.org>
2014-12-05Add extra checks for odd-length EC curve lists.Emilia Kasper
Odd-length lists should be rejected everywhere upon parsing. Nevertheless, be extra careful and add guards against off-by-one reads. Also, drive-by replace inexplicable double-negation with an explicit comparison. Reviewed-by: Matt Caswell <matt@openssl.org>
2014-12-05Reject elliptic curve lists of odd lengths.Emilia Kasper
The Supported Elliptic Curves extension contains a vector of NamedCurves of 2 bytes each, so the total length must be even. Accepting odd-length lists was observed to lead to a non-exploitable one-byte out-of-bounds read in the latest development branches (1.0.2 and master). Released versions of OpenSSL are not affected. Thanks to Felix Groebert of the Google Security Team for reporting this issue. Reviewed-by: Matt Caswell <matt@openssl.org>
2014-12-04ssl_create_cipher_list: check whether push onto cipherstack succeedsJonas Maebe
Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Richard Levitte <levitte@openssl.org>
2014-12-04ssl_cert_dup: Fix memory leakJonas Maebe
Always use goto err on failure and call ssl_cert_free() on the error path so all fields and "ret" itself are freed Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Richard Levitte <levitte@openssl.org>
2014-12-04dtls1_new: free s on error pathKurt Roeckx
Reviewed-by: Richard Levitte <levitte@openssl.org>
2014-12-04dtls1_heartbeat: check for NULL after allocating s->cert->ctypesJonas Maebe
Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Richard Levitte <levitte@openssl.org>
2014-12-04dtls1_process_heartbeat: check for NULL after allocating bufferJonas Maebe
Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Richard Levitte <levitte@openssl.org>
2014-12-04Remove incorrect code inadvertently introduced through commit 59669b6ab.Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-04Remove SSLv2 supportKurt Roeckx
The only support for SSLv2 left is receiving a SSLv2 compatible client hello. Reviewed-by: Richard Levitte <levitte@openssl.org>
2014-12-03Remove "#if 0" codeMatt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-03Only use the fallback mtu after 2 unsuccessful retransmissions if it is lessMatt Caswell
than the mtu we are already using Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-03If we really get a situation where the underlying mtu is less than the minimumMatt Caswell
we will support then dtls1_do_write can go into an infinite loop. This commit fixes that. Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-03Fix dtls_query_mtu so that it will always either complete with an mtu that isMatt Caswell
at least the minimum or it will fail. There were some instances in dtls1_query_mtu where the final mtu can end up being less than the minimum, i.e. where the user has set an mtu manually. This shouldn't be allowed. Also remove dtls1_guess_mtu that, despite having logic for guessing an mtu, was actually only ever used to work out the minimum mtu to use. Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-03Remove instances in libssl of the constant 28 (for size of IPv4 header + UDP)Matt Caswell
and instead use the value provided by the underlying BIO. Also provide some new DTLS_CTRLs so that the library user can set the mtu without needing to know this constant. These new DTLS_CTRLs provide the capability to set the link level mtu to be used (i.e. including this IP/UDP overhead). The previous DTLS_CTRLs required the library user to subtract this overhead first. Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-03The first call to query the mtu in dtls1_do_write correctly checks that theMatt Caswell
mtu that we have received is not less than the minimum. If its less it uses the minimum instead. The second call to query the mtu does not do that, but instead uses whatever comes back. We have seen an instance in RT#3592 where we have got an unreasonably small mtu come back. This commit makes both query checks consistent. Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-03The SSL_OP_NO_QUERY_MTU option is supposed to stop the mtu from beingMatt Caswell
automatically updated, and we should use the one provided instead. Unfortunately there are a couple of locations where this is not respected. Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-03Verify that we have a sensible message len and fail if notMatt Caswell
RT#3592 provides an instance where the OPENSSL_assert that this commit replaces can be hit. I was able to recreate this issue by forcing the underlying BIO to misbehave and come back with very small mtu values. This happens the second time around the while loop after we have detected that the MTU has been exceeded following the call to dtls1_write_bytes. Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-11-28Remove all .cvsignore filesRich Salz
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-11-28[PR3597] Advance to the next state variant when reusing messages.Richard Levitte
Previously, state variant was not advanced, which resulted in state being stuck in the st1 variant (usually "_A"). This broke certificate callback retry logic when accepting connections that were using SSLv2 ClientHello (hence reusing the message), because their state never advanced to SSL3_ST_SR_CLNT_HELLO_C variant required for the retry code path. Reported by Yichun Zhang (agentzh). Signed-off-by: Piotr Sikora <piotr@cloudflare.com> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2014-11-27Fix warning in ssl2_encMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2014-11-27Remove more references to dtls1_encMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2014-11-27Check EVP_Cipher return values for SSL2Matt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2014-11-27Delete unused fileMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2014-11-27Add checks to the return value of EVP_Cipher to prevent silent encryption ↵Matt Caswell
failure. PR#1767 Reviewed-by: Richard Levitte <levitte@openssl.org>