Fail if an unrecognised record type is received
authorMatt Caswell <matt@openssl.org>
Wed, 2 Nov 2016 09:14:51 +0000 (09:14 +0000)
committerMatt Caswell <matt@openssl.org>
Wed, 2 Nov 2016 23:25:48 +0000 (23:25 +0000)
commit77cd04bd27397161faa4ad0b211727bfd97e6a67
treec417e3e66eded2b6a196e1b1c73669c340f1df02
parentbfca0515b6977cba7b50215fc6d7d88250c9ca38
Fail if an unrecognised record type is received

TLS1.0 and TLS1.1 say you SHOULD ignore unrecognised record types, but
TLS 1.2 says you MUST send an unexpected message alert. We swap to the
TLS 1.2 behaviour for all protocol versions to prevent issues where no
progress is being made and the peer continually sends unrecognised record
types, using up resources processing them.

Issue reported by 郭志攀

Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit 436a2a0179416d2cc22b678b63e50c2638384d5f)
ssl/record/rec_layer_s3.c