summaryrefslogtreecommitdiffstats
path: root/ssl/s3_lib.c
AgeCommit message (Collapse)Author
2015-01-12RT3548: Remove unsupported platformsRich Salz
This last one for this ticket. Removes WIN16. So long, MS_CALLBACK and MS_FAR. We won't miss you. Reviewed-by: Richard Levitte <levitte@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-16Add OPENSSL_NO_ECDH guardsMatt Caswell
Reviewed-by: Emilia Käsper <emilia@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-10-15Support TLS_FALLBACK_SCSV.Bodo Moeller
Reviewed-by: Stephen Henson <steve@openssl.org>
2014-08-28Remove serverinfo checks.Dr. Stephen Henson
Since sanity checks are performed for all custom extensions the serverinfo checks are no longer needed. Reviewed-by: Emilia Käsper <emilia@openssl.org>
2014-08-15Add support for Camellia HMAC-Based cipher suites from RFC6367Hubert Kario
While RFC6367 focuses on Camellia-GCM cipher suites, it also adds a few cipher suites that use SHA-2 based HMAC that can be very easily added. Tested against gnutls 3.3.5 PR#3443 Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-08-09Fix SRP authentication ciphersuites.Dr. Stephen Henson
The addition of SRP authentication needs to be checked in various places to work properly. Specifically: A certificate is not sent. A certificate request must not be sent. Server key exchange message must not contain a signature. If appropriate SRP authentication ciphersuites should be chosen. Reviewed-by: Matt Caswell <matt@openssl.org>
2014-06-29Constification - mostly originally from Chromium.Ben Laurie
2014-06-27Add SHA256 Camellia ciphersuites from RFC5932PK
PR#2800
2014-06-09SRP ciphersuite correction.Dr. Stephen Henson
SRP ciphersuites do not have no authentication. They have authentication based on SRP. Add new SRP authentication flag and cipher string.
2014-06-09Update strength_bits for 3DES.Dr. Stephen Henson
Fix strength_bits to 112 for 3DES.
2014-03-28Security framework.Dr. Stephen Henson
Security callback: selects which parameters are permitted including sensible defaults based on bits of security. The "parameters" which can be selected include: ciphersuites, curves, key sizes, certificate signature algorithms, supported signature algorithms, DH parameters, SSL/TLS version, session tickets and compression. In some cases prohibiting the use of a parameters will mean they are not advertised to the peer: for example cipher suites and ECC curves. In other cases it will abort the handshake: e.g DH parameters or the peer key size. Documentation to follow...
2014-03-28Auto DH support.Dr. Stephen Henson
Add auto DH parameter support. This is roughly equivalent to the ECDH auto curve selection but for DH. An application can just call SSL_CTX_set_auto_dh(ctx, 1); and appropriate DH parameters will be used based on the size of the server key. Unlike ECDH there is no way a peer can indicate the range of DH parameters it supports. Some peers cannot handle DH keys larger that 1024 bits for example. In this case if you call: SSL_CTX_set_auto_dh(ctx, 2); Only 1024 bit DH parameters will be used. If the server key is 7680 bits or more in size then 8192 bit DH parameters will be used: these will be *very* slow. The old export ciphersuites aren't supported but those are very insecure anyway.
2014-02-21Option to set current cert to server certificate.Dr. Stephen Henson
2014-02-05Oops, get selection logic right.Dr. Stephen Henson
2014-02-05Re-add alert variables removed during rebaseScott Deboy
Whitespace fixes
2014-02-05Update custom TLS extension and supplemental data 'generate' callbacks to ↵Scott Deboy
support sending an alert. If multiple TLS extensions are expected but not received, the TLS extension and supplemental data 'generate' callbacks are the only chance for the receive-side to trigger a specific TLS alert during the handshake. Removed logic which no-op'd TLS extension generate callbacks (as the generate callbacks need to always be called in order to trigger alerts), and updated the serverinfo-specific custom TLS extension callbacks to track which custom TLS extensions were received by the client, where no-ops for 'generate' callbacks are appropriate.
2014-02-05Return per-certificate chain if extra chain is NULL.Dr. Stephen Henson
If an application calls the macro SSL_CTX_get_extra_chain_certs return either the old "shared" extra certificates or those associated with the current certificate. This means applications which call SSL_CTX_use_certificate_chain_file and retrieve the additional chain using SSL_CTX_get_extra_chain_certs will still work. An application which only wants to check the shared extra certificates can call the new macro SSL_CTX_get_extra_chain_certs_only
2014-02-02New ctrl to set current certificate.Dr. Stephen Henson
New ctrl sets current certificate based on certain criteria. Currently two options: set the first valid certificate as current and set the next valid certificate as current. Using these an application can iterate over all certificates in an SSL_CTX or SSL structure.
2014-01-09Replace EDH-RSA-DES-CBC-SHA, etc. with DHE-RSA-DES-CBC-SHADaniel Kahn Gillmor
Replace the full ciphersuites with "EDH-" in their labels with "DHE-" so that all DHE ciphersuites are referred to in the same way. Leave backward-compatible aliases for the ciphersuites in question so that configurations which specify these explicitly will continue working.
2014-01-09change SSL3_CK_EDH_* to SSL_CK_DHE_* (with backward-compatibility)Daniel Kahn Gillmor
This change normalizes the SSL_CK_DHE_ #defines to use the common term "DHE", while permitting older code that uses the more uncommon "EDH" constants to compile properly.
2014-01-09use SSL_kDHE throughout instead of SSL_kEDHDaniel Kahn Gillmor
DHE is the standard term used by the RFCs and by other TLS implementations. It's useful to have the internal variables use the standard terminology. This patch leaves a synonym SSL_kEDH in place, though, so that older code can still be built against it, since that has been the traditional API. SSL_kEDH should probably be deprecated at some point, though.
2014-01-09use SSL_kECDHE throughout instead of SSL_kEECDHDaniel Kahn Gillmor
ECDHE is the standard term used by the RFCs and by other TLS implementations. It's useful to have the internal variables use the standard terminology. This patch leaves a synonym SSL_kEECDH in place, though, so that older code can still be built against it, since that has been the traditional API. SSL_kEECDH should probably be deprecated at some point, though.
2013-11-13Additional "chain_cert" functions.Rob Stradling
PR#3169 This patch, which currently applies successfully against master and 1_0_2, adds the following functions: SSL_[CTX_]select_current_cert() - set the current certificate without disturbing the existing structure. SSL_[CTX_]get0_chain_certs() - get the current certificate's chain. SSL_[CTX_]clear_chain_certs() - clear the current certificate's chain. The patch also adds these functions to, and fixes some existing errors in, SSL_CTX_add1_chain_cert.pod.
2013-11-06Enable PSK in FIPS mode.Dr. Stephen Henson
Enable PSK ciphersuites with AES or DES3 in FIPS mode.
2013-09-13Tidy up comments.Rob Stradling
2013-09-13Fix compilation with no-ec and/or no-tlsext.Rob Stradling
2013-09-06Add callbacks supporting generation and retrieval of supplemental data ↵Scott Deboy
entries, facilitating RFC 5878 (TLS auth extensions) Removed prior audit proof logic - audit proof support was implemented using the generic TLS extension API Tests exercising the new supplemental data registration and callback api can be found in ssltest.c. Implemented changes to s_server and s_client to exercise supplemental data callbacks via the -auth argument, as well as additional flags to exercise supplemental data being sent only during renegotiation.
2013-09-05Don't prefer ECDHE-ECDSA ciphers when the client appears to be Safari on OS X.Rob Stradling
OS X 10.8..10.8.3 has broken support for ECDHE-ECDSA ciphers.
2013-08-17Make no-ec compilation work.Dr. Stephen Henson
2013-08-17Return 1 when setting ECDH auto mode.Dr. Stephen Henson
2013-07-22Support ALPN.Adam Langley
This change adds support for ALPN[1] in OpenSSL. ALPN is the IETF blessed version of NPN and we'll be supporting both ALPN and NPN for some time yet. [1] https://tools.ietf.org/html/draft-ietf-tls-applayerprotoneg-00 Conflicts: ssl/ssl3.h ssl/t1_lib.c
2013-06-12Add support for arbitrary TLS extensions.Trevor
Contributed by Trevor Perrin.
2013-03-28Enable TLS 1.2 ciphers in DTLS 1.2.Dr. Stephen Henson
Port TLS 1.2 GCM code to DTLS. Enable use of TLS 1.2 only ciphers when in DTLS 1.2 mode too.
2013-03-18Use enc_flags when deciding protocol variations.Dr. Stephen Henson
Use the enc_flags field to determine whether we should use explicit IV, signature algorithms or SHA256 default PRF instead of hard coding which versions support each requirement.
2013-03-18DTLS revision.Dr. Stephen Henson
Revise DTLS code. There was a *lot* of code duplication in the DTLS code that generates records. This makes it harder to maintain and sometimes a TLS update is omitted by accident from the DTLS code. Specifically almost all of the record generation functions have code like this: some_pointer = buffer + HANDSHAKE_HEADER_LENGTH; ... Record creation stuff ... set_handshake_header(ssl, SSL_MT_SOMETHING, message_len); ... write_handshake_message(ssl); Where the "Record creation stuff" is identical between SSL/TLS and DTLS or in some cases has very minor differences. By adding a few fields to SSL3_ENC to include the header length, some flags and function pointers for handshake header setting and handshake writing the code can cope with both cases. Note: although this passes "make test" and some simple DTLS tests there may be some minor differences in the DTLS code that have to be accounted for.
2012-11-26Print out point format list for clients too.Dr. Stephen Henson
2012-11-22Add support for printing out and retrieving EC point formats extension.Dr. Stephen Henson
2012-09-30If OPENSSL_SSL_DEBUG_BROKEN_PROTOCOL is set allow the use of "SCSV" asDr. Stephen Henson
a ciphersuite to position the SCSV value in different places for testing purposes.
2012-09-12Add ctrl and utility functions to retrieve raw cipher list sent by client inDr. Stephen Henson
client hello message. Previously this could only be retrieved on an initial connection and it was impossible to determine the cipher IDs of any uknown ciphersuites.
2012-09-08new ctrl to retrive value of received temporary key in server key exchange ↵Dr. Stephen Henson
message, print out details in s_client
2012-09-07store and print out message digest peer signed with in TLS 1.2Dr. Stephen Henson
2012-08-15Add three Suite B modes to TLS code, supporting RFC6460.Dr. Stephen Henson
2012-07-23Add support for certificate stores in CERT structure. This makes itDr. Stephen Henson
possible to have different stores per SSL structure or one store in the parent SSL_CTX. Include distint stores for certificate chain verification and chain building. New ctrl SSL_CTRL_BUILD_CERT_CHAIN to build and store a certificate chain in CERT structure: returing an error if the chain cannot be built: this will allow applications to test if a chain is correctly configured. Note: if the CERT based stores are not set then the parent SSL_CTX store is used to retain compatibility with existing behaviour.
2012-07-08Add new ctrl to retrieve client certificate types, print outDr. Stephen Henson
details in s_client. Also add ctrl to set client certificate types. If not used sensible values will be included based on supported signature algorithms: for example if we don't include any DSA signing algorithms the DSA certificate type is omitted. Fix restriction in old code where certificate types would be truncated if it exceeded TLS_CT_NUMBER.
2012-07-03Separate client and server permitted signature algorithm support: by defaultDr. Stephen Henson
the permitted signature algorithms for server and client authentication are the same but it is now possible to set different algorithms for client authentication only.
2012-06-28Function tls1_check_ec_server_key is now redundant as we makeDr. Stephen Henson
appropriate checks in tls1_check_chain.
2012-06-28Add new "valid_flags" field to CERT_PKEY structure which determines whatDr. Stephen Henson
the certificate can be used for (if anything). Set valid_flags field in new tls1_check_chain function. Simplify ssl_set_cert_masks which used to have similar checks in it. Add new "cert_flags" field to CERT structure and include a "strict mode". This enforces some TLS certificate requirements (such as only permitting certificate signature algorithms contained in the supported algorithms extension) which some implementations ignore: this option should be used with caution as it could cause interoperability issues.