Package pyhsm :: Module basic_cmd :: Class YHSM_Cmd_HSM_Unlock
[frames] | no frames]

Class YHSM_Cmd_HSM_Unlock

cmd.YHSM_Cmd --+
               |
              YHSM_Cmd_HSM_Unlock

Have the YubiHSM unlock the HSM operations (those involving the keystore) with a YubiKey OTP.

Admin YubiKeys public id's are entered during initial configuration. These must then be made available in the internal database.

Instance Methods
 
__init__(self, stick, public_id, otp)
The base class for all YSM_ commands.
bool
parse_result(self, data)
Parse result of pyhsm.defines.YSM_HSM_UNLOCK command.

Inherited from cmd.YHSM_Cmd: execute

Class Variables

Inherited from cmd.YHSM_Cmd: executed, response_status

Instance Variables
integer status = None
The result of the unlock operation
Method Details

__init__(self, stick, public_id, otp)
(Constructor)

 

The base class for all YSM_ commands.

Parameters:
  • stick - Reference to a YubiHSM
  • command - The YSM_xxx command defined in pyhsm.defines.
  • payload - a packed C struct, represented as a Python string
Overrides: cmd.YHSM_Cmd.__init__
(inherited documentation)

parse_result(self, data)

 

Parse result of pyhsm.defines.YSM_HSM_UNLOCK command.

Returns: bool
Only returns (True) on successful unlock
Raises:
Overrides: cmd.YHSM_Cmd.parse_result