]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Minor fixes
authorHugo Landau <hlandau@openssl.org>
Wed, 9 Aug 2023 07:36:38 +0000 (08:36 +0100)
committerHugo Landau <hlandau@openssl.org>
Thu, 10 Aug 2023 17:19:51 +0000 (18:19 +0100)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21565)

ssl/quic/quic_channel.c
ssl/quic/quic_tserver.c
test/quic_multistream_test.c
test/recipes/75-test_quicapi_data/ssltraceref.txt

index 6549618816e3999784f6e5221e1e17b99d1dfe76..f12dfd504931aea79f999215f595bc3a4731fa94 100644 (file)
@@ -3006,6 +3006,7 @@ void ossl_quic_channel_raise_protocol_error_loc(QUIC_CHANNEL *ch,
     tcause.error_code = error_code;
     tcause.frame_type = frame_type;
     tcause.reason     = reason;
+    tcause.reason_len = strlen(reason);
 
     ch_start_terminating(ch, &tcause, 0);
 }
index efdc6c4b8b84008ffc6a7e24a7b27914df751b5b..791905d2edbbf93458dfeecb8c270a1ae0bb04ef 100644 (file)
@@ -309,10 +309,8 @@ int ossl_quic_tserver_has_read_ended(QUIC_TSERVER *srv, uint64_t stream_id)
         /* If we have a FIN awaiting retirement and no data before it... */
         /* Let RSTREAM know we've consumed this FIN. */
         if (!ossl_quic_rstream_read(qs->rstream, buf, sizeof(buf),
-                                    &bytes_read, &is_fin)) {
-            bytes_read  = 0;
-            is_fin      = 0;
-        }
+                                    &bytes_read, &is_fin))
+            return 0;
 
         assert(is_fin && bytes_read == 0);
         assert(qs->recv_state == QUIC_RSTREAM_STATE_DATA_RECVD);
index 9936351884881473d52b38d4e33215ea62fdec56..31737e89a29a8188ba914785d7420ccd1f3461a6 100644 (file)
@@ -2901,7 +2901,7 @@ static int script_39_inject_plain(struct helper *h, QUIC_PKT_HDR *hdr,
         retire_prior_to = 1;
         break;
     case 4:
-        /* Cheese it by using our actual CID so we don't break connectivity. */
+        /* Use our actual CID so we don't break connectivity. */
         ossl_quic_channel_get_diag_local_cid(ch, &new_cid);
 
         seq_no          = 2;
@@ -3502,7 +3502,7 @@ static const struct script_op script_50[] = {
     OP_END
 };
 
-/* 51. Fault injection - PATH_CHALLENGE is ignored */
+/* 51. Fault injection - PATH_RESPONSE is ignored */
 static const struct script_op script_51[] = {
     OP_S_SET_INJECT_PLAIN   (script_41_inject_plain)
     OP_C_SET_ALPN           ("ossltest")
@@ -3751,7 +3751,7 @@ static const struct script_op script_56[] = {
     OP_END
 };
 
-/* 57. Fault injection - NEW_CONN_ID with lower seq no ignored */
+/* 57. Fault injection - NEW_CONN_ID with lower seq so ignored */
 static const struct script_op script_57[] = {
     OP_S_SET_INJECT_PLAIN   (script_39_inject_plain)
     OP_C_SET_ALPN           ("ossltest")
index e1510ccd87a9f7fd04ef45c4a2473439504108aa..bbb0ae6b3b47a7ee21605e82a47a92b02b36e430 100644 (file)
@@ -16,8 +16,8 @@ Header:
       extensions, length = 209
         extension_type=UNKNOWN(57), length=49
           0000 - 0c 00 0f 00 01 04 80 00-75 30 03 02 44 b0 0e   ........u0..D..
-          000f - 01 02 04 04 80 20 00 00-05 04 80 20 00 00 06   ..... ..... ...
-          001e - 04 80 20 00 00 07 04 80-20 00 00 08 02 40 64   .. ..... ....@d
+          000f - 01 02 04 04 80 0c 00 00-05 04 80 08 00 00 06   ...............
+          001e - 04 80 08 00 00 07 04 80-08 00 00 08 02 40 64   .............@d
           002d - 09 02 40 64                                    ..@d
         extension_type=ec_point_formats(11), length=4
           uncompressed (0)
@@ -139,8 +139,8 @@ Header:
         extension_type=UNKNOWN(57), length=67
           0000 - 0c 00 00 08 ?? ?? ?? ??-?? ?? ?? ?? 0f 08 ??   ....????????..?
           000f - ?? ?? ?? ?? ?? ?? ?? 01-04 80 00 75 30 03 02   ???????....u0..
-          001e - 44 b0 0e 01 02 04 04 80-20 00 00 05 04 80 20   D....... ..... 
-          002d - 00 00 06 04 80 20 00 00-07 04 80 20 00 00 08   ..... ..... ...
+          001e - 44 b0 0e 01 02 04 04 80-0c 00 00 05 04 80 08   D..............
+          002d - 00 00 06 04 80 08 00 00-07 04 80 08 00 00 08   ...............
           003c - 02 40 64 09 02 40 64                           .@d..@d
         extension_type=application_layer_protocol_negotiation(16), length=11
           ossltest