Documentation
¶
Overview ¶
Package testca provides helpers to create a self-signed CA certificate, and the ability to generate signed certificates from it. PLEASE NOTE THIS IS NOT A PRODUCTION SAFE NOR VERIFIED WAY TO MANAGE CERTIFICATES FOR SERVERS.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cert ¶
Cert allows the consumer to retrieve the cert and key path, to be used by other processes, like servers for example.
func NewX509 ¶
NewX509 creates a new, self-signed, signing certificate under data.Temp()/ca From that Cert as a CA, you can then generate signed certificates. Note that the common name of the cert will be set to the test name.
func (*Cert) GenerateCustomX509 ¶
func (ca *Cert) GenerateCustomX509( data test.Data, helpers test.Helpers, underDirectory string, template *x509.Certificate, ) *Cert
GenerateCustomX509 signs a random x509 certificate template. Note that if SerialNumber is specified, it must be safe to use on the filesystem as this will be used in the name of the certificate file.