A Certificate is a chain of one or more certificates, leaf first.
| 1587 | |
| 1588 | // A Certificate is a chain of one or more certificates, leaf first. |
| 1589 | type Certificate struct { |
| 1590 | Certificate [][]byte |
| 1591 | // PrivateKey contains the private key corresponding to the public key in |
| 1592 | // Leaf. This must implement crypto.Signer with an RSA, ECDSA or Ed25519 PublicKey. |
| 1593 | // For a server up to TLS 1.2, it can also implement crypto.Decrypter with |
| 1594 | // an RSA PublicKey. |
| 1595 | PrivateKey crypto.PrivateKey |
| 1596 | // SupportedSignatureAlgorithms is an optional list restricting what |
| 1597 | // signature algorithms the PrivateKey can be used for. |
| 1598 | SupportedSignatureAlgorithms []SignatureScheme |
| 1599 | // OCSPStaple contains an optional OCSP response which will be served |
| 1600 | // to clients that request it. |
| 1601 | OCSPStaple []byte |
| 1602 | // SignedCertificateTimestamps contains an optional list of Signed |
| 1603 | // Certificate Timestamps which will be served to clients that request it. |
| 1604 | SignedCertificateTimestamps [][]byte |
| 1605 | // Leaf is the parsed form of the leaf certificate, which may be initialized |
| 1606 | // using x509.ParseCertificate to reduce per-handshake processing. If nil, |
| 1607 | // the leaf certificate will be parsed as needed. |
| 1608 | Leaf *x509.Certificate |
| 1609 | } |
| 1610 | |
| 1611 | // leaf returns the parsed leaf certificate, either from c.Leaf or by parsing |
| 1612 | // the corresponding c.Certificate[0]. |
nothing calls this directly
no outgoing calls
no test coverage detected