]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
rustls: fix comment describing cr_recv()
authorStefan Eissing <stefan@eissing.org>
Thu, 25 Sep 2025 10:59:36 +0000 (12:59 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 25 Sep 2025 12:14:02 +0000 (14:14 +0200)
The comments on `cf_recv()` function were outdated and described
calling conventions that no longer are true.

Reported in Joshua's sarif data

Closes #18728

lib/vtls/rustls.c

index e081c4651ac8594a5cd8e6b509ba7cc79df64d06..a6d8a4652d8811de9eca2265edcf83b92e3177f1 100644 (file)
@@ -188,16 +188,8 @@ static ssize_t tls_recv_more(struct Curl_cfilter *cf,
 }
 
 /*
- * On each run:
- *  - Read a chunk of bytes from the socket into Rustls' TLS input buffer.
- *  - Tell Rustls to process any new packets.
- *  - Read out as many plaintext bytes from Rustls as possible, until hitting
- *    error, EOF, or EAGAIN/EWOULDBLOCK, or plainbuf/plainlen is filled up.
- *
- * it is okay to call this function with plainbuf == NULL and plainlen == 0. In
- * that case, it will copy bytes from the socket into Rustls' TLS input
- * buffer, and process packets, but will not consume bytes from Rustls'
- * plaintext output buffer.
+ * Filter receive method implementation. `plainbuf` and `plainlen`
+ * are always not NULL/0.
  */
 static CURLcode
 cr_recv(struct Curl_cfilter *cf, struct Curl_easy *data,