x509

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package x509 provides X509 certificate methods.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertKey

type CertKey struct {
	// contains filtered or unexported fields
}

CertKey represents a X509 certificate and key.

func NewCertKey

func NewCertKey(cert, key []byte) (*CertKey, error)

NewCertKey returns a new certificate and key instance.

func (*CertKey) Cert

func (ck *CertKey) Cert() []byte

Cert returns the certificate.

func (*CertKey) CertBlocks

func (ck *CertKey) CertBlocks() []*pem.Block

CertBlocks returns the PEM blocks of the certificate.

func (*CertKey) Equal

func (ck *CertKey) Equal(cert, key []byte) bool

Equal returns true if the certificate and key equals the instance data, false otherwise.

func (*CertKey) Key

func (ck *CertKey) Key() []byte

Key returns the key.

func (*CertKey) Signer

func (ck *CertKey) Signer() (crypto.Signer, error)

Signer returns the cryptographic signer of the key.

func (*CertKey) String

func (ck *CertKey) String() string

func (*CertKey) Validate

func (ck *CertKey) Validate(t time.Time) error

Validate validates the certificate (currently validity period only).

type ValidationError

type ValidationError struct {
	// contains filtered or unexported fields
}

ValidationError is returned in case of X09 certificate validation errors.

func (ValidationError) Error

func (e ValidationError) Error() string

Jump to

Keyboard shortcuts

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