boringssl/ssl
David Benjamin 15aa895a0b Tidy up the DTLS code's blocking-mode retransmits.
Move this logic out of dtls1_read_bytes and into dtls1_get_record. Only trigger
it when reading from the buffer fails. The other one shouldn't be necessary.
This exists to handle the blocking BIO case when the
BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT signal triggers, so we only need to do it when
timeouts actually trigger.

There also doesn't seem to be a need for most of the machinery. The
BIO_set_flags call seems to be working around a deficiency in the underlying
BIO. There also shouldn't be a need to check the handshake state as there
wouldn't be a timer to restart otherwise.

Change-Id: Ic901ccfb5b82aeb409d16a9d32c04741410ad6d7
Reviewed-on: https://boringssl-review.googlesource.com/8122
Reviewed-by: Steven Valdez <svaldez@google.com>
Reviewed-by: Adam Langley <agl@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
2016-06-08 18:13:42 +00:00
..
pqueue Don't cast |OPENSSL_malloc|/|OPENSSL_realloc| result. 2016-02-11 22:07:56 +00:00
test Test both synchronous and asynchronous DTLS retransmit. 2016-06-08 18:11:41 +00:00
CMakeLists.txt Implement draft-ietf-tls-curve25519-01 in C. 2015-12-22 21:51:30 +00:00
custom_extensions.c Align the SSL stack on #include style. 2015-09-15 23:32:07 +00:00
d1_both.c Tidy up the DTLS code's blocking-mode retransmits. 2016-06-08 18:13:42 +00:00
d1_clnt.c Don't call ERR_clear_system_error in so many places. 2016-06-07 15:53:44 +00:00
d1_lib.c Never expose ssl->bbio in the public API. 2016-05-23 18:15:03 +00:00
d1_meth.c Pull ChangeCipherSpec into the handshake state machine. 2015-12-16 18:36:57 +00:00
d1_pkt.c Tidy up the DTLS code's blocking-mode retransmits. 2016-06-08 18:13:42 +00:00
d1_srtp.c Make kSRTPProfiles static. 2016-05-13 14:12:22 +00:00
d1_srvr.c Don't call ERR_clear_system_error in so many places. 2016-06-07 15:53:44 +00:00
dtls_record.c Move aead_{read,write}_ctx and next_proto_negotiated into ssl->s3. 2016-01-15 21:40:25 +00:00
internal.h Tidy up the DTLS code's blocking-mode retransmits. 2016-06-08 18:13:42 +00:00
s3_both.c Remove state parameters to ssl3_get_message. 2016-05-18 20:51:48 +00:00
s3_clnt.c Don't call ERR_clear_system_error in so many places. 2016-06-07 15:53:44 +00:00
s3_enc.c Remove some easy obj.h dependencies. 2016-03-31 20:50:33 +00:00
s3_lib.c Generalizing curves to groups in preparation for TLS 1.3. 2016-05-20 17:43:11 +00:00
s3_meth.c Pull ChangeCipherSpec into the handshake state machine. 2015-12-16 18:36:57 +00:00
s3_pkt.c Lift an impossible check to an assert. 2016-06-06 20:47:07 +00:00
s3_srvr.c Don't call ERR_clear_system_error in so many places. 2016-06-07 15:53:44 +00:00
ssl_aead_ctx.c Adding TLS 1.3 AEAD construction. 2016-05-25 18:04:24 +00:00
ssl_asn1.c Check for overflow when parsing a CBS with d2i_*. 2015-11-16 23:17:42 +00:00
ssl_buffer.c Don't call ERR_clear_system_error in so many places. 2016-06-07 15:53:44 +00:00
ssl_cert.c Ensure we check i2d_X509 return val 2016-04-26 17:12:01 +00:00
ssl_cipher.c Add SSL_CIPHER_is_DHE. 2016-06-03 17:57:05 +00:00
ssl_ecdh.c Generalizing curves to groups in preparation for TLS 1.3. 2016-05-20 17:43:11 +00:00
ssl_file.c Banish SSL_add_dir_cert_subjects_to_stack and OPENSSL_DIR_CTX to decrepit. 2016-04-27 18:40:25 +00:00
ssl_lib.c Don't call ERR_clear_system_error in so many places. 2016-06-07 15:53:44 +00:00
ssl_rsa.c Add |SSL_CTX_set_private_key_method| to parallel |SSL_set_private_key_method| 2016-03-07 18:16:58 +00:00
ssl_session.c Split unlock functions into read/write variants. 2016-05-31 21:09:29 +00:00
ssl_stat.c Remove state parameters to ssl3_get_message. 2016-05-18 20:51:48 +00:00
ssl_test.cc Add a unit test for one-sided shutdown. 2016-06-02 19:24:05 +00:00
t1_enc.c Remove some easy obj.h dependencies. 2016-03-31 20:50:33 +00:00
t1_lib.c Generalizing curves to groups in preparation for TLS 1.3. 2016-05-20 17:43:11 +00:00
tls_record.c Adding TLS 1.3 Record Layer. 2016-06-02 22:18:48 +00:00