pkcs11hsm

package
v0.0.0-...-29e199f Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package pkcs11hsm adds support for PKCS11 compatible HSMs by satisfying the DigitalSignatureManager interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByTime

type ByTime []addressTime

ByTime defines a type to be used when sorting accounts by time.

func (ByTime) Addresses

func (a ByTime) Addresses() []address.Address

Addresses is implementing the required element interface to be used by sort.Sort.

func (ByTime) Len

func (a ByTime) Len() int

Len is implementing the required element interface to be used by sort.Sort.

func (ByTime) Less

func (a ByTime) Less(i, j int) bool

Less is implementing the required element interface to be used by sort.Sort.

func (ByTime) Swap

func (a ByTime) Swap(i, j int)

Swap is implementing the required element interface to be used by sort.Sort.

type Curve

type Curve string
const (
	CurveDefault   Curve = "secp256k1"
	CurveSecp256k1 Curve = "secp256k1"
)

type PKCS11HSMConfiguration

type PKCS11HSMConfiguration struct {
	Curve Curve
}

PKCS11HSMConfiguration configuration to connect to a softHSM instance.

type PKCS11HSMConnectionDetails

type PKCS11HSMConnectionDetails struct {
	// Configuration configuration to connect to a softHSM instance.
	Configuration PKCS11HSMConfiguration
}

PKCS11HSMConnectionDetails configuration to connect to a specific slot in a softHSM instance.

type PKCS11HSMSignatureManager

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

PKCS11HSMSignatureManager implements the DigitalSignatureManager interface.

func ProvidePKCS11HSMSignatureManager

func ProvidePKCS11HSMSignatureManager(options PKCS11HSMSignatureManagerOptions) (*PKCS11HSMSignatureManager, error)

ProvidePKCS11HSMSignatureManager creates a new instance of PKCS11HSMSignatureManager using the provided options, returning an error if it fails.

func (*PKCS11HSMSignatureManager) Close

func (*PKCS11HSMSignatureManager) IsAlive

func (*PKCS11HSMSignatureManager) ListKeys

func (*PKCS11HSMSignatureManager) Open

func (*PKCS11HSMSignatureManager) RemoveKey

func (*PKCS11HSMSignatureManager) Sign

type PKCS11HSMSignatureManagerOptions

type PKCS11HSMSignatureManagerOptions struct {
	PkcsContext *pkcs11.Ctx
}

PKCS11HSMSignatureManagerOptions defines options to create a new instance of PKCS11HSMSignatureManager.

Jump to

Keyboard shortcuts

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