pki

package
v0.0.0-...-474d2f3 Latest Latest
Warning

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

Go to latest
Published: May 17, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnmarshalBlock

func UnmarshalBlock(s string) (*pem.Block, error)

Types

type Bundle

type Bundle struct {
	Name string
	Cert Certificate
	Key  PrivateKey
}

type Certificate

type Certificate struct {
	*x509.Certificate
}

func (Certificate) Marshal

func (c Certificate) Marshal() MarshaledCertificate

func (Certificate) MarshalJSON

func (c Certificate) MarshalJSON() ([]byte, error)

func (Certificate) MarshalText

func (c Certificate) MarshalText() ([]byte, error)

func (Certificate) MarshalXML

func (c Certificate) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (Certificate) MarshalYAML

func (c Certificate) MarshalYAML() (interface{}, error)

func (*Certificate) Unmarshal

func (c *Certificate) Unmarshal(mc MarshaledCertificate) error

func (*Certificate) UnmarshalJSON

func (c *Certificate) UnmarshalJSON(data []byte) error

func (*Certificate) UnmarshalText

func (c *Certificate) UnmarshalText(text []byte) error

func (*Certificate) UnmarshalXML

func (c *Certificate) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

func (*Certificate) UnmarshalYAML

func (c *Certificate) UnmarshalYAML(unmarshal func(interface{}) error) error

type ExtKeyUsage

type ExtKeyUsage []x509.ExtKeyUsage

func (ExtKeyUsage) Marshal

func (u ExtKeyUsage) Marshal() []string

func (ExtKeyUsage) MarshalJSON

func (u ExtKeyUsage) MarshalJSON() ([]byte, error)

func (ExtKeyUsage) MarshalText

func (u ExtKeyUsage) MarshalText() ([]byte, error)

func (ExtKeyUsage) MarshalYAML

func (u ExtKeyUsage) MarshalYAML() (interface{}, error)

func (ExtKeyUsage) String

func (u ExtKeyUsage) String() string

func (*ExtKeyUsage) Unmarshal

func (u *ExtKeyUsage) Unmarshal(usage []string) error

func (*ExtKeyUsage) UnmarshalJSON

func (u *ExtKeyUsage) UnmarshalJSON(data []byte) error

func (*ExtKeyUsage) UnmarshalText

func (u *ExtKeyUsage) UnmarshalText(text []byte) error

func (*ExtKeyUsage) UnmarshalYAML

func (u *ExtKeyUsage) UnmarshalYAML(unmarshal func(interface{}) error) error

type KeyUsage

type KeyUsage x509.KeyUsage

func (KeyUsage) MarshalText

func (u KeyUsage) MarshalText() ([]byte, error)

func (KeyUsage) String

func (u KeyUsage) String() string

func (*KeyUsage) UnmarshalText

func (u *KeyUsage) UnmarshalText(text []byte) error

type MarshaledCertificate

type MarshaledCertificate struct {
	Raw            string `xml:"raw,attr"`
	Subject        pkix.Name
	Issuer         pkix.Name
	SerialNumber   SerialNumber
	NotBefore      time.Time
	NotAfter       time.Time
	KeyUsage       KeyUsage
	ExtKeyUsage    ExtKeyUsage
	SubjectKeyID   SerialNumber
	AuthorityKeyID SerialNumber
	EmailAddresses []string
}

func (MarshaledCertificate) StringMap

func (c MarshaledCertificate) StringMap() map[string]string

type PrivateKey

type PrivateKey struct {
	*rsa.PrivateKey
	// contains filtered or unexported fields
}

func EmptyPrivateKeyWithSecret

func EmptyPrivateKeyWithSecret(secret []byte) *PrivateKey

func NewPrivateKey

func NewPrivateKey(bits int) *PrivateKey

func NewPrivateKeyWithSecret

func NewPrivateKeyWithSecret(bits int, secret []byte) *PrivateKey

func (PrivateKey) MarshalText

func (pk PrivateKey) MarshalText() ([]byte, error)

func (*PrivateKey) SetSecret

func (pk *PrivateKey) SetSecret(secret []byte)

func (*PrivateKey) UnmarshalText

func (pk *PrivateKey) UnmarshalText(text []byte) error

type SerialNumber

type SerialNumber struct {
	*big.Int
}

func NewSerialNumber

func NewSerialNumber(b []byte) SerialNumber

func (SerialNumber) MarshalText

func (n SerialNumber) MarshalText() ([]byte, error)

func (SerialNumber) String

func (n SerialNumber) String() string

func (*SerialNumber) UnmarshalText

func (n *SerialNumber) UnmarshalText(text []byte) error

Jump to

Keyboard shortcuts

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