Documentation
¶
Overview ¶
Package mustcert generates certificates for TLS testing
Example ¶
This example uses mustcert to create certificates, start a TLS server, and a client to talk to it.
Output: hello, world!
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cert ¶
type Cert tls.Certificate
Cert is an alias for tls.Certificate with extra helper methods.
func CA ¶
CA generates a new certificate that can sign leaf & intermediary certificates. The certificate is self-signed if parent is nil.
func Leaf ¶
func Leaf(commonName string, parent *Cert, opts ...func(*x509.Certificate)) *Cert
Leaf generates a new leaf certificate. The certificate is self-signed if parent is nil. If opts are provided, they are invoked on the certificate before it's signed
Click to show internal directories.
Click to hide internal directories.