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,8 +1152,12 @@ func (c *Conn) readHandshake() (interface{}, error) {
m = new(certificateMsg) m = new(certificateMsg)
} }
case typeCertificateRequest: case typeCertificateRequest:
m = &certificateRequestMsg{ if c.vers >= VersionTLS13 {
hasSignatureAndHash: c.vers >= VersionTLS12, m = new(certificateRequestMsg13)
} else {
m = &certificateRequestMsg{
hasSignatureAndHash: c.vers >= VersionTLS12,
}
} }
case typeCertificateStatus: case typeCertificateStatus:
m = new(certificateStatusMsg) m = new(certificateStatusMsg)