added fidocore

This commit is contained in:
merlokk 2018-11-17 16:19:09 +02:00
commit 8f1c67d512
6 changed files with 60 additions and 10 deletions

View file

@ -46,11 +46,10 @@
#include "crypto/libpcrypto.h"
#include "fido/additional_ca.h"
#include "fido/cbortools.h"
#include "fido/fidocore.h"
static int CmdHelp(const char *Cmd);
#define FIDO2_CMD_INFO 0x04
int FIDOSelect(bool ActivateField, bool LeaveFieldON, uint8_t *Result, size_t MaxResultLen, size_t *ResultLen, uint16_t *sw) {
uint8_t data[] = {0xA0, 0x00, 0x00, 0x06, 0x47, 0x2F, 0x00, 0x01};
@ -84,7 +83,7 @@ int FIDOAuthentication(uint8_t *params, uint8_t paramslen, uint8_t controlb, uin
}
int FIDO2GetInfo(uint8_t *Result, size_t MaxResultLen, size_t *ResultLen, uint16_t *sw) {
uint8_t data[] = {FIDO2_CMD_INFO};
uint8_t data[] = {fido2CmdGetInfo};
return FIDOExchange((sAPDU){0x80, 0x10, 0x00, 0x00, sizeof(data), data}, Result, MaxResultLen, ResultLen, sw);
}
@ -150,7 +149,7 @@ int CmdHFFidoInfo(const char *cmd) {
PrintAndLog("FIDO2 version: (%d)", len);
dump_buffer((const unsigned char *)buf, len, NULL, 0);
TinyCborPrintFIDOPackage(FIDO2_CMD_INFO, &buf[1], len - 1);
TinyCborPrintFIDOPackage(fido2CmdGetInfo, &buf[1], len - 1);
return 0;
}