certificate

package
v3.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKongSystemSelfSignedCerts

func GetKongSystemSelfSignedCerts() (cert []byte, key []byte)

GetKongSystemSelfSignedCerts returns the self-signed certificate and key with CN=*.<controllerNamespace>.svc and subjectAltName=DNS:*.<controllerNamespace>.svc.

func MustGenerateSelfSignedCert

func MustGenerateSelfSignedCert(opts ...SelfSignedCertificateOption) 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(opts ...SelfSignedCertificateOption) (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 SelfSignedCertificateOption added in v3.2.0

type SelfSignedCertificateOption func(selfSignedCertificateOptions) selfSignedCertificateOptions

func WithAlreadyExpired

func WithAlreadyExpired() SelfSignedCertificateOption

func WithCATrue

func WithCATrue() SelfSignedCertificateOption

WithCATrue allows to use returned certificate to sign other certificates (uses BasicConstraints extension).

func WithCommonName

func WithCommonName(commonName string) SelfSignedCertificateOption

func WithDNSNames

func WithDNSNames(dnsNames ...string) SelfSignedCertificateOption

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL