tris: process ALPN in EE received by client
This commit is contained in:
parent
0b636d21fb
commit
e9ff50fcb0
13
13.go
13
13.go
@ -744,6 +744,15 @@ func (hs *clientHandshakeState) processCertsFromServer13(certMsg *certificateMsg
|
||||
return hs.processCertsFromServer(certs)
|
||||
}
|
||||
|
||||
func (hs *clientHandshakeState) processEncryptedExtensions(ee *encryptedExtensionsMsg) error {
|
||||
c := hs.c
|
||||
if ee.alpnProtocol != "" {
|
||||
c.clientProtocol = ee.alpnProtocol
|
||||
c.clientProtocolFallback = false
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (hs *clientHandshakeState) verifyPeerCertificate(certVerify *certificateVerifyMsg) error {
|
||||
pub := hs.c.peerCertificates[0].PublicKey
|
||||
_, sigType, hashFunc, err := pickSignatureAlgorithm(pub, []SignatureScheme{certVerify.signatureAlgorithm}, hs.hello.supportedSignatureAlgorithms, hs.c.vers)
|
||||
@ -805,8 +814,10 @@ func (hs *clientHandshakeState) doTLS13Handshake() error {
|
||||
c.sendAlert(alertUnexpectedMessage)
|
||||
return unexpectedMessageError(encryptedExtensions, msg)
|
||||
}
|
||||
if err := hs.processEncryptedExtensions(encryptedExtensions); err != nil {
|
||||
return err
|
||||
}
|
||||
hs.keySchedule.write(encryptedExtensions.marshal())
|
||||
// TODO process encryptedExtensions
|
||||
|
||||
// PSKs are not supported, so receive Certificate message.
|
||||
msg, err = c.readHandshake()
|
||||
|
Loading…
Reference in New Issue
Block a user