The internal BIO functions do not in fact look at this flag, only the outer tls_read and tls_write functions do.
Unified · Split
| @@ -702,8 +702,7 @@ static int dtls_handshake(URLContext *h) · 701 unmodified lines | |||
| 702 | int ret = 1, r0, r1; | 702 | int ret = 1, r0, r1; |
| 703 | TLSContext *p = h->priv_data; | 703 | TLSContext *p = h->priv_data; |
| 704 | 704 | ||
| 705 | int was_nonblock = h->flags & AVIO_FLAG_NONBLOCK; | 705 | p->tls_shared.udp->flags &= ~AVIO_FLAG_NONBLOCK; |
| 706 | h->flags &= ~AVIO_FLAG_NONBLOCK; | ||
| 707 | 706 | ||
| 708 | r0 = SSL_do_handshake(p->ssl); | 707 | r0 = SSL_do_handshake(p->ssl); |
| 709 | if (r0 <= 0) { | 708 | if (r0 <= 0) { |
| @@ -724,8 +723,6 @@ static int dtls_handshake(URLContext *h) · 14 unmodified lines | |||
| 724 | ret = 0; | 723 | ret = 0; |
| 725 | p->tls_shared.state = DTLS_STATE_FINISHED; | 724 | p->tls_shared.state = DTLS_STATE_FINISHED; |
| 726 | end: | 725 | end: |
| 727 | if (was_nonblock) | ||
| 728 | h->flags |= AVIO_FLAG_NONBLOCK; | ||
| 729 | return ret; | 726 | return ret; |
| 730 | } | 727 | } |
| 731 | 728 | ||