--- title: "AAL2ProcProcMessageResponseRpl" slug: "a3s-cppprg-hsm-aal2procprocmessageresponserpl-4-0" updated: 2026-11-11T09:54:58Z published: 2026-11-11T09:54:58Z canonical: "docs.onespan.com/a3s-cppprg-hsm-aal2procprocmessageresponserpl-4-0" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.onespan.com/llms.txt > Use this file to discover all available pages before exploring further. # AAL2ProcProcMessageResponseRpl ## Function Prototype ```cpp aat_int32 AAL2ProcProcMessageResponseRpl( aat_byte *InReply, aat_int32 ReplySize, aat_ascii *ResponseBody, aat_int32 *ResponseBodyLength); ``` ## Description This function processes a reply from the HSM to a response message processing command which has been generated with AAL2GenProcMessageResponseCmd. > If the response message was correctly processed and contains a Secure Channel request error that is detected by the device, the return code is dependent on the Secure Channel request error code byte (return code = offset + code byte with offset = 5000). See the list of return codes in [Table: Return codes (AAL2ProcProcMessageResponseRpl)](/secsdks/docs/a3s-cppprg-hsm-aal2procprocmessageresponserpl-4-0#Return_codes_AAL2ProcProcMessageResponseRpl) for more details. The response message processing on the HSM is identical to the functionality available with the Authentication Suite Server SDK Software Digipass Secure Channel Service. For information on the associated functions, refer to the Authentication Suite Server SDK C-C++ Programmer's Guide. > 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](/secsdks/docs/a3s-cppprg-hsm-important-notes-4-0#cmd-and-inreply-buffers-allocation). ## Parameters | Type | Name | Use | Description | | --- | --- | --- | --- | | aat_byte * | InReply | I | Up to 1046 bytes that contain the RESPONSE MESSAGE PROCESSING command type and the output data from the response message processing function on the HSM: - Command type - 2 bytes - Response Body - 1024 characters - Response Body Length - 4 bytes - Return code - 4 bytes Plus 12 bytes for Authentication Suite Server SDK internal use. | | aat_int32 | ReplySize | I | The length of the InReply message. | | aat_ascii * | ResponseBody | O | String of up to 1024+1 hexadecimal characters, null-terminated. In case of a successful operation, this parameter contains the clear response body extracted from the ResponseMessage. | | aat_int32 * | ResponseBodyLength | I/O | In input, this parameter must indicate the size of the allocated buffer for the ResponseBody parameter (recommended are 1025 bytes). In output, this parameter indicates the length of the RequestBody string (without the null-terminated character). | ## Return codes | Code | Meaning | Code | Meaning | | --- | --- | --- | --- | | 0 | Success | 1346 | Invalid message response protection type | | 701 | Invalid input buffer pointer | 1349 | Invalid response body pointer | | 910 | Invalid HSM command in reply | 1350 | Invalid response body length pointer | | 913 | Invalid HSM key property | 1351 | Response body buffer too small | | 917 | Key type inconsistent | 1352 | Nonces are not equal | | 951 | Invalid HSM key type for HSM decryption | 1353 | Payload key BLOB is mandatory | | 1009 | Invalid TLV total length | 1354 | Invalid request message type | | 1018 | Invalid TLV item pointer | 1355 | Invalid response message type | | 1019 | Missing mandatory TLV item | 1361 | Invalid authentication tag | | 1025 | Buffer too small | 1362 | Invalid message response error length | | 1285 | Master key derivation failed | 5001[[1]](/secsdks/docs/a3s-cppprg-hsm-aal2procprocmessageresponserpl-4-0#Cite_1) | Unsupported request message protocol version | | 1288 | Invalid serial number prefix | 5002[[1]](/secsdks/docs/a3s-cppprg-hsm-aal2procprocmessageresponserpl-4-0#Cite_1) | Unsupported request message type | | 1289 | Invalid serial number suffix | 5003[[1]](/secsdks/docs/a3s-cppprg-hsm-aal2procprocmessageresponserpl-4-0#Cite_1) | Unsupported request message protection type | | 1302 | AES CTR encryption failed | 5004[[1]](/secsdks/docs/a3s-cppprg-hsm-aal2procprocmessageresponserpl-4-0#Cite_1) | Invalid request message length | | 1342 | Invalid response message length | 5005[[1]](/secsdks/docs/a3s-cppprg-hsm-aal2procprocmessageresponserpl-4-0#Cite_1) | Invalid request message; character not hexadecimal | | 1344 | Invalid request message length | 5006[[1]](/secsdks/docs/a3s-cppprg-hsm-aal2procprocmessageresponserpl-4-0#Cite_1) | Incorrect serial number in the request message | | 1345 | Invalid request message protection type | 5007[[1]](/secsdks/docs/a3s-cppprg-hsm-aal2procprocmessageresponserpl-4-0#Cite_1) | Invalid authentication tag in the request message | 1. Specific request error message codes