diff options
author | David Benjamin <davidben@chromium.org> | 2015-02-21 07:04:38 +0300 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2015-02-23 22:32:27 +0300 |
commit | ce9f0177f891ea0d00b60f67dcffd016a4ef2395 (patch) | |
tree | a1a99c8ba2ede56b82c6a275501fb082474b664d | |
parent | 04c36b5062b3cb6149e549f9f6f5f6fb49d19c2e (diff) |
Remove BIO_should_retry checks in DTLS state machines.
These were added in upstream's 7e159e0133d28bec9148446e8f4dd86c0216d819 for
SCTP. As far as I can tell, they were a no-op there too. The corresponding RT
ticket makes no mention of them.
SSL_get_error checks the retry flags of the BIO already. Specifically it checks
BIO_should_read and BIO_should_write, but those two automatically set
BIO_should_retry.
(Minor, but I noticed them idly. One less thing to think about when the state
machines finally unify.)
Change-Id: I17a956a51895fba383063dee574e0fbe3209f9b0
Reviewed-on: https://boringssl-review.googlesource.com/3560
Reviewed-by: Adam Langley <agl@google.com>
-rw-r--r-- | ssl/d1_clnt.c | 6 | ||||
-rw-r--r-- | ssl/d1_srvr.c | 6 |
2 files changed, 0 insertions, 12 deletions
diff --git a/ssl/d1_clnt.c b/ssl/d1_clnt.c index ae6f36df..2c255816 100644 --- a/ssl/d1_clnt.c +++ b/ssl/d1_clnt.c @@ -458,12 +458,6 @@ int dtls1_connect(SSL *s) { case SSL3_ST_CW_FLUSH: s->rwstate = SSL_WRITING; if (BIO_flush(s->wbio) <= 0) { - /* If the write error was fatal, stop trying */ - if (!BIO_should_retry(s->wbio)) { - s->rwstate = SSL_NOTHING; - s->state = s->s3->tmp.next_state; - } - ret = -1; goto end; } diff --git a/ssl/d1_srvr.c b/ssl/d1_srvr.c index 4031dd1c..0a4dc473 100644 --- a/ssl/d1_srvr.c +++ b/ssl/d1_srvr.c @@ -363,12 +363,6 @@ int dtls1_accept(SSL *s) { case SSL3_ST_SW_FLUSH: s->rwstate = SSL_WRITING; if (BIO_flush(s->wbio) <= 0) { - /* If the write error was fatal, stop trying */ - if (!BIO_should_retry(s->wbio)) { - s->rwstate = SSL_NOTHING; - s->state = s->s3->tmp.next_state; - } - ret = -1; goto end; } |