crypto/tls: check that client cipher suite matches version
Bu işleme şunda yer alıyor:
ebeveyn
998f77009e
işleme
857c7243c9
@ -186,6 +186,12 @@ NextCipherSuite:
|
||||
c.sendAlert(alertHandshakeFailure)
|
||||
return errors.New("tls: server chose an unconfigured cipher suite")
|
||||
}
|
||||
// Check that the chosen cipher suite matches the protocol version.
|
||||
if c.vers >= VersionTLS13 && suite.flags&suiteTLS13 == 0 ||
|
||||
c.vers < VersionTLS13 && suite.flags&suiteTLS13 != 0 {
|
||||
c.sendAlert(alertHandshakeFailure)
|
||||
return errors.New("tls: server chose an inappropriate cipher suite")
|
||||
}
|
||||
|
||||
hs := &clientHandshakeState{
|
||||
c: c,
|
||||
|
Yükleniyor…
Yeni konuda referans
Bir kullanıcı engelle