11.12.3.4.126. Function Se05x_API_SetLockState¶
Defined in File se05x_APDU_apis.h
11.12.3.4.126.1. Function Documentation¶
-
smStatus_t
Se05x_API_SetLockState
(pSe05xSession_t session_ctx, uint8_t lockIndicator, uint8_t lockState)¶ Se05x_API_SetLockState
Sets the applet transport lock (locked or unlocked). There is a Persistent lock and a Transient Lock. If the Persistent lock is UNLOCKED, the device is unlocked (regardless of the Transient lock). If the Persistent lock is LOCKED, the device is only unlocked when the Transient lock is UNLOCKED and the device will be locked again after deselect of the applet.
Note that regardless of the lock state, the credential RESERVED_ID_TRANSPORT allows access to all features. For example, it is possible to write/update objects within the session opened by RESERVED_ID_TRANSPORT, even if the applet is locked.
The default TRANSIENT_LOCK state is LOCKED; there is no default PERSISTENT_LOCK state (depends on product configuration).
This command can only be used in a session that used the credential with identifier RESERVED_ID_TRANSPORT as authentication object.
PERSISTENT_LOCK
TRANSIENT_LOCK
Behavior
UNLOCKED
UNLOCKED
Unlocked until PERSISTENT_LOCK set to LOCKED.
UNLOCKED
LOCKED
Unlocked until PERSISTENT_LOCK set to LOCKED.
LOCKED
UNLOCKED
Unlocked until deselect or TRANSIENT_LOCK set to LOCKED.
LOCKED
LOCKED
Locked until PERSISTENT_LOCK set to UNLOCKED.
Command to Applet
Field
Value
Description
CLA
0x80
INS
INS_MGMT
See
SE05x_INS_t
P1
P1_DEFAULT
See
SE05x_P1_t
P2
P2_TRANSPORT
See
SE05x_P2_t
Lc
#(Payload)
Payload
TLV[TAG_1]
1-byte
LockIndicatorRef
TLV[TAG_2]
1-byte
LockStateRef
Le
R-APDU Body
NA
R-APDU Trailer
SW
Description
SW_NO_ERROR
The command is handled successfully.
- Parameters
[in] session_ctx
: Session Context [0:kSE05x_pSession][in] lockIndicator
: lock indicator [1:kSE05x_TAG_1][in] lockState
: lock state [2:kSE05x_TAG_2]