pkiutil

package module
v0.0.0-...-e98cf05 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2025 License: MIT Imports: 7 Imported by: 1

README

pkiutil

Go PKI related utilities

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalCertificate

func MarshalCertificate(c *x509.Certificate) ([]byte, error)

Marshal the given certificate in PEM format.

func MarshalCertificateRequest

func MarshalCertificateRequest(csr []byte) ([]byte, error)

Marshal the given certificate request to PEM format.

func MarshalCertificateRequestW

func MarshalCertificateRequestW(out io.Writer, csr []byte) error

func MarshalCertificateW

func MarshalCertificateW(out io.Writer, c *x509.Certificate) error

Marshal the given certificate in PEM format to out.

func MarshalPrivateKey

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

Convert a private key to PEM encoded PKCS #8.

func MarshalPrivateKeyW

func MarshalPrivateKeyW(out io.Writer, pk crypto.PrivateKey) error

Convert a private key to PEM encoded PKCS #8 written to out.

func ParseCertificate

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

Parse a PEM formatted certificate.

func ParseCertificateRequest

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

func ParseCertificates

func ParseCertificates(b []byte, limit int) ([]*x509.Certificate, error)

Parse concatenanted PEM certificates up to limit. An error is returned if 0 certificates are parsed.

func ParsePrivateKey

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

Parse a PEM formatted private key.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳