pyhsm.basic_cmd.YHSM_Cmd_Key_Storage_Unlock

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

# Class YHSM_Cmd_Key_Storage_Unlock

    cmd.YHSM_Cmd --+
                   |
                  YHSM_Cmd_Key_Storage_Unlock

Have the YubiHSM unlock it's key storage using the HSM password.

If an incorrect password is given when the key storage is unlocked, it will be locked again.

This command was replaced by YHSM_Cmd_Key_Store_Decrypt in YubiHSM 1.0.

Instance Methods
__init__(self, stick, password=`'````'`) The base class for all YSM_ commands. |
bool |
parse_result(self, data) Parse result of pyhsm.defines.YSM_KEY_STORAGE_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, password=`'````'`) (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_KEY_STORAGE_UNLOCK command. Returns: bool Only returns (True) on successful unlock Raises: `pyhsm.exception.YHSM_CommandFailed` - YubiHSM failed to unlock key storage Overrides: cmd.YHSM_Cmd.parse_result