certificate

package
v0.0.0-...-85e540a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL