ChangeCipherSpec is not allowed in TLSv1.3
authorMatt Caswell <matt@openssl.org>
Fri, 6 Jan 2017 16:22:23 +0000 (16:22 +0000)
committerMatt Caswell <matt@openssl.org>
Mon, 30 Jan 2017 09:36:55 +0000 (09:36 +0000)
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2259)

ssl/record/rec_layer_s3.c

index f0ac4a4df3627aad3d936f834996bc217ded2f7c..5f37b0fa66e53db9f722b61710c7a5d15133db83 100644 (file)
@@ -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