Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Certificate ¶
type Certificate struct {
// contains filtered or unexported fields
}
Certificate represents a loaded X509 certificate.
func FromBase64 ¶
func FromBase64(data string) (*Certificate, error)
FromBase64 loads an X509 certificate from a base64 encoded string.
func FromBytes ¶
func FromBytes(data []byte) (*Certificate, error)
FromBytes loads an X509 certificate from PEM data.
func FromFile ¶
func FromFile(file string) (*Certificate, error)
FromFile loads an X509 certificate from a PEM file.
func (*Certificate) Bytes ¶
func (c *Certificate) Bytes() []byte
Bytes returns the bytes of the X509 certificate.
func (*Certificate) Certificate ¶
func (c *Certificate) Certificate() *x509.Certificate
Certificate returns the X509 certificate.
func (*Certificate) Hash ¶
func (c *Certificate) Hash() []byte
Hash returns a SHA256 hash over the bytes of the X509 certificate.
func (*Certificate) ToBase64 ¶
func (c *Certificate) ToBase64() string
ToBase64 saves the X509 certificate to a base64 encoded string.
Click to show internal directories.
Click to hide internal directories.