pemparser

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RSAPrivateKeyPemType = "RSA PRIVATE KEY"
	ECPrivateKeyPemType  = "EC PRIVATE KEY"
	CertificatePemType   = "CERTIFICATE"
	PublicKeyPemType     = "PUBLIC KEY"
)

Variables

This section is empty.

Functions

func ForeachPemBlock

func ForeachPemBlock(pemText []byte, f func(*pem.Block) error) error

func MarshalCertificateDer

func MarshalCertificateDer(certDer []byte) []byte

func MarshalPrivateKey

func MarshalPrivateKey(priv crypto.PrivateKey) ([]byte, error)

func ParseCertificates

func ParseCertificates(pemText []byte) ([]*x509.Certificate, error)

func ParsePrivateKey

func ParsePrivateKey(pemText []byte) (crypto.PrivateKey, error)

func ParseSinglePrivateKeyBlock added in v0.2.2

func ParseSinglePrivateKeyBlock(block *pem.Block) (crypto.PrivateKey, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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