Skip to content

Commit

Permalink
Fixed KeySharesParams reset on subsequent ApplyPreset calls
Browse files Browse the repository at this point in the history
  • Loading branch information
adotkhan committed Nov 7, 2024
1 parent 443a34d commit b5539d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion u_parrots.go
Original file line number Diff line number Diff line change
Expand Up @@ -2636,7 +2636,9 @@ func (uconn *UConn) ApplyPreset(p *ClientHelloSpec) error {
} else if kemKey, ok := clientKeySharePrivate.(*kemPrivateKey); ok {
uconn.HandshakeState.State13.KEMKey = kemKey.ToPublic()
}
uconn.HandshakeState.State13.KeySharesParams = NewKeySharesParameters()
if uconn.HandshakeState.State13.KeySharesParams == nil {
uconn.HandshakeState.State13.KeySharesParams = NewKeySharesParameters()
}
hello := uconn.HandshakeState.Hello

switch len(hello.Random) {
Expand Down

0 comments on commit b5539d8

Please sign in to comment.