diff options
author | Matt Caswell <matt@openssl.org> | 2017-05-15 11:24:24 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2017-05-17 10:40:04 +0100 |
commit | bd990e2535ca387def9a01218a813dc3fa547e3c (patch) | |
tree | 81aea8bb9f02057ea44a2669b008729e2cc35f61 /test | |
parent | e1cfd184dafb3e0759c567d7ca13a92b5491ff89 (diff) |
Don't allow fragmented alerts
An alert message is 2 bytes long. In theory it is permissible in SSLv3 -
TLSv1.2 to fragment such alerts across multiple records (some of which
could be empty). In practice it make no sense to send an empty alert
record, or to fragment one. TLSv1.3 prohibts this altogether and other
libraries (BoringSSL, NSS) do not support this at all. Supporting it adds
significant complexity to the record layer, and its removal is unlikely
to cause inter-operability issues.
The DTLS code for this never worked anyway and it is not supported at a
protocol level for DTLS. Similarly fragmented DTLS handshake records only
work at a protocol level where at least the handshake message header
exists within the record. DTLS code existed for trying to handle fragmented
handshake records smaller than this size. This code didn't work either so
has also been removed.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3476)
Diffstat (limited to 'test')
-rw-r--r-- | test/recipes/70-test_sslrecords.t | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/recipes/70-test_sslrecords.t b/test/recipes/70-test_sslrecords.t index 99b0181dde..bac738c311 100644 --- a/test/recipes/70-test_sslrecords.t +++ b/test/recipes/70-test_sslrecords.t @@ -59,14 +59,14 @@ $proxy->serverflags("-tls1_2"); $proxy->start(); ok(TLSProxy::Message->fail(), "Too many in context empty records test"); -#Test 4: Injecting a fragmented fatal alert should fail. We actually expect no -# alerts to be sent from either side because *we* injected the fatal -# alert, i.e. this will look like a disorderly close +#Test 4: Injecting a fragmented fatal alert should fail. We expect the server to +# send back an alert of its own because it cannot handle fragmented +# alerts $proxy->clear(); $proxy->filter(\&add_frag_alert_filter); $proxy->serverflags("-tls1_2"); $proxy->start(); -ok(!TLSProxy::Message->end(), "Fragmented alert records test"); +ok(TLSProxy::Message->fail(), "Fragmented alert records test"); #Run some SSLv2 ClientHello tests |