Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SessionManager ¶
type SessionManager struct {
// contains filtered or unexported fields
}
SessionManager manages a pool of authenticated secure sessions with a YubiHSM2
func NewSessionManager ¶
func NewSessionManager(connector connector.Connector, authKeyID uint16, password string) (*SessionManager, error)
NewSessionManager creates a new instance of the SessionManager with poolSize connections. Wait on channel Connected with a timeout to wait for active connections to be ready.
func (*SessionManager) Destroy ¶
func (s *SessionManager) Destroy()
Destroy closes all connections in the pool. SessionManager instances can't be reused.
func (*SessionManager) SendCommand ¶
func (s *SessionManager) SendCommand(c *commands.CommandMessage) (commands.Response, error)
SendCommand sends an unauthenticated command to the HSM and returns the parsed response
func (*SessionManager) SendEncryptedCommand ¶
func (s *SessionManager) SendEncryptedCommand(c *commands.CommandMessage) (commands.Response, error)
SendEncryptedCommand sends an encrypted & authenticated command to the HSM and returns the decrypted and parsed response.
Click to show internal directories.
Click to hide internal directories.