pemutil

package
v0.0.0-...-8f69376 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoBlocks = errors.New("no PEM blocks")
)

Functions

func LoadCertificate

func LoadCertificate(path string) (*x509.Certificate, error)

func LoadCertificateRequest

func LoadCertificateRequest(path string) (*x509.CertificateRequest, error)

func LoadCertificates

func LoadCertificates(path string) (certs []*x509.Certificate, err error)

func LoadECPrivateKey

func LoadECPrivateKey(path string) (*ecdsa.PrivateKey, error)

func LoadPrivateKey

func LoadPrivateKey(path string) (crypto.PrivateKey, error)

func LoadRSAPrivateKey

func LoadRSAPrivateKey(path string) (*rsa.PrivateKey, error)

func ParseCertificate

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

func ParseCertificateRequest

func ParseCertificateRequest(pemBytes []byte) (*x509.CertificateRequest, error)

func ParseCertificates

func ParseCertificates(pemBytes []byte) (certs []*x509.Certificate, err error)

func ParseECPrivateKey

func ParseECPrivateKey(pemBytes []byte) (*ecdsa.PrivateKey, error)

func ParsePrivateKey

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

func ParseRSAPrivateKey

func ParseRSAPrivateKey(pemBytes []byte) (*rsa.PrivateKey, error)

Types

type Block

type Block struct {
	Type    string
	Headers map[string]string
	Object  interface{}
}

func LoadBlocks

func LoadBlocks(path string) ([]Block, error)

func ParseBlocks

func ParseBlocks(pemBytes []byte) ([]Block, error)

Jump to

Keyboard shortcuts

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