Function prototype
aat_int32 AAL2ProcUnlockRpl(
aat_byte *InReply,
aat_int32 ReplySize,
TDigipassBlob *DPData,
aat_ascii *aUnlockCodeOut,
aat_int32 *UnlockCodeLenIn);
Description
This function processes a reply from the HSM to a command generated with either AAL2GenUnlockCmd or AAL2GenUnlockCmdEx.
Unlocking Digipass with the HSM module is identical to the functionality available with the Authentication Suite Server SDK Software Digipass Management Service. For information on the associated functions, refer to the Authentication Suite Server SDK C-C++ Programmer's Guide.
Parameters
Table: Parameters (AAL2ProcUnlockRepl) | Type | Name | Use | Description |
|---|
| aat_byte * | InReply | I | Up to 218 bytes that contain the UNLOCK command type and the output data from the unlock function on the HSM: - Command type - 2 bytes
- An authenticator application BLOB - 192 bytes
- Return code - 4 bytes
- Unlock code - up to 8 characters
Plus 12 bytes for Authentication Suite Server SDK internal use. |
| aat_int32 * | ReplySize | I | The length of the InReply message. |
| TDigipassBlob * | DPData | O | authenticator application BLOB. Upon return from the function call, this BLOB must be rewritten to the application database to reflect changes. |
| aat_ascii * | aUnlockCodeOut | O | String of 7 or 8 + 1 numeric characters, which the user needs to enter to unlock the Digipass authenticator (recommended buffer size is 9 bytes). |
| aat_int32 | UnlockCodeLenIn | I | Buffer size of aUnlockCodeOut. |
Return codes
Table: Return codes (AAL2ProcUnlockRpl) | Code | Meaning | Code | Meaning |
|---|
| 0 | Success | 913 | Invalid HSM key propertyy |
| 134 | Invalid UnlockCode pointer | 951 | Invalid HSM key type for HSM decryption |
| 138 | Unlock function not supported | 1009 | Invalid TLV total length |
| 208 | Application disabled | 1018 | Invalid TLV item pointer |
| 209 | Grace period expired | 1019 | Missing mandatory TLV item |
| 210 | Allowed use count reached | 1025 | Data buffer too small |
| 211 | Virtual token not supported | 1104 | Virtual token is not a primary token |
| 272 | Invalid wrapped key | 1118 | Unsupported BLOB |
| 412 | Invalid checksum (software) | -101 | Random number too shortRandom number too short |
| 413 | Invalid Base64 format | -102 | Random number too longRandom number too long |
| 414 | Invalid checksum (HSM)Invalid checksum (HSM) | -103 | Random number check digit wrong |
| 510 | Invalid Digipass data pointer | -104 | Random number character not decimal |
| 701 | Invalid input buffer pointerInvalid Input Buffer Pointer | -310 | Reserved parameter wrong |
| 910 | Invalid command type in reply | -1501 | Memory allocation failed |
| 912 | HSM invalid BLOB status | | |