From 97997489748c79466bc18789e1f44d742887a32d Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Fri, 6 Jan 2017 16:22:23 +0000 Subject: [PATCH] ChangeCipherSpec is not allowed in TLSv1.3 Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/2259) --- ssl/record/rec_layer_s3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ssl/record/rec_layer_s3.c b/ssl/record/rec_layer_s3.c index f0ac4a4df3..5f37b0fa66 100644 --- a/ssl/record/rec_layer_s3.c +++ b/ssl/record/rec_layer_s3.c @@ -1223,7 +1223,8 @@ int ssl3_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf, if (type == SSL3_RECORD_get_type(rr) || (SSL3_RECORD_get_type(rr) == SSL3_RT_CHANGE_CIPHER_SPEC - && type == SSL3_RT_HANDSHAKE && recvd_type != NULL)) { + && type == SSL3_RT_HANDSHAKE && recvd_type != NULL + && !SSL_IS_TLS13(s))) { /* * SSL3_RT_APPLICATION_DATA or * SSL3_RT_HANDSHAKE or -- 2.25.1