keystore

package
v0.2.0-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AlgRSA   = "RSA"
	AlgECDSA = "ECDSA"
)

Variables

View Source
var ErrNoSuchKey = errors.New("no such key")

nolint

Functions

This section is empty.

Types

type Entry

type Entry struct {
	KeyID      string
	Alg        string
	KeySize    int
	PrivateKey crypto.Signer
	CertChain  []*x509.Certificate
}

func (*Entry) JWK

func (e *Entry) JWK() jose.JSONWebKey

type KeyStore

type KeyStore interface {
	GetKey(id string) (*Entry, error)
	Entries() []*Entry
}

func NewKeyStore

func NewKeyStore(conf config.Configuration, logger zerolog.Logger) (KeyStore, error)

func NewKeyStoreFromKey

func NewKeyStoreFromKey(privateKey crypto.Signer) (KeyStore, error)

func NewKeyStoreFromPEMBytes

func NewKeyStoreFromPEMBytes(pemBytes []byte, password string) (KeyStore, error)

func NewKeyStoreFromPEMFile

func NewKeyStoreFromPEMFile(pemFilePath, password string) (KeyStore, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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