Skip to content

Commit

Permalink
TLS KeyUpdate messages are not allowed in QUIC
Browse files Browse the repository at this point in the history
We already disallowed the sending of TLS KeyUpdate messages. We also treat
the receipt of a TLS KeyUpdate message as an unexpected message.

RFC 9001 section 6:
Endpoints MUST treat the receipt of a TLS KeyUpdate message as a connection
error of type 0x010a, equivalent to a fatal TLS alert of unexpected_message;
see Section 4.8.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #21686)
  • Loading branch information
mattcaswell committed Aug 15, 2023
1 parent 04c7fb5 commit 50a0af2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ssl/statem/statem_clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ static int ossl_statem_client13_read_transition(SSL_CONNECTION *s, int mt)
st->hand_state = TLS_ST_CR_SESSION_TICKET;
return 1;
}
if (mt == SSL3_MT_KEY_UPDATE) {
if (mt == SSL3_MT_KEY_UPDATE && !SSL_IS_QUIC_HANDSHAKE(s)) {
st->hand_state = TLS_ST_CR_KEY_UPDATE;
return 1;
}
Expand Down
2 changes: 1 addition & 1 deletion ssl/statem/statem_srvr.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ static int ossl_statem_server13_read_transition(SSL_CONNECTION *s, int mt)
#endif
}

if (mt == SSL3_MT_KEY_UPDATE) {
if (mt == SSL3_MT_KEY_UPDATE && !SSL_IS_QUIC_HANDSHAKE(s)) {
st->hand_state = TLS_ST_SR_KEY_UPDATE;
return 1;
}
Expand Down

0 comments on commit 50a0af2

Please sign in to comment.