summaryrefslogtreecommitdiffstats
path: root/ssl/record
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2017-04-20 15:13:28 +0100
committerMatt Caswell <matt@openssl.org>2017-04-25 11:13:39 +0100
commitbd79bcb42bab120575fc398692b7b61b1c5e6ed2 (patch)
treec7a3622d3da971372d037319ea956193a837ab6e /ssl/record
parentc4666bfa13480c1e700a0d487300da2a56e889af (diff)
Remove special case code for SCTP reneg handling
There was code existing which attempted to handle the case where application data is received after a reneg handshake has started in SCTP. In normal DTLS we just fail the connection if this occurs, so there doesn't seem any reason to try and work around it for SCTP. In practice it didn't work properly anyway and is probably a bad idea to start with. Fixes #3251 Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3286)
Diffstat (limited to 'ssl/record')
-rw-r--r--ssl/record/rec_layer_d1.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/ssl/record/rec_layer_d1.c b/ssl/record/rec_layer_d1.c
index cd6343acf9..ca7f427377 100644
--- a/ssl/record/rec_layer_d1.c
+++ b/ssl/record/rec_layer_d1.c
@@ -367,18 +367,7 @@ int dtls1_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf,
* type == SSL3_RT_HANDSHAKE.
*/
-#ifndef OPENSSL_NO_SCTP
- /*
- * Continue handshake if it had to be interrupted to read app data with
- * SCTP.
- */
- if ((!ossl_statem_get_in_handshake(s) && SSL_in_init(s)) ||
- (BIO_dgram_is_sctp(SSL_get_rbio(s))
- && ossl_statem_in_sctp_read_sock(s)
- && s->s3->in_read_app_data != 2))
-#else
if (!ossl_statem_get_in_handshake(s) && SSL_in_init(s))
-#endif
{
/* type == SSL3_RT_APPLICATION_DATA */
i = s->handshake_func(s);
@@ -521,18 +510,6 @@ int dtls1_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf,
}
#ifndef OPENSSL_NO_SCTP
/*
- * We were about to renegotiate but had to read belated application
- * data first, so retry.
- */
- if (BIO_dgram_is_sctp(SSL_get_rbio(s)) &&
- SSL3_RECORD_get_type(rr) == SSL3_RT_APPLICATION_DATA &&
- ossl_statem_in_sctp_read_sock(s)) {
- s->rwstate = SSL_READING;
- BIO_clear_retry_flags(SSL_get_rbio(s));
- BIO_set_retry_read(SSL_get_rbio(s));
- }
-
- /*
* We might had to delay a close_notify alert because of reordered
* app data. If there was an alert and there is no message to read
* anymore, finally set shutdown.