Documentation ¶
Index ¶
- func ApplyCaSelfSignedCertFilter(obj *unstructured.Unstructured) (go_hook.FilterResult, error)
- func GenerateCSR(logger *logrus.Entry, cn string, options ...Option) (csrPEM, key []byte, err error)
- func IsCertificateExpiringSoon(cert []byte, durationLeft time.Duration) (bool, error)
- func ParseCertificate(crt string) (*x509.Certificate, error)
- func ParseCertificatesFromBase64(ca, crt, key string) (*x509.Certificate, *tls.Certificate, error)
- func ParseCertificatesFromPEM(ca, crt, key string) (*x509.Certificate, *tls.Certificate, error)
- func Validator(req *csr.CertificateRequest) error
- type Authority
- type Certificate
- type Option
- func WithCAConfig(caConfig *csr.CAConfig) Option
- func WithCAExpiry(expiry string) Option
- func WithCSRKeyRequest(keyRequest *csr.KeyRequest) Option
- func WithGroups(groups ...string) Option
- func WithKeyAlgo(algo string) Option
- func WithKeyRequest(keyRequest *csr.KeyRequest) Option
- func WithKeySize(size int) Option
- func WithNames(names ...csr.Name) Option
- func WithSANs(sans ...string) Option
- type SigningOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyCaSelfSignedCertFilter ¶
func ApplyCaSelfSignedCertFilter(obj *unstructured.Unstructured) (go_hook.FilterResult, error)
func GenerateCSR ¶
func ParseCertificate ¶ added in v1.35.0
func ParseCertificate(crt string) (*x509.Certificate, error)
ParseCertificate parse x509 certificate PEM encoded
func ParseCertificatesFromBase64 ¶
func ParseCertificatesFromBase64(ca, crt, key string) (*x509.Certificate, *tls.Certificate, error)
ParseCertificatesFromBase64 parsing base64 input string and return ca cert and/or verified tls.Certificate
func ParseCertificatesFromPEM ¶
func ParseCertificatesFromPEM(ca, crt, key string) (*x509.Certificate, *tls.Certificate, error)
ParseCertificatesFromPEM parsing PEM input strings and return ca cert and/or verified tls.Certificate
func Validator ¶
func Validator(req *csr.CertificateRequest) error
Validator does nothing and will never return an error. It exists because creating a csr.Generator requires a Validator.
Types ¶
type Authority ¶
func GenerateCA ¶
type Certificate ¶
func GenerateSelfSignedCert ¶
type Option ¶
type Option func(request *csr.CertificateRequest)
func WithCAConfig ¶
func WithCAExpiry ¶
func WithCSRKeyRequest ¶
func WithCSRKeyRequest(keyRequest *csr.KeyRequest) Option
WithCSRKeyRequest redeclare basic(ecdsa 2048) key alg and size
func WithGroups ¶
func WithKeyAlgo ¶
func WithKeyRequest ¶
func WithKeyRequest(keyRequest *csr.KeyRequest) Option
func WithKeySize ¶
type SigningOption ¶
func WithSigningDefaultExpiry ¶
func WithSigningDefaultExpiry(expiry time.Duration) SigningOption
func WithSigningDefaultUsage ¶
func WithSigningDefaultUsage(usage []string) SigningOption
Click to show internal directories.
Click to hide internal directories.