Documentation
¶
Index ¶
- Variables
- func GeneratePFXKeystore(privateKey interface{}, certificate *x509.Certificate, ...) ([]byte, error)
- func GeneratePFXTruststore(caCertificates []*x509.Certificate, keystorePassword string) ([]byte, error)
- func ParseCertificate(pemBytes []byte) (*x509.Certificate, error)
- func ParsePrivateKey(pemBytes []byte) (*rsa.PrivateKey, error)
- type CertOpts
- type Keypair
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidPEMBlock = errors.New("Invalid PEM block")
Functions ¶
func GeneratePFXKeystore ¶
func GeneratePFXKeystore(privateKey interface{}, certificate *x509.Certificate, caCertificates []*x509.Certificate, keystorePassword string) ([]byte, error)
func GeneratePFXTruststore ¶
func GeneratePFXTruststore(caCertificates []*x509.Certificate, keystorePassword string) ([]byte, error)
func ParseCertificate ¶
func ParseCertificate(pemBytes []byte) (*x509.Certificate, error)
func ParsePrivateKey ¶
func ParsePrivateKey(pemBytes []byte) (*rsa.PrivateKey, error)
Types ¶
type CertOpts ¶
type CertOpts struct {
KeySize int
DnsNames []string
Expire time.Duration
Org string
SerialNum *big.Int
}
CertOpts contains options for generating keypair
func MakeDefaultOptions ¶
func MakeDefaultOptions() *CertOpts
Click to show internal directories.
Click to hide internal directories.