Documentation ¶
Index ¶
- func GetKongSystemSelfSignedCerts() (cert []byte, key []byte)
- func MustGenerateSelfSignedCert(decorators ...SelfSignedCertificateOptionsDecorator) tls.Certificate
- func MustGenerateSelfSignedCertPEMFormat(decorators ...SelfSignedCertificateOptionsDecorator) (cert []byte, key []byte)
- type SelfSignedCertificateOptions
- type SelfSignedCertificateOptionsDecorator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetKongSystemSelfSignedCerts ¶
GetKongSystemSelfSignedCerts returns the self-signed certificate and key with CN=*.<controllerNamespace>.svc and subjectAltName=DNS:*.<controllerNamespace>.svc.
func MustGenerateSelfSignedCert ¶
func MustGenerateSelfSignedCert(decorators ...SelfSignedCertificateOptionsDecorator) tls.Certificate
MustGenerateSelfSignedCert generates a tls.Certificate struct to be used in TLS client/listener configurations. Certificate is self-signed thus returned cert can be used as CA for it.
func MustGenerateSelfSignedCertPEMFormat ¶
func MustGenerateSelfSignedCertPEMFormat(decorators ...SelfSignedCertificateOptionsDecorator) (cert []byte, key []byte)
MustGenerateSelfSignedCertPEMFormat generates self-signed certificate and returns certificate and key in PEM format. Certificate is self-signed thus returned cert can be used as CA for it.
Types ¶
type SelfSignedCertificateOptionsDecorator ¶
type SelfSignedCertificateOptionsDecorator func(SelfSignedCertificateOptions) SelfSignedCertificateOptions
func WithAlreadyExpired ¶
func WithAlreadyExpired() SelfSignedCertificateOptionsDecorator
func WithCATrue ¶
func WithCATrue() SelfSignedCertificateOptionsDecorator
WithCATrue allows to use returned certificate to sign other certificates (uses BasicConstraints extension).
func WithCommonName ¶
func WithCommonName(commonName string) SelfSignedCertificateOptionsDecorator
func WithDNSNames ¶
func WithDNSNames(dnsNames ...string) SelfSignedCertificateOptionsDecorator
Click to show internal directories.
Click to hide internal directories.