cert

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCertExpired = errors.New("invalid certificate - certificate is expired")
View Source
var ErrCertGenTimeIsFuture = errors.New("invalid certificate - certificate's generated time is not past time")
View Source
var ErrCertRevoked = errors.New("invalid certificate - revoked certificate")
View Source
var ErrNoRootCertInPath = errors.New("no root certificate in certificate directory path")

Functions

func DERCertToPem

func DERCertToPem(derBytes []byte) []byte

DERCertToPem converts DER formatted certificate to PEM format.

func DERToX509Cert

func DERToX509Cert(derBytes []byte) (cert *x509.Certificate, err error)

DERToX509Cert converts DER formatted certificate to x.509 certificate.

func Load

func Load(keyId heimdall.KeyID, certDirPath string) (cert *x509.Certificate, err error)

LoadCert loads a certificate by entered key ID.

func PemToX509Cert

func PemToX509Cert(certPEMBlock []byte) (cert *x509.Certificate, err error)

PemToX509Cert converts PEM formatted certificate to x.509 certificate format.

func Store

func Store(cert *x509.Certificate, certDirPath string) error

StoreCert stores a certificate to certificate store directory.

func Verify

func Verify(cert *x509.Certificate) error

VerifyCert verifies a certificate's validity.

func VerifyChain

func VerifyChain(cert *x509.Certificate, certDirPath string) error

VerifyCertChain verifies a certificate from local certificates in certificate store directory.

func X509CertToDER

func X509CertToDER(cert *x509.Certificate) []byte

X509CertToDER converts x.509 certificate to DER format.

func X509CertToPem

func X509CertToPem(cert *x509.Certificate) []byte

X509CertToPem converts x.509 certificate format to PEM format.

Types

This section is empty.

Jump to

Keyboard shortcuts

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