Lines Matching refs:Certificate
126 // certificate, which would be skipped if session resumption occurred.
315 certs := make([]*x509.Certificate, len(certMsg.certificates))
320 return errors.New("tls: failed to parse certificate from server: " + err.Error())
358 return fmt.Errorf("tls: server's certificate contains an unsupported type of public key: %T", certs[0].PublicKey)
364 // server's identity (i.e. leaf certificate) is unchanged and
382 // RFC4366 on Certificate Status Request:
422 var chainToSend *Certificate
447 // If the server requested a certificate then we have to send a
448 // Certificate message, even if it's empty because we don't have a
449 // certificate to send.
452 certMsg.certificates = chainToSend.Certificate
471 if chainToSend != nil && len(chainToSend.Certificate) > 0 {
479 return fmt.Errorf("tls: client certificate private key of type %T does not implement crypto.Signer", chainToSend.PrivateKey)
490 return fmt.Errorf("tls: failed to sign handshake with client certificate: unknown client certificate key type: %T", key)
719 // a TLS <= 1.1 connection, based on the supported certificate types.
731 func (hs *clientHandshakeState) getCertificate(certReq *certificateRequestMsg) (*Certificate, error) {
749 // included in the certificate request message. In this
751 // certificate types.
770 // distinguished names of acceptable certificate authorities.
776 // send any certificate of the appropriate
789 for j, cert := range chain.Certificate {
791 // parse the certificate if this isn't the leaf
797 return nil, errors.New("tls: failed to parse client certificate #" + strconv.Itoa(i) + ": " + err.Error())
822 // No acceptable certificate found. Don't send a certificate.
823 return new(Certificate), nil