@@ -413,13 +413,15 @@ USBD_StatusTypeDef USBD_LEDGER_HID_U2F_send_message(USBD_HandleTypeDef *pdev,
413
413
414
414
uint8_t cmd = 0 ;
415
415
const uint8_t * tx_buffer = message ;
416
- const uint8_t status [2 ] = {0x69 , 0x85 };
417
416
uint16_t tx_length = message_length ;
418
417
419
418
switch (packet_type ) {
420
419
case OS_IO_PACKET_TYPE_USB_U2F_HID_APDU :
421
420
cmd = U2F_COMMAND_MSG ;
421
+ // Cannot enable user presence handling in the OS, see OS issues/555 for more information
422
+ #ifndef HAVE_BOLOS
422
423
if ((message_length == 2 ) && (message [0 ] == 0xFF ) && (message [1 ] == 0xFF )) {
424
+ const uint8_t status [2 ] = {0x69 , 0x85 };
423
425
tx_buffer = status ;
424
426
handle -> user_presence = LEDGER_HID_U2F_USER_PRESENCE_ASKING ;
425
427
}
@@ -431,6 +433,7 @@ USBD_StatusTypeDef USBD_LEDGER_HID_U2F_send_message(USBD_HandleTypeDef *pdev,
431
433
return USBD_OK ;
432
434
}
433
435
}
436
+ #endif // !HAVE_BOLOS
434
437
break ;
435
438
436
439
case OS_IO_PACKET_TYPE_USB_U2F_HID_CBOR :
@@ -611,6 +614,8 @@ int32_t USBD_LEDGER_HID_U2F_data_ready(USBD_HandleTypeDef *pdev,
611
614
USBD_LEDGER_HID_U2F_send_message (
612
615
pdev , cookie , OS_IO_PACKET_TYPE_USB_U2F_HID_APDU , error_msg , 2 , 0 );
613
616
}
617
+ // Cannot enable user presence handling in the OS, see OS issues/555 for more information
618
+ #ifndef HAVE_BOLOS
614
619
else if (handle -> user_presence == LEDGER_HID_U2F_USER_PRESENCE_ASKING ) {
615
620
if (handle -> message_crc == crc ) {
616
621
error_msg [0 ] = 0x69 ;
@@ -636,6 +641,7 @@ int32_t USBD_LEDGER_HID_U2F_data_ready(USBD_HandleTypeDef *pdev,
636
641
}
637
642
handle -> user_presence = LEDGER_HID_U2F_USER_PRESENCE_IDLE ;
638
643
}
644
+ #endif // !HAVE_BOLOS
639
645
else if (max_length < handle -> transport_data .rx_message_length - 2 ) {
640
646
error_msg [1 ] = CTAP1_ERR_INVALID_LENGTH ;
641
647
USBD_LEDGER_HID_U2F_send_message (
0 commit comments