Function prototype
aat_int32 AAL2ProcGenActivationDataRndKeyRpl (
aat_byte *InReply,
aat_int32 ReplySize,
TDigipassBlob *DPData [8],
aat_ascii *aSerialNumberSuffixOut,
aat_ascii *aXFADOut,
aat_ascii *aXERCOut);
Description
This function processes a reply from the HSM after to a command generated with the AAL2GenGenActivationDataRndKeyCmd function.
The software Digipass activation data with random key generation on the HSM is the same functionality as available with the Authentication Suite Server SDK Software Digipass Activation Service. For information on the associated function (AAL2GenActivationDataRndKey), refer to the Authentication Suite Server SDKC-C++ Programmer's Guide.
- The generated [encrypted] activation code (or [X]FAD) will be related to the new software Digipass key, and the authenticator application BLOBs will be updated with the new software Digipass key.
- Buffers must be mandatorily allocated for aSerialNumberSuffixOut, aXFADOut, and aXERCOut.
- This function serializes an important amount of data. The InReply buffer must be allocated with a sufficient size. For more information about the allocation of the Cmd and InReply buffers, refer to Cmd and InReply buffers allocation.
Parameters
Table: Parameters (AAL2ProcGenActivationDataRndKeyRpl) | Type | Name | Use | Description |
|---|
| aat_byte * | InReply | I | Up to 5845 bytes that contain the GENERATE ACTIVATION DATA RND KEY command type and the output data from the generate activation data random key function on the HSM: - Command type - 2 bytes
- An authenticator application BLOB - 192 bytes (x 1 to 8)
- Application count - 4 bytes
- Return code - 4 bytes
- Serial number suffix - up to 14 characters
- Activation code or [X]FAD - up to 4142 characters
- Event reactivation counter - up to 91 characters
Plus 52 bytes Authentication Suite Server SDK internal use. |
| aat_int32 | ReplySize | I | The length of the InReply message. |
| TDigipassBlob * [8] | DPData | O | Array of authenticator application BLOB pointers. Upon return from the function call, this BLOB must be rewritten to the application database to reflect changes. |
| aat_ascii * | aSerialNumberSuffixOut | O | String of up to 14+1 null-terminated digits representing the last 7 digits of the Digipass serial number. 14+1 null-terminated digits in case of software Digipass authenticators based on the Digipass SDK prior to version 4.0 (SN- suffix formatted with inserted 0). 7+1 null-terminated digits in case of software Digipass authenticators based on the Digipass SDK 4.0 or higher. The aSerialNumberSuffixOut buffer must have at least 15 bytes allocated. |
| aat_ascii * | aXFADOut | O | String of up to 4142+1 characters, null-terminated. This parameter holds either the [encrypted] activation code (in case of offline mode) or the [encrypted] full activation data ([X]FAD) (in case of online mode). The aXFAD buffer must have at least 4143 bytes allocated. |
| aat_ascii * | aXERCOut | O | String of up to 91+1 characters, null-terminated. This parameter holds either the event reactivation counter (ERC) (if both the SharedData and Alea parameters are set to NULL in the cmd function) or the encrypted event reactivation counter (XERC) (if the SharedData and/or Alea parameters are not set to NULL in the cmd function). The aXERCOut buffer must have at least 92 bytes allocated. |
Return codes
Table: Return codes (AAL2ProcGenActivationDataRndKeyRpl) | Code | Meaning | Code | Meaning |
|---|
| 0 | Success | 573 | Serial number suffix not decimal |
| 147 | Invalid ActivationCode pointer | 574 | Invalid serial number prefix in SV |
| 164 | Invalid serial number suffix pointer | 575 | Invalid event reactivation counter pointer |
| 272 | Invalid wrapped key | 576 | Digipass data does not match with SV |
| 412 | Invalid checksum (software) | 577 | HSM random generation failed |
| 413 | Invalid Base64 format | 579 | Alea or shared data not allowed |
| 414 | Invalid checksum (HSM) | 701 | Invalid input buffer pointer |
| 510 | Invalid Digipass data pointer | 807 | Serial number not equal |
| 543 | Activation code generation not supported | 808 | Invalid application count value |
| 545 | Invalid static vector length | 910 | Invalid HSM command in reply |
| 546 | Invalid Activation Code format | 912 | HSM invalid BLOB status |
| 547 | Alea is too long | 913 | Invalid HSM key property |
| 548 | Shared data too long | 951 | Invalid HSM key type for HSM decryption |
| 549 | Alea + shared data too long | 1009 | Invalid TLV total length |
| 567 | Invalid activation flags value | 1018 | Invalid TLV item pointer |
| 568 | Invalid DP+ application in Digipass data | 1019 | Missing mandatory TLV item |
| 569 | Invalid application name in Digipass data | 1025 | Data buffer too small |
| 570 | Invalid static vector version | 1103 | Unlock Version 2 not supported |
| 571 | Invalid application index in static vector | 1118 | Unsupported BLOB |
| 572 | Missing application key type in static vector | -1501 | Memory allocation failed |