From 22ae579bea93c0a426bacb764783e0e2cf35c14c Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Fri, 21 Apr 2017 14:00:20 +0100 Subject: Don't attempt to send fragments > max_send_fragment in DTLS We were allocating the write buffer based on the size of max_send_fragment, but ignoring it when writing data. We should fragment handshake messages if they exceed max_send_fragment and reject application data writes that are too large. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/3287) --- ssl/ssl_err.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ssl/ssl_err.c') diff --git a/ssl/ssl_err.c b/ssl/ssl_err.c index 73e0ae15c1..be4c0c00c1 100644 --- a/ssl/ssl_err.c +++ b/ssl/ssl_err.c @@ -415,6 +415,8 @@ static ERR_STRING_DATA SSL_str_reasons[] = { "error in received cipher list"}, {ERR_REASON(SSL_R_ERROR_SETTING_TLSA_BASE_DOMAIN), "error setting tlsa base domain"}, + {ERR_REASON(SSL_R_EXCEEDS_MAX_FRAGMENT_SIZE), + "exceeds max fragment size"}, {ERR_REASON(SSL_R_EXCESSIVE_MESSAGE_SIZE), "excessive message size"}, {ERR_REASON(SSL_R_EXTRA_DATA_IN_MESSAGE), "extra data in message"}, {ERR_REASON(SSL_R_FAILED_TO_INIT_ASYNC), "failed to init async"}, -- cgit v1.2.3