Update pre9, Support TLS 1.3 final
This commit is contained in:
@@ -225,16 +225,7 @@
|
|||||||
*) Support for TLSv1.3 added. Note that users upgrading from an earlier
|
*) Support for TLSv1.3 added. Note that users upgrading from an earlier
|
||||||
version of OpenSSL should review their configuration settings to ensure
|
version of OpenSSL should review their configuration settings to ensure
|
||||||
that they are still appropriate for TLSv1.3. For further information see:
|
that they are still appropriate for TLSv1.3. For further information see:
|
||||||
https://www.openssl.org/blog/blog/2018/02/08/tlsv1.3/
|
https://wiki.openssl.org/index.php/TLS1.3
|
||||||
|
|
||||||
NOTE: In this pre-release of OpenSSL a draft version of the
|
|
||||||
TLSv1.3 standard has been implemented. Implementations of different draft
|
|
||||||
versions of the standard do not inter-operate, and this version will not
|
|
||||||
inter-operate with an implementation of the final standard when it is
|
|
||||||
eventually published. Different pre-release versions may implement
|
|
||||||
different versions of the draft. The final version of OpenSSL 1.1.1 will
|
|
||||||
implement the final version of the standard.
|
|
||||||
TODO(TLS1.3): Remove the above note before final release
|
|
||||||
[Matt Caswell]
|
[Matt Caswell]
|
||||||
|
|
||||||
*) Grand redesign of the OpenSSL random generator
|
*) Grand redesign of the OpenSSL random generator
|
||||||
@@ -465,6 +456,62 @@
|
|||||||
|
|
||||||
Changes between 1.1.0h and 1.1.0i [xx XXX xxxx]
|
Changes between 1.1.0h and 1.1.0i [xx XXX xxxx]
|
||||||
|
|
||||||
|
*) Client DoS due to large DH parameter
|
||||||
|
|
||||||
|
During key agreement in a TLS handshake using a DH(E) based ciphersuite a
|
||||||
|
malicious server can send a very large prime value to the client. This will
|
||||||
|
cause the client to spend an unreasonably long period of time generating a
|
||||||
|
key for this prime resulting in a hang until the client has finished. This
|
||||||
|
could be exploited in a Denial Of Service attack.
|
||||||
|
|
||||||
|
This issue was reported to OpenSSL on 5th June 2018 by Guido Vranken
|
||||||
|
(CVE-2018-0732)
|
||||||
|
[Guido Vranken]
|
||||||
|
|
||||||
|
*) Cache timing vulnerability in RSA Key Generation
|
||||||
|
|
||||||
|
The OpenSSL RSA Key generation algorithm has been shown to be vulnerable to
|
||||||
|
a cache timing side channel attack. An attacker with sufficient access to
|
||||||
|
mount cache timing attacks during the RSA key generation process could
|
||||||
|
recover the private key.
|
||||||
|
|
||||||
|
This issue was reported to OpenSSL on 4th April 2018 by Alejandro Cabrera
|
||||||
|
Aldaya, Billy Brumley, Cesar Pereida Garcia and Luis Manuel Alvarez Tapia.
|
||||||
|
(CVE-2018-0737)
|
||||||
|
[Billy Brumley]
|
||||||
|
|
||||||
|
*) Make EVP_PKEY_asn1_new() a bit stricter about its input. A NULL pem_str
|
||||||
|
parameter is no longer accepted, as it leads to a corrupt table. NULL
|
||||||
|
pem_str is reserved for alias entries only.
|
||||||
|
[Richard Levitte]
|
||||||
|
|
||||||
|
*) Revert blinding in ECDSA sign and instead make problematic addition
|
||||||
|
length-invariant. Switch even to fixed-length Montgomery multiplication.
|
||||||
|
[Andy Polyakov]
|
||||||
|
|
||||||
|
*) Change generating and checking of primes so that the error rate of not
|
||||||
|
being prime depends on the intended use based on the size of the input.
|
||||||
|
For larger primes this will result in more rounds of Miller-Rabin.
|
||||||
|
The maximal error rate for primes with more than 1080 bits is lowered
|
||||||
|
to 2^-128.
|
||||||
|
[Kurt Roeckx, Annie Yousar]
|
||||||
|
|
||||||
|
*) Increase the number of Miller-Rabin rounds for DSA key generating to 64.
|
||||||
|
[Kurt Roeckx]
|
||||||
|
|
||||||
|
*) Add blinding to ECDSA and DSA signatures to protect against side channel
|
||||||
|
attacks discovered by Keegan Ryan (NCC Group).
|
||||||
|
[Matt Caswell]
|
||||||
|
|
||||||
|
*) When unlocking a pass phrase protected PEM file or PKCS#8 container, we
|
||||||
|
now allow empty (zero character) pass phrases.
|
||||||
|
[Richard Levitte]
|
||||||
|
|
||||||
|
*) Certificate time validation (X509_cmp_time) enforces stricter
|
||||||
|
compliance with RFC 5280. Fractional seconds and timezone offsets
|
||||||
|
are no longer allowed.
|
||||||
|
[Emilia Käsper]
|
||||||
|
|
||||||
*) Fixed a text canonicalisation bug in CMS
|
*) Fixed a text canonicalisation bug in CMS
|
||||||
|
|
||||||
Where a CMS detached signature is used with text content the text goes
|
Where a CMS detached signature is used with text content the text goes
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
# comments below...
|
# comments below...
|
||||||
|
|
||||||
{
|
{
|
||||||
|
use File::Spec::Functions;
|
||||||
|
|
||||||
my $android_ndk = {};
|
my $android_ndk = {};
|
||||||
my %triplet = (
|
my %triplet = (
|
||||||
arm => "arm-linux-androideabi",
|
arm => "arm-linux-androideabi",
|
||||||
@@ -23,6 +25,7 @@
|
|||||||
my $ndk = $ENV{ANDROID_NDK};
|
my $ndk = $ENV{ANDROID_NDK};
|
||||||
die "\$ANDROID_NDK is not defined" if (!$ndk);
|
die "\$ANDROID_NDK is not defined" if (!$ndk);
|
||||||
die "\$ANDROID_NDK=$ndk is invalid" if (!-d "$ndk/platforms");
|
die "\$ANDROID_NDK=$ndk is invalid" if (!-d "$ndk/platforms");
|
||||||
|
$ndk = canonpath($ndk);
|
||||||
|
|
||||||
my $ndkver = undef;
|
my $ndkver = undef;
|
||||||
|
|
||||||
|
|||||||
@@ -405,7 +405,6 @@ my @disablables = (
|
|||||||
"tests",
|
"tests",
|
||||||
"threads",
|
"threads",
|
||||||
"tls",
|
"tls",
|
||||||
"tls13downgrade",
|
|
||||||
"ts",
|
"ts",
|
||||||
"ubsan",
|
"ubsan",
|
||||||
"ui-console",
|
"ui-console",
|
||||||
@@ -449,7 +448,6 @@ our %disabled = ( # "what" => "comment"
|
|||||||
"ssl3" => "default",
|
"ssl3" => "default",
|
||||||
"ssl3-method" => "default",
|
"ssl3-method" => "default",
|
||||||
"ubsan" => "default",
|
"ubsan" => "default",
|
||||||
"tls13downgrade" => "default",
|
|
||||||
"unit-test" => "default",
|
"unit-test" => "default",
|
||||||
"weak-ssl-ciphers" => "default",
|
"weak-ssl-ciphers" => "default",
|
||||||
"zlib" => "default",
|
"zlib" => "default",
|
||||||
|
|||||||
@@ -476,16 +476,6 @@
|
|||||||
require additional system-dependent options! See "Note on
|
require additional system-dependent options! See "Note on
|
||||||
multi-threading" below.
|
multi-threading" below.
|
||||||
|
|
||||||
enable-tls13downgrade
|
|
||||||
TODO(TLS1.3): Make this enabled by default and remove the
|
|
||||||
option when TLSv1.3 is out of draft
|
|
||||||
TLSv1.3 offers a downgrade protection mechanism. This is
|
|
||||||
implemented but disabled by default. It should not typically
|
|
||||||
be enabled except for testing purposes. Otherwise this could
|
|
||||||
cause problems if a pre-RFC version of OpenSSL talks to an
|
|
||||||
RFC implementation (it will erroneously be detected as a
|
|
||||||
downgrade).
|
|
||||||
|
|
||||||
no-ts
|
no-ts
|
||||||
Don't build Time Stamping Authority support.
|
Don't build Time Stamping Authority support.
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,11 @@
|
|||||||
o Add support for SipHash
|
o Add support for SipHash
|
||||||
o Grand redesign of the OpenSSL random generator
|
o Grand redesign of the OpenSSL random generator
|
||||||
|
|
||||||
|
Major changes between OpenSSL 1.1.0h and OpenSSL 1.1.0i [under development]
|
||||||
|
|
||||||
|
o Client DoS due to large DH parameter (CVE-2018-0732)
|
||||||
|
o Cache timing vulnerability in RSA Key Generation (CVE-2018-0737)
|
||||||
|
|
||||||
Major changes between OpenSSL 1.1.0g and OpenSSL 1.1.0h [under development]
|
Major changes between OpenSSL 1.1.0g and OpenSSL 1.1.0h [under development]
|
||||||
|
|
||||||
o Constructed ASN.1 types with a recursive definition could exceed the
|
o Constructed ASN.1 types with a recursive definition could exceed the
|
||||||
|
|||||||
+15
-4
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
int i2d_ASN1_OBJECT(const ASN1_OBJECT *a, unsigned char **pp)
|
int i2d_ASN1_OBJECT(const ASN1_OBJECT *a, unsigned char **pp)
|
||||||
{
|
{
|
||||||
unsigned char *p;
|
unsigned char *p, *allocated = NULL;
|
||||||
int objsize;
|
int objsize;
|
||||||
|
|
||||||
if ((a == NULL) || (a->data == NULL))
|
if ((a == NULL) || (a->data == NULL))
|
||||||
@@ -30,12 +30,23 @@ int i2d_ASN1_OBJECT(const ASN1_OBJECT *a, unsigned char **pp)
|
|||||||
if (pp == NULL || objsize == -1)
|
if (pp == NULL || objsize == -1)
|
||||||
return objsize;
|
return objsize;
|
||||||
|
|
||||||
p = *pp;
|
if (*pp == NULL) {
|
||||||
|
if ((p = allocated = OPENSSL_malloc(objsize)) == NULL) {
|
||||||
|
ASN1err(ASN1_F_I2D_ASN1_OBJECT, ERR_R_MALLOC_FAILURE);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
p = *pp;
|
||||||
|
}
|
||||||
|
|
||||||
ASN1_put_object(&p, 0, a->length, V_ASN1_OBJECT, V_ASN1_UNIVERSAL);
|
ASN1_put_object(&p, 0, a->length, V_ASN1_OBJECT, V_ASN1_UNIVERSAL);
|
||||||
memcpy(p, a->data, a->length);
|
memcpy(p, a->data, a->length);
|
||||||
p += a->length;
|
|
||||||
|
|
||||||
*pp = p;
|
/*
|
||||||
|
* If a new buffer was allocated, just return it back.
|
||||||
|
* If not, return the incremented buffer pointer.
|
||||||
|
*/
|
||||||
|
*pp = allocated != NULL ? allocated : p + a->length;
|
||||||
return objsize;
|
return objsize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -116,6 +116,7 @@ static const ERR_STRING_DATA ASN1_str_functs[] = {
|
|||||||
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_I2A_ASN1_OBJECT, 0), "i2a_ASN1_OBJECT"},
|
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_I2A_ASN1_OBJECT, 0), "i2a_ASN1_OBJECT"},
|
||||||
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_I2D_ASN1_BIO_STREAM, 0),
|
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_I2D_ASN1_BIO_STREAM, 0),
|
||||||
"i2d_ASN1_bio_stream"},
|
"i2d_ASN1_bio_stream"},
|
||||||
|
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_I2D_ASN1_OBJECT, 0), "i2d_ASN1_OBJECT"},
|
||||||
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_I2D_DSA_PUBKEY, 0), "i2d_DSA_PUBKEY"},
|
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_I2D_DSA_PUBKEY, 0), "i2d_DSA_PUBKEY"},
|
||||||
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_I2D_EC_PUBKEY, 0), "i2d_EC_PUBKEY"},
|
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_I2D_EC_PUBKEY, 0), "i2d_EC_PUBKEY"},
|
||||||
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_I2D_PRIVATEKEY, 0), "i2d_PrivateKey"},
|
{ERR_PACK(ERR_LIB_ASN1, ASN1_F_I2D_PRIVATEKEY, 0), "i2d_PrivateKey"},
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ static int ssl_module_init(CONF_IMODULE *md, const CONF *cnf)
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
cnt = sk_CONF_VALUE_num(cmd_lists);
|
cnt = sk_CONF_VALUE_num(cmd_lists);
|
||||||
|
ssl_module_free(md);
|
||||||
ssl_names = OPENSSL_zalloc(sizeof(*ssl_names) * cnt);
|
ssl_names = OPENSSL_zalloc(sizeof(*ssl_names) * cnt);
|
||||||
ssl_names_count = cnt;
|
ssl_names_count = cnt;
|
||||||
for (i = 0; i < ssl_names_count; i++) {
|
for (i = 0; i < ssl_names_count; i++) {
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ ASN1_F_DO_DUMP:125:do_dump
|
|||||||
ASN1_F_DO_TCREATE:222:do_tcreate
|
ASN1_F_DO_TCREATE:222:do_tcreate
|
||||||
ASN1_F_I2A_ASN1_OBJECT:126:i2a_ASN1_OBJECT
|
ASN1_F_I2A_ASN1_OBJECT:126:i2a_ASN1_OBJECT
|
||||||
ASN1_F_I2D_ASN1_BIO_STREAM:211:i2d_ASN1_bio_stream
|
ASN1_F_I2D_ASN1_BIO_STREAM:211:i2d_ASN1_bio_stream
|
||||||
|
ASN1_F_I2D_ASN1_OBJECT:143:i2d_ASN1_OBJECT
|
||||||
ASN1_F_I2D_DSA_PUBKEY:161:i2d_DSA_PUBKEY
|
ASN1_F_I2D_DSA_PUBKEY:161:i2d_DSA_PUBKEY
|
||||||
ASN1_F_I2D_EC_PUBKEY:181:i2d_EC_PUBKEY
|
ASN1_F_I2D_EC_PUBKEY:181:i2d_EC_PUBKEY
|
||||||
ASN1_F_I2D_PRIVATEKEY:163:i2d_PrivateKey
|
ASN1_F_I2D_PRIVATEKEY:163:i2d_PrivateKey
|
||||||
|
|||||||
@@ -7,6 +7,24 @@
|
|||||||
* https://www.openssl.org/source/license.html
|
* https://www.openssl.org/source/license.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
# if defined(__linux) || defined(__sun) || defined(__hpux)
|
||||||
|
/*
|
||||||
|
* Following definition aliases fopen to fopen64 on above mentioned
|
||||||
|
* platforms. This makes it possible to open and sequentially access files
|
||||||
|
* larger than 2GB from 32-bit application. It does not allow to traverse
|
||||||
|
* them beyond 2GB with fseek/ftell, but on the other hand *no* 32-bit
|
||||||
|
* platform permits that, not with fseek/ftell. Not to mention that breaking
|
||||||
|
* 2GB limit for seeking would require surgery to *our* API. But sequential
|
||||||
|
* access suffices for practical cases when you can run into large files,
|
||||||
|
* such as fingerprinting, so we can let API alone. For reference, the list
|
||||||
|
* of 32-bit platforms which allow for sequential access of large files
|
||||||
|
* without extra "magic" comprise *BSD, Darwin, IRIX...
|
||||||
|
*/
|
||||||
|
# ifndef _FILE_OFFSET_BITS
|
||||||
|
# define _FILE_OFFSET_BITS 64
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
|
||||||
#include "internal/cryptlib.h"
|
#include "internal/cryptlib.h"
|
||||||
|
|
||||||
#if !defined(OPENSSL_NO_STDIO)
|
#if !defined(OPENSSL_NO_STDIO)
|
||||||
|
|||||||
@@ -26,8 +26,7 @@ During the creation of a TLS or DTLS connection shared keying material is
|
|||||||
established between the two endpoints. The functions
|
established between the two endpoints. The functions
|
||||||
SSL_export_keying_material() and SSL_export_keying_material_early() enable an
|
SSL_export_keying_material() and SSL_export_keying_material_early() enable an
|
||||||
application to use some of this keying material for its own purposes in
|
application to use some of this keying material for its own purposes in
|
||||||
accordance with RFC5705 (for TLSv1.2 and below) or RFCXXXX (for TLSv1.3).
|
accordance with RFC5705 (for TLSv1.2 and below) or RFC8446 (for TLSv1.3).
|
||||||
TODO(TLS1.3): Update the RFC number when the RFC is published.
|
|
||||||
|
|
||||||
SSL_export_keying_material() derives keying material using
|
SSL_export_keying_material() derives keying material using
|
||||||
the F<exporter_master_secret> established in the handshake.
|
the F<exporter_master_secret> established in the handshake.
|
||||||
|
|||||||
@@ -101,6 +101,7 @@ int ERR_load_ASN1_strings(void);
|
|||||||
# define ASN1_F_DO_TCREATE 222
|
# define ASN1_F_DO_TCREATE 222
|
||||||
# define ASN1_F_I2A_ASN1_OBJECT 126
|
# define ASN1_F_I2A_ASN1_OBJECT 126
|
||||||
# define ASN1_F_I2D_ASN1_BIO_STREAM 211
|
# define ASN1_F_I2D_ASN1_BIO_STREAM 211
|
||||||
|
# define ASN1_F_I2D_ASN1_OBJECT 143
|
||||||
# define ASN1_F_I2D_DSA_PUBKEY 161
|
# define ASN1_F_I2D_DSA_PUBKEY 161
|
||||||
# define ASN1_F_I2D_EC_PUBKEY 181
|
# define ASN1_F_I2D_EC_PUBKEY 181
|
||||||
# define ASN1_F_I2D_PRIVATEKEY 163
|
# define ASN1_F_I2D_PRIVATEKEY 163
|
||||||
|
|||||||
+2
-2
@@ -4580,7 +4580,7 @@ int ssl_fill_hello_random(SSL *s, int server, unsigned char *result, size_t len,
|
|||||||
} else {
|
} else {
|
||||||
ret = RAND_bytes(result, len);
|
ret = RAND_bytes(result, len);
|
||||||
}
|
}
|
||||||
#ifndef OPENSSL_NO_TLS13DOWNGRADE
|
|
||||||
if (ret > 0) {
|
if (ret > 0) {
|
||||||
if (!ossl_assert(sizeof(tls11downgrade) < len)
|
if (!ossl_assert(sizeof(tls11downgrade) < len)
|
||||||
|| !ossl_assert(sizeof(tls12downgrade) < len))
|
|| !ossl_assert(sizeof(tls12downgrade) < len))
|
||||||
@@ -4592,7 +4592,7 @@ int ssl_fill_hello_random(SSL *s, int server, unsigned char *result, size_t len,
|
|||||||
memcpy(result + len - sizeof(tls11downgrade), tls11downgrade,
|
memcpy(result + len - sizeof(tls11downgrade), tls11downgrade,
|
||||||
sizeof(tls11downgrade));
|
sizeof(tls11downgrade));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -538,7 +538,8 @@ EXT_RETURN tls_construct_ctos_supported_versions(SSL *s, WPACKET *pkt,
|
|||||||
for (currv = max_version; currv >= min_version; currv--) {
|
for (currv = max_version; currv >= min_version; currv--) {
|
||||||
/* TODO(TLS1.3): Remove this first if clause prior to release!! */
|
/* TODO(TLS1.3): Remove this first if clause prior to release!! */
|
||||||
if (currv == TLS1_3_VERSION) {
|
if (currv == TLS1_3_VERSION) {
|
||||||
if (!WPACKET_put_bytes_u16(pkt, TLS1_3_VERSION_DRAFT)
|
if (!WPACKET_put_bytes_u16(pkt, TLS1_3_VERSION)
|
||||||
|
|| !WPACKET_put_bytes_u16(pkt, TLS1_3_VERSION_DRAFT)
|
||||||
|| !WPACKET_put_bytes_u16(pkt, TLS1_3_VERSION_DRAFT_27)
|
|| !WPACKET_put_bytes_u16(pkt, TLS1_3_VERSION_DRAFT_27)
|
||||||
|| !WPACKET_put_bytes_u16(pkt, TLS1_3_VERSION_DRAFT_26)
|
|| !WPACKET_put_bytes_u16(pkt, TLS1_3_VERSION_DRAFT_26)
|
||||||
|| !WPACKET_put_bytes_u16(pkt, TLS1_3_VERSION_DRAFT_23)) {
|
|| !WPACKET_put_bytes_u16(pkt, TLS1_3_VERSION_DRAFT_23)) {
|
||||||
|
|||||||
+9
-10
@@ -381,9 +381,6 @@ MSG_PROCESS_RETURN tls_process_cert_verify(SSL *s, PACKET *pkt)
|
|||||||
/* SSLfatal() already called */
|
/* SSLfatal() already called */
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
#ifdef SSL_DEBUG
|
|
||||||
fprintf(stderr, "USING TLSv1.2 HASH %s\n", EVP_MD_name(md));
|
|
||||||
#endif
|
|
||||||
} else if (!tls1_set_peer_legacy_sigalg(s, pkey)) {
|
} else if (!tls1_set_peer_legacy_sigalg(s, pkey)) {
|
||||||
SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_TLS_PROCESS_CERT_VERIFY,
|
SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_TLS_PROCESS_CERT_VERIFY,
|
||||||
ERR_R_INTERNAL_ERROR);
|
ERR_R_INTERNAL_ERROR);
|
||||||
@@ -396,6 +393,11 @@ MSG_PROCESS_RETURN tls_process_cert_verify(SSL *s, PACKET *pkt)
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SSL_DEBUG
|
||||||
|
if (SSL_USE_SIGALGS(s))
|
||||||
|
fprintf(stderr, "USING TLSv1.2 HASH %s\n", EVP_MD_name(md));
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Check for broken implementations of GOST ciphersuites */
|
/* Check for broken implementations of GOST ciphersuites */
|
||||||
/*
|
/*
|
||||||
* If key is GOST and len is exactly 64 or 128, it is signature without
|
* If key is GOST and len is exactly 64 or 128, it is signature without
|
||||||
@@ -1764,17 +1766,16 @@ int ssl_choose_server_version(SSL *s, CLIENTHELLO_MSG *hello, DOWNGRADE *dgrd)
|
|||||||
|
|
||||||
while (PACKET_get_net_2(&versionslist, &candidate_vers)) {
|
while (PACKET_get_net_2(&versionslist, &candidate_vers)) {
|
||||||
/* TODO(TLS1.3): Remove this before release */
|
/* TODO(TLS1.3): Remove this before release */
|
||||||
if (candidate_vers == TLS1_3_VERSION_DRAFT
|
if (candidate_vers == TLS1_3_VERSION
|
||||||
|
|| candidate_vers == TLS1_3_VERSION_DRAFT
|
||||||
|| candidate_vers == TLS1_3_VERSION_DRAFT_26
|
|| candidate_vers == TLS1_3_VERSION_DRAFT_26
|
||||||
|| candidate_vers == TLS1_3_VERSION_DRAFT_23) {
|
|| candidate_vers == TLS1_3_VERSION_DRAFT_23) {
|
||||||
if (best_vers == TLS1_3_VERSION
|
if (best_vers == TLS1_3_VERSION
|
||||||
&& orig_candidate > candidate_vers)
|
&& (orig_candidate > candidate_vers
|
||||||
|
|| orig_candidate == TLS1_3_VERSION))
|
||||||
continue;
|
continue;
|
||||||
orig_candidate = candidate_vers;
|
orig_candidate = candidate_vers;
|
||||||
candidate_vers = TLS1_3_VERSION;
|
candidate_vers = TLS1_3_VERSION;
|
||||||
} else if (candidate_vers == TLS1_3_VERSION) {
|
|
||||||
/* Don't actually accept real TLSv1.3 */
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* TODO(TLS1.3): There is some discussion on the TLS list about
|
* TODO(TLS1.3): There is some discussion on the TLS list about
|
||||||
@@ -1935,7 +1936,6 @@ int ssl_choose_client_version(SSL *s, int version, RAW_EXTENSION *extensions)
|
|||||||
if (s->version != vent->version)
|
if (s->version != vent->version)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
#ifndef OPENSSL_NO_TLS13DOWNGRADE
|
|
||||||
/* Check for downgrades */
|
/* Check for downgrades */
|
||||||
if (s->version == TLS1_2_VERSION && highver > s->version) {
|
if (s->version == TLS1_2_VERSION && highver > s->version) {
|
||||||
if (memcmp(tls12downgrade,
|
if (memcmp(tls12downgrade,
|
||||||
@@ -1962,7 +1962,6 @@ int ssl_choose_client_version(SSL *s, int version, RAW_EXTENSION *extensions)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
s->method = method;
|
s->method = method;
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
+1
-3
@@ -227,11 +227,9 @@ static int async_write(BIO *bio, const char *in, int inl)
|
|||||||
/*
|
/*
|
||||||
* We can't fragment anything after the ServerHello (or CCS <=
|
* We can't fragment anything after the ServerHello (or CCS <=
|
||||||
* TLS1.2), otherwise we get a bad record MAC
|
* TLS1.2), otherwise we get a bad record MAC
|
||||||
* TODO(TLS1.3): Change TLS1_3_VERSION_DRAFT to TLS1_3_VERSION
|
|
||||||
* before release
|
|
||||||
*/
|
*/
|
||||||
if (contenttype == SSL3_RT_CHANGE_CIPHER_SPEC
|
if (contenttype == SSL3_RT_CHANGE_CIPHER_SPEC
|
||||||
|| (negversion == TLS1_3_VERSION_DRAFT
|
|| (negversion == TLS1_3_VERSION
|
||||||
&& msgtype == SSL3_MT_SERVER_HELLO)) {
|
&& msgtype == SSL3_MT_SERVER_HELLO)) {
|
||||||
fragment = 0;
|
fragment = 0;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -148,6 +148,8 @@ Key = AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|||||||
Input = DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
|
Input = DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
|
||||||
Output = 56be34521d144c88dbb8c733f0e8b3f6
|
Output = 56be34521d144c88dbb8c733f0e8b3f6
|
||||||
|
|
||||||
|
Title = SHA1
|
||||||
|
|
||||||
# HMAC tests from NIST test data
|
# HMAC tests from NIST test data
|
||||||
|
|
||||||
MAC = HMAC
|
MAC = HMAC
|
||||||
@@ -168,6 +170,8 @@ Input = "Sample message for keylen=blocklen"
|
|||||||
Key = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F60616263
|
Key = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F60616263
|
||||||
Output = 2D51B2F7750E410584662E38F133435F4C4FD42A
|
Output = 2D51B2F7750E410584662E38F133435F4C4FD42A
|
||||||
|
|
||||||
|
Title = SHA2
|
||||||
|
|
||||||
MAC = HMAC
|
MAC = HMAC
|
||||||
Algorithm = SHA224
|
Algorithm = SHA224
|
||||||
Input = "Sample message for keylen=blocklen"
|
Input = "Sample message for keylen=blocklen"
|
||||||
@@ -240,6 +244,47 @@ Input = "Sample message for keylen=blocklen"
|
|||||||
Key = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F707172737475767778797A7B7C7D7E7F808182838485868788898A8B8C8D8E8F909192939495969798999A9B9C9D9E9FA0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBFC0C1C2C3C4C5C6C7
|
Key = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F707172737475767778797A7B7C7D7E7F808182838485868788898A8B8C8D8E8F909192939495969798999A9B9C9D9E9FA0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBFC0C1C2C3C4C5C6C7
|
||||||
Output = D93EC8D2DE1AD2A9957CB9B83F14E76AD6B5E0CCE285079A127D3B14BCCB7AA7286D4AC0D4CE64215F2BC9E6870B33D97438BE4AAA20CDA5C5A912B48B8E27F3
|
Output = D93EC8D2DE1AD2A9957CB9B83F14E76AD6B5E0CCE285079A127D3B14BCCB7AA7286D4AC0D4CE64215F2BC9E6870B33D97438BE4AAA20CDA5C5A912B48B8E27F3
|
||||||
|
|
||||||
|
Title = SHA3
|
||||||
|
|
||||||
|
# NIST's test vectors
|
||||||
|
|
||||||
|
MAC = HMAC
|
||||||
|
Algorithm = SHA3-384
|
||||||
|
Input = "Sample message for keylen<blocklen"
|
||||||
|
Key = 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f
|
||||||
|
Output = d588a3c51f3f2d906e8298c1199aa8ff6296218127f6b38a90b6afe2c5617725bc99987f79b22a557b6520db710b7f42
|
||||||
|
|
||||||
|
MAC = HMAC
|
||||||
|
Algorithm = SHA3-384
|
||||||
|
Input = "Sample message for keylen=blocklen"
|
||||||
|
Key = 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f6061626364656667
|
||||||
|
Output = a27d24b592e8c8cbf6d4ce6fc5bf62d8fc98bf2d486640d9eb8099e24047837f5f3bffbe92dcce90b4ed5b1e7e44fa90
|
||||||
|
|
||||||
|
MAC = HMAC
|
||||||
|
Algorithm = SHA3-384
|
||||||
|
Input = "Sample message for keylen>blocklen"
|
||||||
|
Key = 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f9091929394959697
|
||||||
|
Output = e5ae4c739f455279368ebf36d4f5354c95aa184c899d3870e460ebc288ef1f9470053f73f7c6da2a71bcaec38ce7d6ac
|
||||||
|
|
||||||
|
MAC = HMAC
|
||||||
|
Algorithm = SHA3-512
|
||||||
|
Input = "Sample message for keylen<blocklen"
|
||||||
|
Key = 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f
|
||||||
|
Output = 4efd629d6c71bf86162658f29943b1c308ce27cdfa6db0d9c3ce81763f9cbce5f7ebe9868031db1a8f8eb7b6b95e5c5e3f657a8996c86a2f6527e307f0213196
|
||||||
|
|
||||||
|
MAC = HMAC
|
||||||
|
Algorithm = SHA3-512
|
||||||
|
Input = "Sample message for keylen=blocklen"
|
||||||
|
Key = 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f4041424344454647
|
||||||
|
Output = 544e257ea2a3e5ea19a590e6a24b724ce6327757723fe2751b75bf007d80f6b360744bf1b7a88ea585f9765b47911976d3191cf83c039f5ffab0d29cc9d9b6da
|
||||||
|
|
||||||
|
MAC = HMAC
|
||||||
|
Algorithm = SHA3-512
|
||||||
|
Input = "Sample message for keylen>blocklen"
|
||||||
|
Key = 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f8081828384858687
|
||||||
|
Output = 5f464f5e5b7848e3885e49b2c385f0694985d0e38966242dc4a5fe3fea4b37d46b65ceced5dcf59438dd840bab22269f0ba7febdb9fcf74602a35666b2a32915
|
||||||
|
|
||||||
|
|
||||||
Title = CMAC tests (from FIPS module)
|
Title = CMAC tests (from FIPS module)
|
||||||
|
|
||||||
MAC = CMAC
|
MAC = CMAC
|
||||||
|
|||||||
@@ -40,8 +40,6 @@ my $proxy = TLSProxy::Proxy->new(
|
|||||||
|
|
||||||
#Test 1: Sending a status_request extension in both ClientHello and
|
#Test 1: Sending a status_request extension in both ClientHello and
|
||||||
#ServerHello but then omitting the CertificateStatus message is valid
|
#ServerHello but then omitting the CertificateStatus message is valid
|
||||||
#TODO(TLS1.3): Temporarily disabling this test in TLS1.3 until we've completed
|
|
||||||
#the move the status request extension to the Certificate message.
|
|
||||||
$proxy->clientflags("-status -no_tls1_3");
|
$proxy->clientflags("-status -no_tls1_3");
|
||||||
$proxy->start() or plan skip_all => "Unable to start up Proxy for tests";
|
$proxy->start() or plan skip_all => "Unable to start up Proxy for tests";
|
||||||
plan tests => 1;
|
plan tests => 1;
|
||||||
|
|||||||
@@ -145,8 +145,7 @@ sub modify_supported_versions_filter
|
|||||||
$ext = pack "C5",
|
$ext = pack "C5",
|
||||||
0x04, # Length
|
0x04, # Length
|
||||||
0x03, 0x03, #TLSv1.2
|
0x03, 0x03, #TLSv1.2
|
||||||
#TODO(TLS1.3): Fix before release
|
0x03, 0x04; #TLSv1.3
|
||||||
0x7f, 0x1c; #TLSv1.3 (draft 28)
|
|
||||||
} elsif ($testtype == UNRECOGNISED_VERSIONS) {
|
} elsif ($testtype == UNRECOGNISED_VERSIONS) {
|
||||||
$ext = pack "C5",
|
$ext = pack "C5",
|
||||||
0x04, # Length
|
0x04, # Length
|
||||||
@@ -160,8 +159,8 @@ sub modify_supported_versions_filter
|
|||||||
} elsif ($testtype == WITH_TLS1_4) {
|
} elsif ($testtype == WITH_TLS1_4) {
|
||||||
$ext = pack "C5",
|
$ext = pack "C5",
|
||||||
0x04, # Length
|
0x04, # Length
|
||||||
#TODO(TLS1.3): Fix before release
|
0x03, 0x05, #TLSv1.4
|
||||||
0x7f, 0x1c; #TLSv1.3 (draft 28)
|
0x03, 0x04; #TLSv1.3
|
||||||
}
|
}
|
||||||
if ($testtype == REVERSE_ORDER_VERSIONS
|
if ($testtype == REVERSE_ORDER_VERSIONS
|
||||||
|| $testtype == UNRECOGNISED_VERSIONS
|
|| $testtype == UNRECOGNISED_VERSIONS
|
||||||
|
|||||||
@@ -26,10 +26,6 @@ plan skip_all => "$test_name needs the sock feature enabled"
|
|||||||
plan skip_all => "$test_name needs TLS1.3 and TLS1.2 enabled"
|
plan skip_all => "$test_name needs TLS1.3 and TLS1.2 enabled"
|
||||||
if disabled("tls1_3") || disabled("tls1_2");
|
if disabled("tls1_3") || disabled("tls1_2");
|
||||||
|
|
||||||
# TODO(TLS1.3): Enable this when TLSv1.3 comes out of draft
|
|
||||||
plan skip_all => "$test_name not run in pre TLSv1.3 RFC implementation"
|
|
||||||
if disabled("tls13downgrade");
|
|
||||||
|
|
||||||
$ENV{OPENSSL_ia32cap} = '~0x200000200000000';
|
$ENV{OPENSSL_ia32cap} = '~0x200000200000000';
|
||||||
|
|
||||||
my $proxy = TLSProxy::Proxy->new(
|
my $proxy = TLSProxy::Proxy->new(
|
||||||
|
|||||||
@@ -95,9 +95,8 @@ use constant {
|
|||||||
EXT_FORCE_LAST => 0xffff
|
EXT_FORCE_LAST => 0xffff
|
||||||
};
|
};
|
||||||
|
|
||||||
# SignatureScheme of TLS 1.3, from
|
# SignatureScheme of TLS 1.3 from:
|
||||||
# https://tools.ietf.org/html/draft-ietf-tls-tls13-20#appendix-B.3.1.3
|
# https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-signaturescheme
|
||||||
# TODO(TLS1.3) update link to IANA registry after publication
|
|
||||||
# We have to manually grab the SHA224 equivalents from the old registry
|
# We have to manually grab the SHA224 equivalents from the old registry
|
||||||
use constant {
|
use constant {
|
||||||
SIG_ALG_RSA_PKCS1_SHA256 => 0x0401,
|
SIG_ALG_RSA_PKCS1_SHA256 => 0x0401,
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ my %record_type = (
|
|||||||
|
|
||||||
use constant {
|
use constant {
|
||||||
VERS_TLS_1_4 => 0x0305,
|
VERS_TLS_1_4 => 0x0305,
|
||||||
VERS_TLS_1_3_DRAFT => 0x7f1c,
|
|
||||||
VERS_TLS_1_3 => 0x0304,
|
VERS_TLS_1_3 => 0x0304,
|
||||||
VERS_TLS_1_2 => 0x0303,
|
VERS_TLS_1_2 => 0x0303,
|
||||||
VERS_TLS_1_1 => 0x0302,
|
VERS_TLS_1_1 => 0x0302,
|
||||||
|
|||||||
@@ -101,9 +101,7 @@ sub parse
|
|||||||
|
|
||||||
if ($random eq $hrrrandom) {
|
if ($random eq $hrrrandom) {
|
||||||
TLSProxy::Proxy->is_tls13(1);
|
TLSProxy::Proxy->is_tls13(1);
|
||||||
# TODO(TLS1.3): Replace this reference to draft version before release
|
} elsif ($neg_version == TLSProxy::Record::VERS_TLS_1_3) {
|
||||||
} elsif ($neg_version == TLSProxy::Record::VERS_TLS_1_3_DRAFT) {
|
|
||||||
$neg_version = TLSProxy::Record::VERS_TLS_1_3;
|
|
||||||
TLSProxy::Proxy->is_tls13(1);
|
TLSProxy::Proxy->is_tls13(1);
|
||||||
|
|
||||||
TLSProxy::Record->server_encrypting(1);
|
TLSProxy::Record->server_encrypting(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user