add unpair apdu
This commit is contained in:
parent
f3c6c9b6b6
commit
073a0241cf
|
@ -84,6 +84,18 @@ app_err_t keycard_cmd_autopair(keycard_t* kc, const uint8_t* psk, pairing_t* pai
|
|||
return ERR_OK;
|
||||
}
|
||||
|
||||
app_err_t keycard_cmd_unpair(keycard_t* kc, uint8_t idx) {
|
||||
APDU_RESET(&kc->apdu);
|
||||
APDU_CLA(&kc->apdu) = 0x80;
|
||||
APDU_INS(&kc->apdu) = 0x13;
|
||||
APDU_P1(&kc->apdu) = idx;
|
||||
APDU_P2(&kc->apdu) = 0;
|
||||
|
||||
SC_BUF(data, 0);
|
||||
|
||||
return securechannel_send_apdu(&kc->sc, &kc->ch, &kc->apdu, data, 0);
|
||||
}
|
||||
|
||||
app_err_t keycard_cmd_verify_pin(keycard_t* kc, uint8_t* pin) {
|
||||
APDU_RESET(&kc->apdu);
|
||||
APDU_CLA(&kc->apdu) = 0x80;
|
||||
|
|
|
@ -13,6 +13,7 @@ typedef enum {
|
|||
app_err_t keycard_cmd_select(keycard_t* kc, const uint8_t* aid, uint32_t len);
|
||||
app_err_t keycard_cmd_pair(keycard_t* kc, uint8_t step, uint8_t* data);
|
||||
app_err_t keycard_cmd_autopair(keycard_t* kc, const uint8_t* psk, pairing_t* pairing);
|
||||
app_err_t keycard_cmd_unpair(keycard_t* kc, uint8_t idx);
|
||||
app_err_t keycard_cmd_verify_pin(keycard_t* kc, uint8_t* pin);
|
||||
app_err_t keycard_cmd_change_credential(keycard_t* kc, keycard_credentials_t type, uint8_t* credentials, uint8_t len);
|
||||
app_err_t keycard_cmd_unblock_pin(keycard_t* kc, uint8_t* pin, uint8_t* puk);
|
||||
|
|
Loading…
Reference in New Issue