]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix comment in do_dtls1_write()
authorBenjamin Kaduk <bkaduk@akamai.com>
Sun, 29 Nov 2020 01:11:46 +0000 (17:11 -0800)
committerBenjamin Kaduk <kaduk@mit.edu>
Wed, 2 Dec 2020 23:35:34 +0000 (15:35 -0800)
This code started off as a copy of ssl3_write_bytes(), and the comment
was not updated with the implementation.

Reported by yangyangtiantianlonglong in #13518

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13566)

(cherry picked from commit 70cae332a2c200087605f94cdccfee80c9380fbf)

ssl/record/rec_layer_d1.c

index 73ca8a6ee4b97349ebd631ce1169fda74e45783c..7e22270485bd1d7eaec779571940c9624df6a7a5 100644 (file)
@@ -808,8 +808,8 @@ int do_dtls1_write(SSL *s, int type, const unsigned char *buf,
     wb = &s->rlayer.wbuf[0];
 
     /*
-     * first check if there is a SSL3_BUFFER still being written out.  This
-     * will happen with non blocking IO
+     * DTLS writes whole datagrams, so there can't be anything left in
+     * the buffer.
      */
     if (!ossl_assert(SSL3_BUFFER_get_left(wb) == 0)) {
         SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_DO_DTLS1_WRITE,