x509

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmailAddressOID asn1.ObjectIdentifier = []int{1, 2, 840, 113549, 1, 9, 1}

EmailAddressOID defined by https://oidref.com/1.2.840.113549.1.9.1

Functions

func CertChainToPEM added in v0.2.0

func CertChainToPEM(certChain []*x509.Certificate) ([]byte, error)

func ParseTimestampCertChain added in v0.2.0

func ParseTimestampCertChain(pemBytes []byte) ([]*x509.Certificate, error)

Types

type PublicKey

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

PublicKey Public Key that follows the x509 standard

func NewPublicKey

func NewPublicKey(r io.Reader) (*PublicKey, error)

NewPublicKey implements the pki.PublicKey interface

func (PublicKey) CanonicalValue

func (k PublicKey) CanonicalValue() (encoded []byte, err error)

CanonicalValue implements the pki.PublicKey interface

func (PublicKey) CryptoPubKey added in v0.3.0

func (k PublicKey) CryptoPubKey() crypto.PublicKey

func (PublicKey) EmailAddresses added in v0.2.0

func (k PublicKey) EmailAddresses() []string

EmailAddresses implements the pki.PublicKey interface

type Signature

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

func NewSignature

func NewSignature(r io.Reader) (*Signature, error)

NewSignature creates and validates an x509 signature object

func (Signature) CanonicalValue

func (s Signature) CanonicalValue() ([]byte, error)

CanonicalValue implements the pki.Signature interface

func (Signature) Verify

func (s Signature) Verify(r io.Reader, k interface{}, opts ...sigsig.VerifyOption) error

Verify implements the pki.Signature interface

Jump to

Keyboard shortcuts

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