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

Method leaf

common.go:1613–1618  ·  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

1611// leaf returns the parsed leaf certificate, either from c.Leaf or by parsing
1612// the corresponding c.Certificate[0].
1613func (c *Certificate) leaf() (*x509.Certificate, error) {
1614 if c.Leaf != nil {
1615 return c.Leaf, nil
1616 }
1617 return x509.ParseCertificate(c.Certificate[0])
1618}
1619
1620type handshakeMessage interface {
1621 marshal() ([]byte, error)

Callers 2

SupportsCertificateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected