diff options
-rw-r--r-- | ssl/d1_pkt.c | 9 | ||||
-rw-r--r-- | ssl/s3_pkt.c | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/ssl/d1_pkt.c b/ssl/d1_pkt.c index 7b2cab15..0885b8c6 100644 --- a/ssl/d1_pkt.c +++ b/ssl/d1_pkt.c @@ -724,12 +724,9 @@ static int do_dtls1_write(SSL *s, int type, const uint8_t *buf, SSL3_RECORD *wr; SSL3_BUFFER *wb; - /* first check if there is a SSL3_BUFFER still being written - * out. This will happen with non blocking IO */ - if (s->s3->wbuf.left != 0) { - assert(0); /* XDTLS: want to see if we ever get here */ - return ssl3_write_pending(s, type, buf, len); - } + /* ssl3_write_pending drops the write if |BIO_write| fails in DTLS, so there + * is never pending data. */ + assert(s->s3->wbuf.left == 0); /* If we have an alert to send, lets send it */ if (s->s3->alert_dispatch) { diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c index dcd26c28..436e8300 100644 --- a/ssl/s3_pkt.c +++ b/ssl/s3_pkt.c @@ -686,6 +686,8 @@ int ssl3_write_pending(SSL *s, int type, const uint8_t *buf, unsigned int len) { } return i; } + /* TODO(davidben): This codepath is used in DTLS, but the write + * payload may not split across packets. */ wb->offset += i; wb->left -= i; } |