hsm

package
v2.3.6 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IHSMAdapter

type IHSMAdapter interface {
	// for PKCS11
	PKCS11_GetSM2KeyId(keyIdex int, isPrivate bool) (string, error)
	PKCS11_GetRSAKeyId(keyIdex int, isPrivate bool) (string, error)
	PKCS11_GetECCKeyId(keyIdex int, isPrivate bool) (string, error)
	PKCS11_GetSM4KeyId(keyIdex int) (string, error)
	PKCS11_GetAESKeyId(keyIdex int) (string, error)

	PKCS11_GetSM3SM2CKM() uint

	// For SDF
	SDF_GetSM2KeyAccessRight(keyIdex int) (newKeyIdex int, need bool)
	SDF_GetSM4KeyAccessRight(keyIdex int) (newKeyIdex int, need bool)
	SDF_GetRSAKeyAccessRight(keyIdex int) (newKeyIdex int, need bool)
	SDF_GetAESKeyAccessRight(keyIdex int) (newKeyIdex int, need bool)
}

IHSMAdapter is the hsm adapter interface

func GetHSMAdapter

func GetHSMAdapter(pluginPath string) IHSMAdapter

GetHSMAdapter returns the actual hsm adapter by pluginPath if puglinPath not set, returns a default adapter

func Load

func Load(pluginPath string) (IHSMAdapter, error)

Load loads the hsm adapter from a plugin specified by HSM_ADAPTER_LIB path

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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