From: Hugo Landau Date: Wed, 9 Aug 2023 07:36:38 +0000 (+0100) Subject: Minor fixes X-Git-Tag: openssl-3.2.0-alpha1~226 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2609004df4d91a365338e11d04ff67589f2d3e3;p=thirdparty%2Fopenssl.git Minor fixes Reviewed-by: Tomas Mraz Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/21565) --- diff --git a/ssl/quic/quic_channel.c b/ssl/quic/quic_channel.c index 6549618816e..f12dfd50493 100644 --- a/ssl/quic/quic_channel.c +++ b/ssl/quic/quic_channel.c @@ -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); } diff --git a/ssl/quic/quic_tserver.c b/ssl/quic/quic_tserver.c index efdc6c4b8b8..791905d2edb 100644 --- a/ssl/quic/quic_tserver.c +++ b/ssl/quic/quic_tserver.c @@ -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); diff --git a/test/quic_multistream_test.c b/test/quic_multistream_test.c index 99363518848..31737e89a29 100644 --- a/test/quic_multistream_test.c +++ b/test/quic_multistream_test.c @@ -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") diff --git a/test/recipes/75-test_quicapi_data/ssltraceref.txt b/test/recipes/75-test_quicapi_data/ssltraceref.txt index e1510ccd87a..bbb0ae6b3b4 100644 --- a/test/recipes/75-test_quicapi_data/ssltraceref.txt +++ b/test/recipes/75-test_quicapi_data/ssltraceref.txt @@ -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