Documentation ¶
Index ¶
- Constants
- func EncodeCertificatePEM(cert *x509.Certificate) []byte
- func EncodePrivateKeyPEM(key *rsa.PrivateKey) []byte
- func EncodePublicKeyPEM(key *rsa.PublicKey) ([]byte, error)
- func NewPrivateKey() (*rsa.PrivateKey, error)
- func NewSelfSignedCACertificate(cfg CertConfig, key *rsa.PrivateKey) (*x509.Certificate, error)
- func NewSignedCertificate(cfg CertConfig, key *rsa.PrivateKey, caCert *x509.Certificate, ...) (*x509.Certificate, error)
- func ParsePEMEncodedCACert(pemdata []byte) (*x509.Certificate, error)
- func ParsePEMEncodedPrivateKey(pemdata []byte) (*rsa.PrivateKey, error)
- type AltNames
- type CertConfig
Constants ¶
View Source
const ( RSAKeySize = 2048 Duration365d = time.Hour * 24 * 365 )
Variables ¶
This section is empty.
Functions ¶
func EncodeCertificatePEM ¶
func EncodeCertificatePEM(cert *x509.Certificate) []byte
func EncodePrivateKeyPEM ¶
func EncodePrivateKeyPEM(key *rsa.PrivateKey) []byte
func NewPrivateKey ¶
func NewPrivateKey() (*rsa.PrivateKey, error)
func NewSelfSignedCACertificate ¶
func NewSelfSignedCACertificate(cfg CertConfig, key *rsa.PrivateKey) (*x509.Certificate, error)
func NewSignedCertificate ¶
func NewSignedCertificate(cfg CertConfig, key *rsa.PrivateKey, caCert *x509.Certificate, caKey *rsa.PrivateKey) (*x509.Certificate, error)
func ParsePEMEncodedCACert ¶
func ParsePEMEncodedCACert(pemdata []byte) (*x509.Certificate, error)
func ParsePEMEncodedPrivateKey ¶
func ParsePEMEncodedPrivateKey(pemdata []byte) (*rsa.PrivateKey, error)
Types ¶
Click to show internal directories.
Click to hide internal directories.