This function is used to obtain information on a Secure Channel message (being a request message, a response message, or an information message). In case of success, the function will indicate the following:
Indication of the message protocol version
Indication of the message type
Indication of the message protection type
Indication if the message is encrypted or not
Indication if the message is signed (authenticity and integrity protection) or not
Indication of the serial number referenced into the message.
Parameters
Table: Parameters (AAL2GetMessageProperties)
Type
Name
Use
Description
aat_ascii *
Message
I
Hexadecimal character string containing a request message, a response message, or an information message. The string length must be a multiple of 2 with a maximum length of 1070 characters.
aat_int32 *
MessageProtocolVersion
0
Pointer on integer value; in output indicates the protocol version of the message.
If set to NULL the MessageProtocolVersion property cannot be retrieved.
aat_int32 *
MessageType
0
Pointer on integer value; in output indicates if the message is a request message, a response message, or an information message.
0x3: request message
0x23: response message
0x3F: response error message.
0x24: information message
If set to NULL the MessageType property cannot be retrieved.
aat_int32 *
MessageProtectionType
O
Pointer on integer value; in output indicates the protection type of the message.
0x00: Unprotected (neither encrypted nor signed)
0x01: Encrypted (AES-CTR 128 bits) and Signed (HMAC-SHA256)
0x11: Signed (HMAC-SHA256)
If set to NULL the MessageProtectionType property cannot be retrieved.
aat_int32 *
IsMessageEncrypted
O
Pointer on integer value; in output indicates if the message body is encrypted or not.
0: not encrypted
1: encrypted
If set to NULL the IsMessageEncrypted property cannot be retrieved.
aat_int32 *
IsMessageSigned
0
Pointer on integer value; in output indicates if the message is signed (authenticity and integrity protection) or not.
0: not signed
1: signed
If set to NULL the IsMessageSigned property cannot be retrieved.
aat_ascii [11]
MessageSerial
0
10 characters output string (+1 null terminator character) containing the serial number referenced into the message.
Return codes
Table: Return codes (AAL2GetMessageProperties)
Code
Meaning
Code
Meaning
0
Success
1343
Invalid information message length
1288
Invalid serial number prefix
1344
Invalid request message length
1289
Invalid serial number suffix
1345
Invalid request message protection type
1302
AES CTR encryption failed
1346
Invalid message response protection type
1337
Unsupported message protocol version
1347
Invalid information message protection type
1338
Unsupported message type
1354
Invalid request message type
1339
Invalid message length
1355
Invalid response message type
1340
Invalid message pointer
1360
Invalid information message type
1341
Message is not hexadecimal
1362
Invalid response message error length
1342
Invalid response message length
Cet article vous a-t-il été utile ?
Merci pour vos commentaires! Notre équipe vous répondra