tx509

package
v0.0.0-...-6a56cfb Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCertificate

func CreateCertificate(t testing.TB, rand io.Reader, template, parent *x509.Certificate, pub, priv any) []byte

func CreateCertificateRequest

func CreateCertificateRequest(t testing.TB, rand io.Reader, template *x509.CertificateRequest, priv any) (csr []byte)

func CreateRevocationList

func CreateRevocationList(t testing.TB, rand io.Reader, template *x509.RevocationList, issuer *x509.Certificate, priv crypto.Signer) []byte

func DecryptPEMBlock

func DecryptPEMBlock(t testing.TB, b *pem.Block, password []byte) []byte

func EncryptPEMBlock

func EncryptPEMBlock(t testing.TB, rand io.Reader, blockType string, data, password []byte, alg x509.PEMCipher) *pem.Block

func MarshalECPrivateKey

func MarshalECPrivateKey(t testing.TB, key *ecdsa.PrivateKey) []byte

func MarshalPKCS8PrivateKey

func MarshalPKCS8PrivateKey(t testing.TB, key any) []byte

func MarshalPKIXPublicKey

func MarshalPKIXPublicKey(t testing.TB, pub any) []byte

func ParseCRL

func ParseCRL(t testing.TB, crlBytes []byte) *pkix.CertificateList

func ParseCertificate

func ParseCertificate(t testing.TB, der []byte) *x509.Certificate

func ParseCertificateRequest

func ParseCertificateRequest(t testing.TB, asn1Data []byte) *x509.CertificateRequest

func ParseCertificates

func ParseCertificates(t testing.TB, der []byte) []*x509.Certificate

func ParseDERCRL

func ParseDERCRL(t testing.TB, derBytes []byte) *pkix.CertificateList

func ParseECPrivateKey

func ParseECPrivateKey(t testing.TB, der []byte) *ecdsa.PrivateKey

func ParsePKCS1PrivateKey

func ParsePKCS1PrivateKey(t testing.TB, der []byte) *rsa.PrivateKey

func ParsePKCS1PublicKey

func ParsePKCS1PublicKey(t testing.TB, der []byte) *rsa.PublicKey

func ParsePKCS8PrivateKey

func ParsePKCS8PrivateKey(t testing.TB, der []byte) (key any)

func ParsePKIXPublicKey

func ParsePKIXPublicKey(t testing.TB, derBytes []byte) (pub any)

func SystemCertPool

func SystemCertPool(t testing.TB) *x509.CertPool

Types

This section is empty.

Jump to

Keyboard shortcuts

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