Skip to content

Commit

Permalink
Send illegal_parameter alert on illegal group
Browse files Browse the repository at this point in the history
We had a specific error for this eventuality, but didn't
send an alert for it.
  • Loading branch information
ctz authored and djc committed Oct 3, 2024
1 parent d752eb2 commit 7bf82dc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rustls/src/client/tls12.rs
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,10 @@ impl State<ClientConnectionData> for ExpectServerDone<'_> {
let skxg = match maybe_skxg {
Some(skxg) => skxg,
None => {
return Err(PeerMisbehaved::SelectedUnofferedKxGroup.into());
return Err(cx.common.send_fatal_alert(
AlertDescription::IllegalParameter,
PeerMisbehaved::SelectedUnofferedKxGroup,
));
}
};
cx.common.kx_state = KxState::Start(skxg);
Expand Down

0 comments on commit 7bf82dc

Please sign in to comment.