Documentation ¶
Index ¶
- Constants
- func CheckToken(opts *config.PKCS11) error
- func DERToPublicKey(raw []byte) (pub interface{}, err error)
- func FindPKCS11Lib() (lib, pin, label string, err error)
- func GeneratePrivateKey() (*ecdsa.PublicKey, error)
- func GetBCCSP(conf *config.BCCSP) (bccsp.BCCSP, bccsp.KeyStore, error)
- func ListTokens(opts *config.PKCS11) ([]pkcs11lib.TokenInfo, error)
- func ToPKCS11Opts(o *config.PKCS11) *pkcs11.PKCS11Opts
Constants ¶
View Source
const ( EnvPin = "PKCS11_PIN" EnvLabel = "PKCS11_LABEL" DefaultPin = "98765432" DefaultLabel = "ForFSC" Provider = "PKCS11" )
Variables ¶
This section is empty.
Functions ¶
func CheckToken ¶
CheckToken checks whether a token is available that matches the given label. If the token does not exist, it is created.
func DERToPublicKey ¶
DERToPublicKey unmarshals a der to public key
func FindPKCS11Lib ¶
FindPKCS11Lib attempts to find the PKCS11 library based on the given configuration
func GeneratePrivateKey ¶
GeneratePrivateKey creates a private key in the HSM and returns its corresponding public key
func ListTokens ¶
ListTokens lists available tokens
func ToPKCS11Opts ¶
func ToPKCS11Opts(o *config.PKCS11) *pkcs11.PKCS11Opts
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.