MCPcopy Create free account
hub / github.com/XTLS/Go / leaf

Method leaf

common.go:1370–1375  ·  view source on GitHub ↗

leaf returns the parsed leaf certificate, either from c.Leaf or by parsing the corresponding c.Certificate[0].

()

Source from the content-addressed store, hash-verified

1368// leaf returns the parsed leaf certificate, either from c.Leaf or by parsing
1369// the corresponding c.Certificate[0].
1370func (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
1377type handshakeMessage interface {
1378 marshal() []byte

Callers 2

SupportsCertificateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected