hsm

package
v2.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrOpSysNotSupported = errors.New("Hardware Security Module is not supported on this platform.")

Functions

This section is empty.

Types

type Context

type Context interface {
}

func NewContext

func NewContext(c *config.DefaultProvider, l *logrusx.Logger) Context

type KeyManager

type KeyManager struct {
	jwk.Manager
	sync.RWMutex
	Context
	KeySetPrefix string
}

func NewKeyManager

func NewKeyManager(hsm Context, config *config.DefaultProvider) *KeyManager

func (*KeyManager) AddKey

func (m *KeyManager) AddKey(_ context.Context, _ string, _ *jose.JSONWebKey) error

func (*KeyManager) AddKeySet

func (m *KeyManager) AddKeySet(_ context.Context, _ string, _ *jose.JSONWebKeySet) error

func (*KeyManager) DeleteKey

func (m *KeyManager) DeleteKey(_ context.Context, set, kid string) error

func (*KeyManager) DeleteKeySet

func (m *KeyManager) DeleteKeySet(_ context.Context, set string) error

func (*KeyManager) GenerateAndPersistKeySet

func (m *KeyManager) GenerateAndPersistKeySet(_ context.Context, set, kid, alg, use string) (*jose.JSONWebKeySet, error)

func (*KeyManager) GetKey

func (m *KeyManager) GetKey(_ context.Context, set, kid string) (*jose.JSONWebKeySet, error)

func (*KeyManager) GetKeySet

func (m *KeyManager) GetKeySet(_ context.Context, set string) (*jose.JSONWebKeySet, error)

func (*KeyManager) UpdateKey

func (m *KeyManager) UpdateKey(_ context.Context, _ string, _ *jose.JSONWebKey) error

func (*KeyManager) UpdateKeySet

func (m *KeyManager) UpdateKeySet(_ context.Context, _ string, _ *jose.JSONWebKeySet) error

Jump to

Keyboard shortcuts

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