Use get_version_major and get_version_minor as pointers.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -54,6 +54,13 @@ const uint8_t atr_fido[] = {
|
|||||||
0x75, 0x62, 0x69, 0x4b, 0x65, 0x79, 0x40
|
0x75, 0x62, 0x69, 0x4b, 0x65, 0x79, 0x40
|
||||||
};
|
};
|
||||||
|
|
||||||
|
uint8_t fido_get_version_major() {
|
||||||
|
return PICO_FIDO_VERSION_MAJOR;
|
||||||
|
}
|
||||||
|
uint8_t fido_get_version_minor() {
|
||||||
|
return PICO_FIDO_VERSION_MINOR;
|
||||||
|
}
|
||||||
|
|
||||||
int fido_select(app_t *a) {
|
int fido_select(app_t *a) {
|
||||||
if (cap_supported(CAP_FIDO2)) {
|
if (cap_supported(CAP_FIDO2)) {
|
||||||
a->process_apdu = fido_process_apdu;
|
a->process_apdu = fido_process_apdu;
|
||||||
@@ -63,24 +70,22 @@ int fido_select(app_t *a) {
|
|||||||
return CCID_ERR_FILE_NOT_FOUND;
|
return CCID_ERR_FILE_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern uint8_t (*get_version_major)();
|
||||||
|
extern uint8_t (*get_version_minor)();
|
||||||
|
|
||||||
void __attribute__((constructor)) fido_ctor() {
|
void __attribute__((constructor)) fido_ctor() {
|
||||||
#if defined(USB_ITF_CCID) || defined(ENABLE_EMULATION)
|
#if defined(USB_ITF_CCID) || defined(ENABLE_EMULATION)
|
||||||
ccid_atr = atr_fido;
|
ccid_atr = atr_fido;
|
||||||
#endif
|
#endif
|
||||||
register_app(fido_select, fido_aid);
|
register_app(fido_select, fido_aid);
|
||||||
|
get_version_major = fido_get_version_major;
|
||||||
|
get_version_minor = fido_get_version_minor;
|
||||||
}
|
}
|
||||||
|
|
||||||
int fido_unload() {
|
int fido_unload() {
|
||||||
return CCID_OK;
|
return CCID_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t get_version_major() {
|
|
||||||
return PICO_FIDO_VERSION_MAJOR;
|
|
||||||
}
|
|
||||||
uint8_t get_version_minor() {
|
|
||||||
return PICO_FIDO_VERSION_MINOR;
|
|
||||||
}
|
|
||||||
|
|
||||||
mbedtls_ecp_group_id fido_curve_to_mbedtls(int curve) {
|
mbedtls_ecp_group_id fido_curve_to_mbedtls(int curve) {
|
||||||
if (curve == FIDO2_CURVE_P256) {
|
if (curve == FIDO2_CURVE_P256) {
|
||||||
return MBEDTLS_ECP_DP_SECP256R1;
|
return MBEDTLS_ECP_DP_SECP256R1;
|
||||||
|
|||||||
Reference in New Issue
Block a user