Lines Matching refs:Certificate
24 // at least one certificate.
57 // at least one certificate.
68 // at least one certificate.
170 func LoadX509KeyPair(certFile, keyFile string) (Certificate, error) {
173 return Certificate{}, err
177 return Certificate{}, err
184 func X509KeyPair(certPEMBlock, keyPEMBlock []byte) (Certificate, error) {
185 var cert Certificate
187 fail := func(err error) (Certificate, error) { return Certificate{}, err }
193 if certDERBlock.Type == "CERTIFICATE" {
194 cert.Certificate = append(cert.Certificate, certDERBlock.Bytes)
198 if len(cert.Certificate) == 0 {
199 return fail(errors.New("crypto/tls: failed to parse certificate PEM data"))
221 x509Cert, err := x509.ParseCertificate(cert.Certificate[0])