summaryrefslogtreecommitdiffstats
path: root/ssl/s3_lib.c
AgeCommit message (Collapse)Author
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22More indent fixes for STACK_OFMatt Caswell
Conflicts: ssl/s3_lib.c Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-17Clear warnings/errors within KSSL_DEBUG code sectionsRichard Levitte
Reviewed-by: Andy Polyakov <appro@openssl.org>
2014-12-17Clear warnings/errors within CIPHER_DEBUG code sectionsRichard Levitte
Reviewed-by: Andy Polyakov <appro@openssl.org>
2014-12-16Add OPENSSL_NO_ECDH guardsMatt Caswell
Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit af6e2d51bfeabbae827030d4c9d58a8f7477c4a0)
2014-10-15Support TLS_FALLBACK_SCSV.Bodo Moeller
Reviewed-by: Rich Salz <rsalz@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> (cherry picked from commit 707b026d7871eb12c23671c975e6a15a8c331785) Conflicts: ssl/ssl3.h ssl/t1_lib.c
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> (cherry picked from commit 8f5a8805b82d1ae81168b11b7f1506db9e047dec)
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. (cherry picked from commit a86b88acc373ac1fb0ca709a5fb8a8fa74683f67)
2014-06-09Update strength_bits for 3DES.Dr. Stephen Henson
Fix strength_bits to 112 for 3DES. (cherry picked from commit 837c203719205ab19b5609b2df7151be8df05687)
2014-02-23Option to set current cert to server certificate.Dr. Stephen Henson
(cherry picked from commit daddd9a950e491c31f9500d5e570bc7eb96b2823)
2014-02-08Re-add alert variables removed during rebaseScott Deboy
Whitespace fixes (cherry picked from commit e9add063b50e8a460d5636055156d2760c2fe29f) Conflicts: ssl/s3_clnt.c
2014-02-08Update 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. (cherry picked from commit ac20719d994729970eb3b775c7bffa81f0e9f960) Conflicts: ssl/t1_lib.c
2014-02-08Add 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. (cherry picked from commit 36086186a9b90cdad0d2cd0a598a10f03f8f4bcc) Conflicts: Configure apps/s_client.c apps/s_server.c ssl/ssl.h ssl/ssl3.h ssl/ssltest.c
2014-02-05Oops, get selection logic right.Dr. Stephen Henson
(cherry picked from commit 3880579240d476d21f68fd01a391dd325920f479)
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 (cherry picked from commit a51f767645c117667d337f77fe1dd9c0a66d8410)
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. (cherry picked from commit 0f78819c8ccb7c526edbe90d5b619281366ce75c)
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. (cherry picked from commit 2f56c9c015dbca45379c9a725915b3b8e765a119)
2013-11-06Enable PSK in FIPS mode.Dr. Stephen Henson
Enable PSK ciphersuites with AES or DES3 in FIPS mode. (cherry picked from commit e0ffd129c16af90eb5e2ce54e57832c0046d1aaf)
2013-10-01Merge remote-tracking branch 'agl/1.0.2alpn' into agl-alpnBen Laurie
Conflicts: ssl/ssl3.h ssl/t1_lib.c
2013-09-18Enable 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. (cherry picked from commit 4221c0dd3004117c63b182af5e8ab345b7265902)
2013-09-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. (cherry picked from commit cbd64894ec687c6f37d8e43c16dff78e63f6be87) Conflicts: ssl/ssl_locl.h
2013-09-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. (cherry picked from commit 173e72e64c6a07ae97660c322396b66215009f33)
2013-09-16Tidy up comments.Rob Stradling
2013-09-16Fix compilation with no-ec and/or no-tlsext.Rob Stradling
2013-09-16Don'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-09-13Support 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. Cherry-picked from 6f017a8f9db3a79f3a3406cf8d493ccd346db691. [1] https://tools.ietf.org/html/draft-ietf-tls-applayerprotoneg-00
2013-08-19Make no-ec compilation work.Dr. Stephen Henson
(cherry picked from commit 14536c8c9c0abb894afcadb9a58b4b29fc8f7a4d)
2013-08-18Return 1 when setting ECDH auto mode.Dr. Stephen Henson
(cherry picked from commit 42082eda6f3d64ce87184d65c4eae06d677e971c)
2013-07-03Trying cherrypick:Trevor
Add support for arbitrary TLS extensions. Contributed by Trevor Perrin. Conflicts: CHANGES ssl/ssl.h ssl/ssltest.c test/testssl Fix compilation due to #endif. Cherrypicking more stuff. Cleanup of custom extension stuff. serverinfo rejects non-empty extensions. Omit extension if no relevant serverinfo data. Improve error-handling in serverinfo callback. Cosmetic cleanups. s_client documentation. s_server documentation. SSL_CTX_serverinfo documentation. Cleaup -1 and NULL callback handling for custom extensions, add tests. Cleanup ssl_rsa.c serverinfo code. Whitespace cleanup. Improve comments in ssl.h for serverinfo. Whitespace. Cosmetic cleanup. Reject non-zero-len serverinfo extensions. Whitespace. Make it build. Conflicts: test/testssl
2013-01-15Add support for broken protocol tests (backport from master branch)Dr. Stephen Henson
2012-12-26handle point format list retrieval for clients too (from HEAD)Dr. Stephen Henson
2012-12-26Add support for printing out and retrieving EC point formats extension.Dr. Stephen Henson
(backport from HEAD)
2012-12-26Add 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. (backport from HEAD)
2012-12-26new ctrl to retrive value of received temporary key in server key exchange ↵Dr. Stephen Henson
message, print out details in s_client (backport from HEAD)
2012-12-26store and print out message digest peer signed with in TLS 1.2Dr. Stephen Henson
(backport from HEAD)
2012-12-26Add three Suite B modes to TLS code, supporting RFC6460.Dr. Stephen Henson
(backport from HEAD)
2012-12-26Add 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. (backport from HEAD)
2012-12-26Add 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. (backport from HEAD)
2012-12-26Separate 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. (backport from HEAD)
2012-12-26Function tls1_check_ec_server_key is now redundant as we makeDr. Stephen Henson
appropriate checks in tls1_check_chain. (backport from HEAD)
2012-12-26Add 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. (backport from HEAD)
2012-12-26Add support for application defined signature algorithms for use withDr. Stephen Henson
TLS v1.2. These are sent as an extension for clients and during a certificate request for servers. TODO: add support for shared signature algorithms, respect shared algorithms when deciding which ciphersuites and certificates to permit. (backport from HEAD)
2012-06-11Fix memory leak.Ben Laurie
2012-06-06Fix memory leak.Ben Laurie
2012-05-29RFC 5878 support.Ben Laurie
2012-05-10PR: 2806Dr. Stephen Henson
Submitted by: PK <runningdoglackey@yahoo.com> Correct ciphersuite signature algorithm definitions.
2012-04-17Disable SHA-2 ciphersuites in < TLS 1.2 connections.Bodo Möller
(TLS 1.2 clients could end up negotiating these with an OpenSSL server with TLS 1.2 disabled, which is problematic.) Submitted by: Adam Langley
2012-04-06Add support for automatic ECDH temporary key parameter selection. WhenDr. Stephen Henson
enabled instead of requiring an application to hard code a (possibly inappropriate) parameter set and delve into EC internals we just automatically use the preferred curve. (backport from HEAD)
2012-04-06Tidy up EC parameter check code: instead of accessing internal structuresDr. Stephen Henson
add utility functions to t1_lib.c to check if EC certificates and parameters are consistent with peer. (backport from HEAD)