keymanager

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SelfKeyPairName db row name
	SelfKeyPairName  = "ca"
	SelfKeyTrustName = "trust"
)

...

Variables

This section is empty.

Functions

func InitKeeper

func InitKeeper() error

InitKeeper ...

Types

type Keeper

type Keeper struct {
	DB *gorm.DB

	RootClient UpperClients
	// contains filtered or unexported fields
}

Keeper ...

var (
	Std *Keeper
)

func GetKeeper

func GetKeeper() *Keeper

GetKeeper ...

func (*Keeper) GetCachedSelfKeyPair

func (k *Keeper) GetCachedSelfKeyPair() (key crypto.Signer, cert *x509.Certificate, err error)

GetCachedSelfKeyPair ...

func (*Keeper) GetCachedSelfKeyPairPEM

func (k *Keeper) GetCachedSelfKeyPairPEM() (key, cert []byte, err error)

GetCachedSelfKeyPairPEM ...

func (*Keeper) GetCachedTLSKeyPair

func (k *Keeper) GetCachedTLSKeyPair() (*tls.Certificate, error)

GetCachedTLSKeyPair ...

func (*Keeper) GetDBSelfKeyPairPEM

func (k *Keeper) GetDBSelfKeyPairPEM() (key, cert []byte, err error)

GetDBSelfKeyPairPEM ...

func (*Keeper) GetL3CachedTrustCerts

func (k *Keeper) GetL3CachedTrustCerts() (certs []*x509.Certificate, err error)

GetL3CachedTrustCerts Memory > multi level cache > remote process > certificate

func (*Keeper) GetRemoteTrustCerts

func (k *Keeper) GetRemoteTrustCerts() (certs []*x509.Certificate, err error)

GetRemoteTrustCerts Obtain remote trust certificate (including root certificate and intermediate CA certificate)

func (*Keeper) SetKeyPairPEM

func (k *Keeper) SetKeyPairPEM(key, cert []byte) error

SetKeyPairPEM ...

type RemoteSigner

type RemoteSigner struct {
	// contains filtered or unexported fields
}

RemoteSigner ...

func NewRemoteSigner

func NewRemoteSigner() *RemoteSigner

NewRemoteSigner ...

func (*RemoteSigner) Run

func (ss *RemoteSigner) Run() error

Run calls the remote CA to sign the certificate and persist it

type SelfSigner

type SelfSigner struct {
	// contains filtered or unexported fields
}

SelfSigner ...

func NewSelfSigner

func NewSelfSigner() *SelfSigner

NewSelfSigner ...

func (*SelfSigner) Run

func (ss *SelfSigner) Run() error

Run Self signed certificate and saved

type UpperClients

type UpperClients interface {
	DoWithRetry(f func(*client.AuthRemote) error) error
	AllClients() map[string]*client.AuthRemote
}

func NewUpperClients

func NewUpperClients(adds []string) (UpperClients, error)

Jump to

Keyboard shortcuts

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