Versions in this module Expand all Collapse all v0 v0.1.1 Jul 8, 2021 Changes in this version + func NewSelfSignedCertificateKeyPair(template *x509.Certificate, keyBits int) ([]byte, []byte, error) v0.1.0 Jun 29, 2021 Changes in this version + func DecodePEMBlockFromFile(file string) (*pem.Block, error) + func DecryptPEMBlock(b *pem.Block, password []byte) ([]byte, error) + func DecryptString(ciphertext, key string) (string, error) + func EncryptPEMBlock(rand io.Reader, blockType string, data, password []byte, alg PEMCipher) (*pem.Block, error) + func EncryptString(plaintext, key string) (string, error) + func IsEncryptedPEMBlock(b *pem.Block) bool + func ParsePEMCertificateBytes(contents []byte) ([]*x509.Certificate, error) + func ParsePEMCertificateFile(file string) ([]*x509.Certificate, error) + func ParsePEMPrivateKeyBytes(contents []byte, password []byte) (*rsa.PrivateKey, error) + func ParsePEMPrivateKeyFile(file string, password []byte) (*rsa.PrivateKey, error) + func ParsePublicKeyFromCertificate(cert *x509.Certificate) (*rsa.PublicKey, error) + func Sign(contents []byte, privateKey *rsa.PrivateKey) ([]byte, error) + func ValidateCertificate(cert *x509.Certificate, roots *CertificatePool, intermediates *CertificatePool, ...) error + func Verify(contents, signature []byte, publicKey *rsa.PublicKey) error + type CertificatePool struct + func NewCertificatePool(emptyPool bool) (*CertificatePool, error) + func (p *CertificatePool) AddPEMCertificatesFromFile(file string) error + type PEMCipher int + const PEMCipher3DES + const PEMCipherAES128 + const PEMCipherAES192 + const PEMCipherAES256 + const PEMCipherDES