[openssl-commits] [openssl] master update
Matt Caswell
matt at openssl.org
Thu Nov 17 11:06:25 UTC 2016
The branch master has been updated
via 657a43f6629cf5296a55731af5fd80f6602679cf (commit)
from 86ff6cc6b2f2718fadbdc2a2c7add51949bcd4a4 (commit)
- Log -----------------------------------------------------------------
commit 657a43f6629cf5296a55731af5fd80f6602679cf
Author: Matt Caswell <matt at openssl.org>
Date: Wed Nov 16 10:22:38 2016 +0000
Fix missing SSL_IS_TLS13(s) usage
We should use the macro for testing if we are using TLSv1.3 rather than
checking s->version directly.
Reviewed-by: Rich Salz <rsalz at openssl.org>
-----------------------------------------------------------------------
Summary of changes:
ssl/record/ssl3_record.c | 2 +-
ssl/statem/statem_srvr.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ssl/record/ssl3_record.c b/ssl/record/ssl3_record.c
index 181ebbb..d106e38 100644
--- a/ssl/record/ssl3_record.c
+++ b/ssl/record/ssl3_record.c
@@ -205,7 +205,7 @@ int ssl3_get_record(SSL *s)
n2s(p, rr[num_recs].length);
/* Lets check version. In TLSv1.3 we ignore this field */
- if (!s->first_packet && s->version != TLS1_3_VERSION
+ if (!s->first_packet && !SSL_IS_TLS13(s)
&& version != s->version) {
SSLerr(SSL_F_SSL3_GET_RECORD, SSL_R_WRONG_VERSION_NUMBER);
if ((s->version & 0xFF00) == (version & 0xFF00)
diff --git a/ssl/statem/statem_srvr.c b/ssl/statem/statem_srvr.c
index 3c4d6ee..97ecbcd 100644
--- a/ssl/statem/statem_srvr.c
+++ b/ssl/statem/statem_srvr.c
@@ -1445,7 +1445,7 @@ MSG_PROCESS_RETURN tls_process_client_hello(SSL *s, PACKET *pkt)
}
/* Check we've got a key_share for TLSv1.3 */
- if (s->version == TLS1_3_VERSION && s->s3->peer_tmp == NULL && !s->hit) {
+ if (SSL_IS_TLS13(s) && s->s3->peer_tmp == NULL && !s->hit) {
/* No suitable share */
/* TODO(TLS1.3): Send a HelloRetryRequest */
al = SSL_AD_HANDSHAKE_FAILURE;
More information about the openssl-commits
mailing list