Skip to content

Commit

Permalink
crypto/tls: TLS 1.3: Send alert on invalid ECDH share (#126)
Browse files Browse the repository at this point in the history
Fixes a regression caused by recent integration of Kyber.
  • Loading branch information
bwesterb committed Sep 7, 2022
1 parent 210ad3a commit ca3fe71
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/crypto/tls/handshake_client_tls13.go
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,9 @@ func (hs *clientHandshakeStateTLS13) establishHandshakeKeys() error {
c.sendAlert(alertIllegalParameter)
return fmt.Errorf("%s decaps: %w", sk.Scheme().Name(), err)
}
} else {
}

if sharedKey == nil {
c.sendAlert(alertIllegalParameter)
return fmt.Errorf("tls: invalid server key share")
}
Expand Down

0 comments on commit ca3fe71

Please sign in to comment.