Documentation ¶
Index ¶
- Variables
- func DERCertToPem(derBytes []byte) []byte
- func DERToX509Cert(derBytes []byte) (cert *x509.Certificate, err error)
- func Load(keyId heimdall.KeyID, certDirPath string) (cert *x509.Certificate, err error)
- func PemToX509Cert(certPEMBlock []byte) (cert *x509.Certificate, err error)
- func Store(cert *x509.Certificate, certDirPath string) error
- func Verify(cert *x509.Certificate) error
- func VerifyChain(cert *x509.Certificate, certDirPath string) error
- func X509CertToDER(cert *x509.Certificate) []byte
- func X509CertToPem(cert *x509.Certificate) []byte
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 ¶
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 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.
Click to show internal directories.
Click to hide internal directories.