Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from #21565)
  • Loading branch information
hlandau committed Aug 10, 2023
1 parent 89b0948 commit f260900
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
1 change: 1 addition & 0 deletions ssl/quic/quic_channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
6 changes: 2 additions & 4 deletions ssl/quic/quic_tserver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions test/quic_multistream_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down
8 changes: 4 additions & 4 deletions test/recipes/75-test_quicapi_data/ssltraceref.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f260900

Please sign in to comment.