Documentation
¶
Index ¶
- type Context
- func (c *Context) Destroy()
- func (c *Context) FindObjectByID(id string) (pkcs11.ObjectHandle, error)
- func (c *Context) FindObjectByLabel(label string) (pkcs11.ObjectHandle, error)
- func (c *Context) FindObjectByTemplate(template []*pkcs11.Attribute) (pkcs11.ObjectHandle, error)
- func (c *Context) GetSession() pkcs11.SessionHandle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
HSM *pkcs11.Ctx
// TODO: make this a concurrent-safe pool of sessions, default of size 1
Session pkcs11.SessionHandle
}
func (*Context) Destroy ¶
func (c *Context) Destroy()
Destroy tears down the HSM session and context
func (*Context) FindObjectByID ¶
func (c *Context) FindObjectByID(id string) (pkcs11.ObjectHandle, error)
FindObjectByID searches for a session or token object by CKA_ID and returns the object handle
func (*Context) FindObjectByLabel ¶
func (c *Context) FindObjectByLabel(label string) (pkcs11.ObjectHandle, error)
FindObjectByLabel searches for a token object by CKA_LABEL and returns the object handle
func (*Context) FindObjectByTemplate ¶
FindObjectByTemplate searches for a token object by the attribute template and returns the object handle
func (*Context) GetSession ¶
func (c *Context) GetSession() pkcs11.SessionHandle
Click to show internal directories.
Click to hide internal directories.