Documentation ¶
Overview ¶
Package memkm provides an in-memory keys.ManagerInterface implementation. Used for testing.
Index ¶
- func BumpName(name string) string
- type T
- func (k *T) AddFlags(*cobra.Command)
- func (k *T) CertificateTemplate(ctx context.Context, issuer *x509.Certificate, subjectPubKey any) (*x509.Certificate, error)
- func (k *T) CreateFirstSigningKey(ctx context.Context) (string, error)
- func (k *T) CreateNewRootKey(ctx context.Context) (string, error)
- func (k *T) CreateNewSigningKeyVersion(ctx context.Context) (string, error)
- func (k *T) DestroyKeyVersion(_ context.Context, keyVersionName string) error
- func (k *T) InitContext(ctx context.Context) (context.Context, error)
- func (k *T) PersistentPreRunE(*cobra.Command, []string) error
- func (k *T) Wipeout(context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type T ¶
T is the type of the memkm key manager.
func TestOnlyT ¶
func TestOnlyT() *T
TestOnlyT returns a T instance populated with pre-generated keys for development.
func (*T) CertificateTemplate ¶
func (k *T) CertificateTemplate(ctx context.Context, issuer *x509.Certificate, subjectPubKey any) (*x509.Certificate, error)
CertificateTemplate returns a certificate template that will be used for signing.
func (*T) CreateFirstSigningKey ¶
CreateFirstSigningKey is called during CA bootstrapping to create the first signing key that can be used for endorse.
func (*T) CreateNewRootKey ¶
CreateNewRootKey establishes a new key for use as the root CA key.
func (*T) CreateNewSigningKeyVersion ¶
CreateNewSigningKeyVersion is callable after CreateNewSigningKey, and is meant for key rotation. The signing key's name ought to be available from the context.
func (*T) DestroyKeyVersion ¶
DestroyKeyVersion destroys a single key version.
func (*T) InitContext ¶
InitContext extends the given context with whatever else the component needs before execution.
func (*T) PersistentPreRunE ¶
PersistentPreRunE returns an error if the results of the parsed flags constitute an error.