cert

package
v1.4.0-release Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeCertificate

func DecodeCertificate(raw []byte) (cert *x509.Certificate, err error)

DecodeCertificate returns an x509.Certificate for a PEM encoded certificate

func DecodeKey

func DecodeKey(raw []byte) (parsedKey []byte, err error)

DecodeKey will take a PEM encoded Private Key and convert to raw der bytes

func EnsureSecretPassJKS

func EnsureSecretPassJKS(secret *corev1.Secret) (injected *corev1.Secret, err error)

EnsureSecretPassJKS ensures a JKS password is present in a certificate secret

func GenerateJKS

func GenerateJKS(clientCert, clientKey, clientCA []byte) (out, passw []byte, err error)

GenerateJKS creates a JKS with a random password from a client cert/key combination

func GeneratePass

func GeneratePass(length int) (passw []byte)

GeneratePass generates a random password

func GenerateTestCert

func GenerateTestCert() (cert, key []byte, expectedDn string, err error)

GenerateTestCert is used from unit tests for generating certificates

Types

This section is empty.

Jump to

Keyboard shortcuts

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