hsmsigner

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: May 16, 2022 License: EUPL-1.2 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	PKCS11ModulePath string
	TokenLabel       string
	Pin              string

	UsageKeys map[string]*Key
}

type HSMSigner

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

func New

func New(config *Configuration) (*HSMSigner, error)

func (*HSMSigner) GetKID

func (hs *HSMSigner) GetKID(keyUsage string) (kid []byte, err error)

func (*HSMSigner) Sign

func (hs *HSMSigner) Sign(keyUsage string, hash []byte) ([]byte, error)

type Key added in v0.5.0

type Key struct {
	CertificatePath string `mapstructure:"certificate-path"`
	KeyIDHex        string `mapstructure:"key-id-hex"`
	KeyLabel        string `mapstructure:"key-label"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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