Documentation ¶
Index ¶
- func CertTemplate(notBefore, notAfter time.Time, opts ...templateOption) (*x509.Certificate, error)
- func CreateCert(template, parent *x509.Certificate, pub interface{}, parentPriv interface{}) (cert *x509.Certificate, certPEM []byte, err error)
- func NewTLSCredentials(notBefore, notAfter time.Time, opts ...templateOption) ([]byte, []byte, []byte, []byte, []byte)
- func WithAliasDNSNames(aliasDNSNames ...string) aliasDNSNamesOption
- func WithAliasIPs(aliasIPs ...string) aliasIPsOption
- func WithOrganizations(organizations ...string) organizationOption
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CertTemplate ¶
func CertTemplate(notBefore, notAfter time.Time, opts ...templateOption) (*x509.Certificate, error)
CertTemplate is a helper function to create a cert template with a serial number and other required fields
func CreateCert ¶
func CreateCert(template, parent *x509.Certificate, pub interface{}, parentPriv interface{}) ( cert *x509.Certificate, certPEM []byte, err error)
CreateCert invokes x509.CreateCertificate and returns it in the x509.Certificate format
func NewTLSCredentials ¶
func NewTLSCredentials(notBefore, notAfter time.Time, opts ...templateOption) ([]byte, []byte, []byte, []byte, []byte)
NewTLSCredentials creates signed certificates for both the client and server output in order: ca, client.cert, client.key, server.cert, server.key
func WithAliasDNSNames ¶
func WithAliasDNSNames(aliasDNSNames ...string) aliasDNSNamesOption
func WithAliasIPs ¶
func WithAliasIPs(aliasIPs ...string) aliasIPsOption
func WithOrganizations ¶
func WithOrganizations(organizations ...string) organizationOption
Types ¶
Click to show internal directories.
Click to hide internal directories.