crt

package
v0.0.0-...-daf41ac Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: MIT Imports: 13 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 {
	X509Cert *x509.Certificate
	Link     string // self Link to crt (if any)
}

func LoadCertFromBytes

func LoadCertFromBytes(content []byte, uri string) ([]*Certificate, error)

func LoadCertFromBytesDer

func LoadCertFromBytesDer(content []byte, uri string) ([]*Certificate, error)

func LoadCertFromBytesPem

func LoadCertFromBytesPem(content []byte, uri string) ([]*Certificate, error)

func LoadCertFromBytesPkcs7

func LoadCertFromBytesPkcs7(content []byte, uri string) ([]*Certificate, error)

func LoadCertFromPath

func LoadCertFromPath(path string) ([]*Certificate, error)

func NewCertificate

func NewCertificate(content []byte, uri string) ([]*Certificate, error)
func (c *Certificate) GetCrlLinks() []string
func (c *Certificate) GetDeltaCRLLink() string

func (*Certificate) GetExtKeyUsage

func (c *Certificate) GetExtKeyUsage() []string

func (*Certificate) GetIssuer

func (c *Certificate) GetIssuer() pkix.Name

func (*Certificate) GetKeyUsage

func (c *Certificate) GetKeyUsage() []string

func (*Certificate) GetNotAfter

func (c *Certificate) GetNotAfter() time.Time

func (*Certificate) GetNotBefore

func (c *Certificate) GetNotBefore() time.Time
func (c *Certificate) GetParentLinks() []string

func (*Certificate) GetSerialNumber

func (c *Certificate) GetSerialNumber() *big.Int

func (*Certificate) GetSha256

func (c *Certificate) GetSha256() string

func (*Certificate) GetSubject

func (c *Certificate) GetSubject() pkix.Name

func (*Certificate) IsRoot

func (c *Certificate) IsRoot() bool

func (*Certificate) Verify

func (c *Certificate) Verify(intermediates *x509.CertPool, roots *x509.CertPool, keyUsages []x509.ExtKeyUsage) error

type Type

type Type int

Jump to

Keyboard shortcuts

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