certificates

package
v0.0.0-...-6cc5b44 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCredentialsManager

func NewCredentialsManager(clusterCertificateSecretName, caCertSecretName types.NamespacedName, secretsRepository secrets.Repository) *credentialsManager

func ParsePrivateKey

func ParsePrivateKey(clusterKey []byte) (*rsa.PrivateKey, error)

Types

type CSRProvider

type CSRProvider interface {
	CreateCSR(subject pkix.Name) (string, *rsa.PrivateKey, error)
}

func NewCSRProvider

func NewCSRProvider() CSRProvider

type ClientCredentials

type ClientCredentials struct {
	ClientKey         *rsa.PrivateKey
	CertificateChain  []*x509.Certificate
	ClientCertificate *x509.Certificate
}

func (ClientCredentials) AsTLSCertificate

func (c ClientCredentials) AsTLSCertificate() tls.Certificate

type Credentials

type Credentials struct {
	ClientCredentials
	CACertificates []*x509.Certificate
}

func NewCredentials

func NewCredentials(key *rsa.PrivateKey, certificateResponse gqlschema.CertificationResult) (Credentials, error)

func (Credentials) AsPemEncoded

func (c Credentials) AsPemEncoded() PemEncodedCredentials

type Manager

type Manager interface {
	GetClientCredentials() (ClientCredentials, error)
	PreserveCredentials(Credentials) error
	CredentialsExist() (bool, error)
}

type PemEncodedCredentials

type PemEncodedCredentials struct {
	ClientKey         []byte
	CertificateChain  []byte
	ClientCertificate []byte
	CACertificates    []byte
}

func (PemEncodedCredentials) AsClientCredentials

func (c PemEncodedCredentials) AsClientCredentials() (ClientCredentials, error)

func (PemEncodedCredentials) AsCredentials

func (c PemEncodedCredentials) AsCredentials() (Credentials, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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