Minor fixes
authorHugo Landau <hlandau@openssl.org>
Wed, 30 Aug 2023 16:00:16 +0000 (17:00 +0100)
committerHugo Landau <hlandau@openssl.org>
Fri, 1 Sep 2023 09:45:36 +0000 (10:45 +0100)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21715)

crypto/bio/bss_dgram_pair.c
doc/designs/ddd/REPORT.md
doc/designs/ddd/ddd-05-mem-nonblocking.c
ssl/quic/quic_impl.c

index a93b14154cac98f10de78fbc6eba4ecbfe5ba593..3d7987833692b6ec28695b66c69ce600d6feec50 100644 (file)
@@ -695,7 +695,7 @@ static long dgram_mem_ctrl(BIO *bio, int cmd, long num, void *ptr)
 
     /* BIO_dgram_get_local_addr_enable */
     case BIO_CTRL_DGRAM_GET_LOCAL_ADDR_ENABLE: /* Non-threadsafe */
-        *(int *)ptr = (long)dgram_pair_ctrl_get_local_addr_enable(bio);
+        *(int *)ptr = (int)dgram_pair_ctrl_get_local_addr_enable(bio);
         break;
 
     /* BIO_dgram_set_local_addr_enable */
index ce742507cee8c95886d3c1e68877ce73b25b3917..195e834899cfffc3758c33074780254acbac400e 100644 (file)
@@ -151,7 +151,7 @@ The originally planned changes to enable applications for QUIC amounted to:
 - A change to how the `POLLIN`/`POLLOUT`/`POLLERR` flags to pass to poll(2)
   need to be determined.
 
-  Note that this is a subtantially smaller list of changes than for
+  Note that this is a substantially smaller list of changes than for
   ddd-02-conn-nonblocking.
 
 ### Actual changes
index 821e3fecba7a23b2c2d0a60f31b6417bccaa12aa..abf6c3c4969ed3f6f86a63c9d61b8c71c619938e 100644 (file)
@@ -189,9 +189,9 @@ int rx(APP_CONN *conn, void *buf, int buf_len)
 
 /*
  * Called to get data which has been enqueued for transmission to the network
- * by OpenSSL. For QUIC, this always outputs a single frame.
+ * by OpenSSL. For QUIC, this always outputs a single datagram.
  *
- * IMPORTANT (QUIC): If buf_len is inadequate to hold the frame, it is truncated
+ * IMPORTANT (QUIC): If buf_len is inadequate to hold the datagram, it is truncated
  * (similar to read(2)). A buffer size of at least 1472 must be used by default
  * to guarantee this does not occur.
  */
@@ -203,7 +203,7 @@ int read_net_tx(APP_CONN *conn, void *buf, int buf_len)
 /*
  * Called to feed data which has been received from the network to OpenSSL.
  *
- * QUIC: buf must contain the entirety of a single frame. It will be consumed
+ * QUIC: buf must contain the entirety of a single datagram. It will be consumed
  * entirely (return value == buf_len) or not at all.
  */
 int write_net_rx(APP_CONN *conn, const void *buf, int buf_len)
index 11c8afce8acb143d1f6c1ab6d230651b8733d47a..bf1c412a091682c4cc9c7e53e52e9b5382acd09b 100644 (file)
@@ -1607,7 +1607,7 @@ static int quic_do_handshake(QCTX *ctx)
      * Start connection process. Note we may come here multiple times in
      * non-blocking mode, which is fine.
      */
-    if (!ensure_channel_started(qc)) /* raises on failure */
+    if (!ensure_channel_started(ctx)) /* raises on failure */
         return -1; /* Non-protocol error */
 
     if (ossl_quic_channel_is_handshake_complete(qc->ch))