certutil

package
v0.0.0-...-d0e1227 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeCertificate

func EncodeCertificate(cert *x509.Certificate) ([]byte, error)

func EncodeKey

func EncodeKey(key crypto.Signer) ([]byte, error)

func ParseCertificateBytes

func ParseCertificateBytes(crtBytes []byte) (*x509.Certificate, error)

func ParseKeyBytes

func ParseKeyBytes(keyBytes []byte) (crypto.Signer, error)

func ReadCertificateFile

func ReadCertificateFile(name string) (*x509.Certificate, error)

func ReadKeyFile

func ReadKeyFile(name string) (crypto.Signer, error)

func WritePairFiles

func WritePairFiles(pair *Pair, name string) error

Types

type Pair

type Pair struct {
	Key  crypto.Signer
	Cert *x509.Certificate
}

func GenerateCertificate

func GenerateCertificate(parent *Pair, cfg cert.Config) (*Pair, error)

func GenerateSelfSignedCA

func GenerateSelfSignedCA(commonName string, organization []string) (*Pair, error)

func ReadPairFiles

func ReadPairFiles(name string) (*Pair, error)

func (*Pair) Bytes

func (p *Pair) Bytes() (certBytes, keyBytes []byte, err error)

func (*Pair) CertBytes

func (p *Pair) CertBytes() ([]byte, error)

func (*Pair) KeyBytes

func (p *Pair) KeyBytes() ([]byte, error)

Jump to

Keyboard shortcuts

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