leaf returns the parsed leaf certificate, either from c.Leaf or by parsing the corresponding c.Certificate[0].
()
| 1368 | // leaf returns the parsed leaf certificate, either from c.Leaf or by parsing |
| 1369 | // the corresponding c.Certificate[0]. |
| 1370 | func (c *Certificate) leaf() (*x509.Certificate, error) { |
| 1371 | if c.Leaf != nil { |
| 1372 | return c.Leaf, nil |
| 1373 | } |
| 1374 | return x509.ParseCertificate(c.Certificate[0]) |
| 1375 | } |
| 1376 | |
| 1377 | type handshakeMessage interface { |
| 1378 | marshal() []byte |
no outgoing calls
no test coverage detected