keystore

package
v0.3.0-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 9, 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

func FindChain

func FindChain(key crypto.PublicKey, pool []*x509.Certificate) []*x509.Certificate

func ValidateChain

func ValidateChain(chain []*x509.Certificate) error

Types

type Entry

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

func (*Entry) JOSEAlgorithm

func (e *Entry) JOSEAlgorithm() jose.SignatureAlgorithm

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