Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateCertificate ¶
func GenerateCertificate(option GenCertOption) ([]byte, []byte, *x509.Certificate, error)
GenerateCertificate returns a private key, a public key and the certificate generated under `option`.
func GenerateTestCertSuite ¶
GenerateTestCertSuite returns a 10 years certificate. Returns CA, server private key, server public key, error in order.
func ReadWithZlib ¶
ReadWithZlib reads data from conn, returns any error encountered.
func WriteWithZlib ¶
WriteWithZlib dumps data into conn, returns any error encountered.
Types ¶
type GenCertOption ¶
type GenCertOption struct { DNSName string CertName string KeyLength int IsCA bool CACertificate x509.Certificate CAPriv []byte CAPub []byte }
GenCertOption specifies parameters to generate certificates.
Click to show internal directories.
Click to hide internal directories.