summaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Collapse)Author
2016-11-15Check that SCT timestamps are not in the futureRob Percival
Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1554)
2016-11-15Revert "Remove heartbeats completely"Richard Levitte
Done too soon, this is for future OpenSSL 1.2.0 This reverts commit 6c62f9e1639a7d1a879f363a99882920104dfedb. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-11-15Remove heartbeats completelyRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1669)
2016-11-14dsa/dsa_gen: add error message for seed_len < 0Sebastian Andrzej Siewior
prio openssl 1.1.0 seed_len < q was accepted and the seed argument was then ignored. Now DSA_generate_parameters_ex() returns an error in such a case but no error string. Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1657)
2016-11-10Rename the Elliptic Curves extension to supported_groupsMatt Caswell
This is a skin deep change, which simply renames most places where we talk about curves in a TLS context to groups. This is because TLS1.3 has renamed the extension, and it can now include DH groups too. We still only support curves, but this rename should pave the way for a future extension for DH groups. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-11-09Fix some missing checks for TLS1_3_VERSION_DRAFTMatt Caswell
There were a few places where we weren't checking to see if we were using the draft TLS1.3 version or not. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-11-09Update TLS1.3 draft version numbers for latest draftMatt Caswell
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-11-09Add the ability to send the supported_versions extensionMatt Caswell
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-11-09Update HKDF to support separte Extract and Expand stepsMatt Caswell
At the moment you can only do an HKDF Extract and Expand in one go. For TLS1.3 we need to be able to do an Extract first, and the subsequently do a number of Expand steps on the same PRK. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-11-09Fix make update following extensions refactorMatt Caswell
Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-11-09Refactor ClientHello processing so that extensions get parsed earlierMatt Caswell
Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-11-07Implement RSASSA-PKCS1-v1_5 as specified.David Benjamin
RFC 3447, section 8.2.2, steps 3 and 4 states that verifiers must encode the DigestInfo struct and then compare the result against the public key operation result. This implies that one and only one encoding is legal. OpenSSL instead parses with crypto/asn1, then checks that the encoding round-trips, and allows some variations for the parameter. Sufficient laxness in this area can allow signature forgeries, as described in https://www.imperialviolet.org/2014/09/26/pkcs1.html Although there aren't known attacks against OpenSSL's current scheme, this change makes OpenSSL implement the algorithm as specified. This avoids the uncertainty and, more importantly, helps grow a healthy ecosystem. Laxness beyond the spec, particularly in implementations which enjoy wide use, risks harm to the ecosystem for all. A signature producer which only tests against OpenSSL may not notice bugs and accidentally become widely deployed. Thus implementations have a responsibility to honor the specification as tightly as is practical. In some cases, the damage is permanent and the spec deviation and security risk becomes a tax all implementors must forever pay, but not here. Both BoringSSL and Go successfully implemented and deployed RSASSA-PKCS1-v1_5 as specified since their respective beginnings, so this change should be compatible enough to pin down in future OpenSSL releases. See also https://tools.ietf.org/html/draft-thomson-postel-was-wrong-00 As a bonus, by not having to deal with sign/verify differences, this version is also somewhat clearer. It also more consistently enforces digest lengths in the verify_recover codepath. The NID_md5_sha1 codepath wasn't quite doing this right. Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Rich Salz <rsalz@openssl.org> GH: #1474
2016-11-07Correct the Id for the TLS1.3 ciphersuiteMatt Caswell
We have one TLS1.3 ciphersuite, but there is a typo in the id that should be corrected. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-11-04Fix some clashing symbol numbers due to merge conflictMatt Caswell
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-11-04Provide some constant time functions for dealing with size_t valuesMatt Caswell
Also implement the using of them Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-11-04Convert libssl writing for size_tMatt Caswell
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-11-04Further libssl size_t-ify of readingMatt Caswell
Writing still to be done Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-11-03Add a HEADER_MODES_H guard in include/openssl/modes.hRichard Levitte
Reviewed-by: Emilia Käsper <emilia@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1789)
2016-11-02Add a DSO_dsobyaddr() functionMatt Caswell
This works the same way as DSO_pathbyaddr() but instead returns a ptr to the DSO that contains the provided symbol. Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-11-02Partial revert of 3d8b2ec42 to add back DSO_pathbyaddrMatt Caswell
Commit 3d8b2ec42 removed various unused functions. However now we need to use one of them! This commit resurrects DSO_pathbyaddr(). We're not going to resurrect the Windows version though because what we need to achieve can be done a different way on Windows. Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-11-02Add DTLS_get_data_mtu() functionDavid Woodhouse
We add ssl_cipher_get_overhead() as an internal function, to avoid having too much ciphersuite-specific knowledge in DTLS_get_data_mtu() itself. It's going to need adjustment for TLSv1.3... but then again, so is fairly much *all* of the SSL_CIPHER handling. This bit is in the noise. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-11-02Add the SSL_METHOD for TLSv1.3 and all other base changes requiredMatt Caswell
Includes addition of the various options to s_server/s_client. Also adds one of the new TLS1.3 ciphersuites. This isn't "real" TLS1.3!! It's identical to TLS1.2 apart from the protocol and the ciphersuite...and the ciphersuite is just a renamed TLS1.2 one (not a "real" TLS1.3 ciphersuite). Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-11-01Add SSL_CTX_set1_cert_store()Todd Short
For convenience, combine getting a new ref for the new SSL_CTX with assigning the store and freeing the old one. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1755)
2016-10-29Try to unify BIO read/write parameter namesBenjamin Kaduk
After the recent reworking, not everything matched up, and some comments didn't catch up to the outl-->dlen and inl-->dlen renames that happened during the development of the recent patches. Try to make parameter names consistent across header, implementation, and manual pages. Also remove some trailing whitespace that was inadvertently introduced. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1798)
2016-10-28Fix some feedback issues for BIO size_t-ifyMatt Caswell
Rename some parameters; add some error codes; fix a comment; etc Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-10-28More parameter naming of BIO_read*/BIO_write* related functionsMatt Caswell
Based on feedback received. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-10-28Tweaks based on review feedback of BIO size_t workMatt Caswell
Rename some parameters. Also change handling of buffer sizes >INT_MAX in length. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-10-28Ensure all BIO functions call the new style callbackMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-10-28Create BIO_write_ex() which handles size_t argumentsMatt Caswell
Also extend BIO_METHOD to be able to supply an implementation for the new BIO_write_ex function. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-10-28Create BIO_read_ex() which handles size_t argumentsMatt Caswell
Also extend BIO_METHOD to be able to supply an implementation for the new BIO_read function. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-10-26Provide a cross-platform format specifier (OSSLzu) for printing size_tMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-10-22Fix support for DragonFly BSDjrmarino
The __DragonFly__ macros were introduced in issue #1546 along with a function naming fix, but it was decided they should be handled separately. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1765)
2016-10-17Add SSL_OP_NO_ENCRYPT_THEN_MACDavid Woodhouse
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-10-10Remove trailing whitespace from some files.David Benjamin
The prevailing style seems to not have trailing whitespace, but a few lines do. This is mostly in the perlasm files, but a few C files got them after the reformat. This is the result of: find . -name '*.pl' | xargs sed -E -i '' -e 's/( |'$'\t'')*$//' find . -name '*.c' | xargs sed -E -i '' -e 's/( |'$'\t'')*$//' find . -name '*.h' | xargs sed -E -i '' -e 's/( |'$'\t'')*$//' Then bn_prime.h was excluded since this is a generated file. Note mkerr.pl has some changes in a heredoc for some help output, but other lines there lack trailing whitespace too. Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2016-10-03Don't set the handshake header in every messageMatt Caswell
Move setting the handshake header up a level into the state machine code in order to reduce boilerplate. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-09-29Convert CertStatus message construction to WPACKETMatt Caswell
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-09-29ASN1_ITEM should use type name not structure name.Dr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-09-29Add ASN1_ITEM lookup and enumerate functions.Dr. Stephen Henson
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-09-29Fix missing NULL checks in NewSessionTicket constructionMatt Caswell
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-09-22Add OCSP_RESPID_match()Matt Caswell
Add a function for testing whether a given OCSP_RESPID matches with a certificate. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-09-22Add the ability to set OCSP_RESPID fieldsMatt Caswell
OCSP_RESPID was made opaque in 1.1.0, but no accessors were provided for setting the name/key value for the OCSP_RESPID. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-09-21Don't allow too many consecutive warning alertsMatt Caswell
Certain warning alerts are ignored if they are received. This can mean that no progress will be made if one peer continually sends those warning alerts. Implement a count so that we abort the connection if we receive too many. Issue reported by Shi Lei. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-09-21Revert "Constify code about X509_VERIFY_PARAM"Rich Salz
This reverts commit 81f9ce1e1965e0e33db6d2391285c4c1b6af0434. Reviewed-by: Matt Caswell <matt@openssl.org>
2016-09-21make update and fix some associated mis-matched error codesMatt Caswell
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-09-20Convert NextProto message construction to WPACKETMatt Caswell
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-09-18Constify code about X509_VERIFY_PARAMFdaSilvaYY
Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1594)
2016-09-13bio.h: fix number of arguments passed to BIO_ptr_ctrl()Viktor Szakats
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1520)
2016-09-13Convert tls_construct_client_hello() to use PACKETWMatt Caswell
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-09-11VMS: be less picky when loading DSOsRichard Levitte
The DSO API was picky about casing of symbol names on VMS. There's really no reason to be that picky, it's mostly just annoying. Therefore, we take away the possibility to flag for a choice, and will instead first try to find a symbol with exact case, and failing that, we try to find it in upper case. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-08-25Update CHANGES, NEWS, README and opensslv.h on masterRichard Levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>