Get History
Introduction
The Get History administrative command allows you to access a record of operations or transactions performed by the device. This feature is essential for monitoring and auditing purposes, enabling administrators to review past activities, ensure compliance with security protocols, and identify any unauthorized actions. By providing a detailed history of device interactions, this command aids in maintaining the integrity and security of the system.
Command specifications
Get History Command
The Get History administrative command allows you to access a record of operations or transactions performed by the device.
The following code snippet outlines the Python object for this command:
def get_history(pin: str) -> NamedTuple:
card.verify_pin(pin)
return card.history()
For example,
history = get_history("1234")
print(history)
Application Protocol Data Unit (APDU) Components
The following table outlines the components of the Application Protocol Data Unit (APDU).
Prerequisites:
- The secure channel must be open.
- PIN or challenge-response must be validated.
- The data is provided in the signing history slot number "P1" (0-148).
- Signing counter (4 bytes, big endian).
- Hashed data signed (32 bytes).
Field | Description | Value |
---|---|---|
CLA | This field specifies the class of the instruction. | 0x80 |
INS | This field specifies the particular command or operation that the smart card or secure element should execute. | 0xFB |
P1 | First parameter of the instruction that specifies the details about the operation being requested. | History slot number (starts at 0 and ends at 148). See the table below for more information. |
P2 | First parameter of the instruction that specifies additional details about the operation being requested. | 0x00 |
Data | Key data | None |
Response
The following table outlines the possible responses that you will receive:
Response Code | Description |
---|---|
0x9000 | Success |
0x6985 |
|
0x6A80 | Path is incorrectly formed. |
0x6A86 | P1 is invalid. |
Updated 4 months ago