Use certificate_request specific to TLS 1.3

This commit is contained in:
Henry Case 2018-03-26 16:08:18 +01:00 committed by Henry Dorsett Case
parent c6745f1879
commit 6acee69d6b

View File

@ -1152,9 +1152,13 @@ func (c *Conn) readHandshake() (interface{}, error) {
m = new(certificateMsg) m = new(certificateMsg)
} }
case typeCertificateRequest: case typeCertificateRequest:
if c.vers >= VersionTLS13 {
m = new(certificateRequestMsg13)
} else {
m = &certificateRequestMsg{ m = &certificateRequestMsg{
hasSignatureAndHash: c.vers >= VersionTLS12, hasSignatureAndHash: c.vers >= VersionTLS12,
} }
}
case typeCertificateStatus: case typeCertificateStatus:
m = new(certificateStatusMsg) m = new(certificateStatusMsg)
case typeServerKeyExchange: case typeServerKeyExchange: