issue as yubikey5 #12

Closed
opened 2023-07-21 00:29:39 +08:00 by alessiol78 · 23 comments
alessiol78 commented 2023-07-21 00:29:39 +08:00 (Migrated from github.com)

I try release 5.4 as yubikey5 (fw patched with portal https://www.picokeys.com/pico-patcher/): pico_fido_pico-5.4.yubikey5.uf2
I have Win10 (10.0.19045 Build 19045) and I'm using YubiKey Manager 1.2.5. The FIDO2 work as passkey but when I try to use manager it see the key but the items showed in Applications menu are grey and Interfaces menu not work.
The app show a message: "Make sure the application has the required permissions" (I runned it as Administrator). In user mode the app not see the fidokey.
issue_yubikey5

I try release 5.4 as yubikey5 (fw patched with portal https://www.picokeys.com/pico-patcher/): pico_fido_pico-5.4.yubikey5.uf2 I have Win10 (10.0.19045 Build 19045) and I'm using YubiKey Manager 1.2.5. The FIDO2 work as passkey but when I try to use manager it see the key but the items showed in Applications menu are grey and Interfaces menu not work. The app show a message: "Make sure the application has the required permissions" (I runned it as Administrator). In user mode the app not see the fidokey. ![issue_yubikey5](https://github.com/polhenarejos/pico-fido/assets/37221001/e421437b-43a9-4377-83a3-99e236398ce1)
polhenarejos commented 2023-08-14 18:54:02 +08:00 (Migrated from github.com)

It seems you are not using latest firmware 5.4, as it shows 3.0.0. It should appear as
Captura de pantalla 2023-08-14 a les 12 53 53

It seems you are not using latest firmware 5.4, as it shows 3.0.0. It should appear as <img width="745" alt="Captura de pantalla 2023-08-14 a les 12 53 53" src="https://github.com/polhenarejos/pico-fido/assets/55573252/3ed03ec8-cc1b-440e-afc7-20daf7d5b92e">
mx03 commented 2023-08-15 19:49:07 +08:00 (Migrated from github.com)
I have the same issues. Used this release https://github.com/polhenarejos/pico-fido/releases/tag/v5.4 [pico_fido_pico-5.4.uf2](https://github.com/polhenarejos/pico-fido/releases/download/v5.4/pico_fido_pico-5.4.uf2) ![image](https://github.com/polhenarejos/pico-fido/assets/1390929/f72b13e6-ff69-4d5f-8d7e-f1e90a5bae90)
alessiol78 commented 2023-08-15 22:28:42 +08:00 (Migrated from github.com)

UPDATE: Using the key with Linux the firmware version is 5.4.0 but Yubico FIDO2 don't work. The OTP function work good. The same key in Windows report version 3.0.0 the OTP function don't work else FIDO2 work.

UPDATE: Using the key with Linux the firmware version is 5.4.0 but Yubico FIDO2 don't work. The OTP function work good. The same key in Windows report version 3.0.0 the OTP function don't work else FIDO2 work.
mx03 commented 2023-08-16 01:58:24 +08:00 (Migrated from github.com)

Just compiled the main branch PICO_SDK_PATH=../../pico-sdk cmake .. -DPICO_BOARD=pico -DUSB_VID=0x1234 -DUSB_PID=0x5678 -DUSB_VID=4176 -DUSB_PID=1031 && make and its also version 3.0.0 in yubikey manager.

Just compiled the main branch `PICO_SDK_PATH=../../pico-sdk cmake .. -DPICO_BOARD=pico -DUSB_VID=0x1234 -DUSB_PID=0x5678 -DUSB_VID=4176 -DUSB_PID=1031 && make` and its also version 3.0.0 in yubikey manager.
polhenarejos commented 2023-08-16 17:43:10 +08:00 (Migrated from github.com)

main branch contains frozen achievements.
Try using development branch and specify only 1 USB_VID and USB_PID (the ones that Yubikey 5 uses).

`main` branch contains frozen achievements. Try using `development` branch and specify only 1 USB_VID and USB_PID (the ones that Yubikey 5 uses).
mx03 commented 2023-08-16 18:44:27 +08:00 (Migrated from github.com)

tried the development branch PICO_SDK_PATH=../../pico-sdk cmake .. -DPICO_BOARD=pico -DUSB_VID=0x1050 -DUSB_PID=0x0407 && make with the correct vid and pid but still yubikey manager just show "yubikey firmware 3.0.0"

Can it make an difference because of using windows + yubikey manager?

tried the development branch `PICO_SDK_PATH=../../pico-sdk cmake .. -DPICO_BOARD=pico -DUSB_VID=0x1050 -DUSB_PID=0x0407 && make` with the correct vid and pid but still yubikey manager just show "yubikey firmware 3.0.0" Can it make an difference because of using windows + yubikey manager?
641i130 commented 2023-10-17 00:42:09 +08:00 (Migrated from github.com)

I'm also having this issue. Not sure if there's any other useful information I can provide besides the fact I'm using a Xiao Seeed.
I tried using it on both Windows and Linux.

Maybe the CLI is the correct way to solve this? Using ykman I see the device, but I haven't checked if I can configure it yet. I'll try that later today (if I don't update this, assume I tried it and it didn't solve anything).

I'm also having this issue. Not sure if there's any other useful information I can provide besides the fact I'm using a Xiao Seeed. I tried using it on both Windows and Linux. Maybe the CLI is the correct way to solve this? Using ykman I see the device, but I haven't checked if I can configure it yet. I'll try that later today (if I don't update this, assume I tried it and it didn't solve anything).
polhenarejos commented 2023-10-17 15:15:50 +08:00 (Migrated from github.com)

Which version do you use? I made lots of changes in version 5.6

Which version do you use? I made lots of changes in version 5.6
641i130 commented 2023-10-18 07:58:56 +08:00 (Migrated from github.com)

Most recent build. Maybe Yubico has caught on to people trying to spoof their products?

Most recent build. Maybe Yubico has caught on to people trying to spoof their products?
polhenarejos commented 2023-10-21 02:43:34 +08:00 (Migrated from github.com)

Firmwares should work on any RPi Pico. If it is detected by your host, it seems it is working.
My point is that I do not understand why version 3.0.0 is displayed, even if you are using firmware 5.6, which has hard-coded the version and 3.0.0 does not appear at any place. Actually, when I run Yubikey app it displays 5.6 and I can operate with it normally.

Try to use ykman and report here what opensc-tool -an shows.

Firmwares should work on any RPi Pico. If it is detected by your host, it seems it is working. My point is that I do not understand why version 3.0.0 is displayed, even if you are using firmware 5.6, which has hard-coded the version and 3.0.0 does not appear at any place. Actually, when I run Yubikey app it displays 5.6 and I can operate with it normally. Try to use ykman and report here what `opensc-tool -an` shows.
641i130 commented 2023-10-22 01:11:43 +08:00 (Migrated from github.com)

This is with the latest github pull with the same vid:pid as mx03 above. (The vid:pid patcher website does not work anymore, so this is hard coded with the cmake command for me).

On Windows 11 this is what happens for me:
image

# opensc-tool -an
Using reader with a card: Yubico YubiKey OTP+FIDO+CCID [Pico Key CCID Interface] (4150323833373205) 00 00
3b:fd:13:00:00:81:31:fe:15:80:73:c0:21:c0:57:59:75:62:69:4b:65:79:40
Unsupported card
# lsusb
Bus 003 Device 019: ID 1050:0407 Yubico.com Yubikey 4/5 OTP+U2F+CCID
# ykman info
Device type: YubiKey 5 NFC
Serial number: 875640064
Firmware version: 5.6.0
Form factor: Keychain (USB-A)
Enabled USB interfaces: OTP, FIDO, CCID
NFC transport is disabled.

Applications
OTP         	Enabled
FIDO U2F    	Enabled
FIDO2       	Enabled
OATH        	Enabled
PIV         	Not available
OpenPGP     	Not available
YubiHSM Auth	Not available

My guess is its a windows related issue... (Latest Yubi Manager as well)

Trying to enable all modes on USB resulted in this odd bug:

# ykman config usb --enable-all
USB configuration changes:
  Enable OTP|U2F|FIDO2|OATH
Proceed? [y/N]: y

# ykman info
WARNING: Failed opening device
WARNING: Failed opening device
Device type: YubiKey
Firmware version: 3.0.0
Form factor: Keychain (USB-A)
Enabled USB interfaces: OTP, FIDO, CCID

Applications
OTP         	Not available
FIDO U2F    	Enabled
FIDO2       	Not available
OATH        	Not available
PIV         	Not available
OpenPGP     	Not available
YubiHSM Auth	Not available

Ok this issue seems to be more weird than I thought, let me try and document all the steps I took to get it to appear as 3.0 firmware.
In order, I flashed the device using the newest firmware and it showed as 5. This is the info at the top. The Windows tool was what I tried next. Then I tried doing config usb enable all, and it changed the mode to 3.0.0. I then tried to flash it again hoping to get it back into firmware version 5, but it's stuck on 3 now. I guess the way I interacted with it caused my computer to read it in a way that caused this. My goal is to get challenge-response working, but I get this weird issue outlined in #19

I'd love to help debug this if more assistance is needed, feel free to contact me here:
@caret:m.sif.moe -> Matrix
or Discord @caretchara

This is with the latest github pull with the same vid:pid as mx03 above. (The vid:pid patcher website does not work anymore, so this is hard coded with the cmake command for me). On Windows 11 this is what happens for me: ![image](https://github.com/polhenarejos/pico-fido/assets/46945263/30679781-f20b-45a8-a159-96d5c0e459be) ```bash # opensc-tool -an Using reader with a card: Yubico YubiKey OTP+FIDO+CCID [Pico Key CCID Interface] (4150323833373205) 00 00 3b:fd:13:00:00:81:31:fe:15:80:73:c0:21:c0:57:59:75:62:69:4b:65:79:40 Unsupported card ``` ```bash # lsusb Bus 003 Device 019: ID 1050:0407 Yubico.com Yubikey 4/5 OTP+U2F+CCID ``` ```bash # ykman info Device type: YubiKey 5 NFC Serial number: 875640064 Firmware version: 5.6.0 Form factor: Keychain (USB-A) Enabled USB interfaces: OTP, FIDO, CCID NFC transport is disabled. Applications OTP Enabled FIDO U2F Enabled FIDO2 Enabled OATH Enabled PIV Not available OpenPGP Not available YubiHSM Auth Not available ``` My guess is its a windows related issue... (Latest Yubi Manager as well) Trying to enable all modes on USB resulted in this odd bug: ```bash # ykman config usb --enable-all USB configuration changes: Enable OTP|U2F|FIDO2|OATH Proceed? [y/N]: y # ykman info WARNING: Failed opening device WARNING: Failed opening device Device type: YubiKey Firmware version: 3.0.0 Form factor: Keychain (USB-A) Enabled USB interfaces: OTP, FIDO, CCID Applications OTP Not available FIDO U2F Enabled FIDO2 Not available OATH Not available PIV Not available OpenPGP Not available YubiHSM Auth Not available ``` --- Ok this issue seems to be more weird than I thought, let me try and document all the steps I took to get it to appear as 3.0 firmware. In order, I flashed the device using the newest firmware and it showed as 5. This is the info at the top. The Windows tool was what I tried next. Then I tried doing config usb enable all, and it changed the mode to 3.0.0. I then tried to flash it again hoping to get it back into firmware version 5, but it's stuck on 3 now. I guess the way I interacted with it caused my computer to read it in a way that caused this. My goal is to get challenge-response working, but I get this weird issue outlined in #19 I'd love to help debug this if more assistance is needed, feel free to contact me here: ``@caret:m.sif.moe`` -> Matrix or Discord @caretchara
polhenarejos commented 2023-10-24 19:29:01 +08:00 (Migrated from github.com)

I got the same in Windows. Strangely, Windows does not send GetFeature reports.

If you use ykman -l TRAFFIC list probably you will get a WinError 1: Incorrect function.

Analyzing with Wireshark, Windows does not even send GetFeature packet. Do not know why. Probably needs an additional parameter in the USB Descriptor.

I got the same in Windows. Strangely, Windows does not send GetFeature reports. If you use `ykman -l TRAFFIC list` probably you will get a WinError 1: Incorrect function. Analyzing with Wireshark, Windows does not even send GetFeature packet. Do not know why. Probably needs an additional parameter in the USB Descriptor.
polhenarejos commented 2023-10-24 21:31:26 +08:00 (Migrated from github.com)

If some of you has a Yubi4/5, lusb -vvv will be very helpful.

If some of you has a Yubi4/5, `lusb -vvv` will be very helpful.
641i130 commented 2023-10-25 08:55:56 +08:00 (Migrated from github.com)

The one I ordered just came today!

lsusb -v -d 1050:0407

Bus 003 Device 009: ID 1050:0407 Yubico.com Yubikey 4/5 OTP+U2F+CCID
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x1050 Yubico.com
  idProduct          0x0407 Yubikey 4/5 OTP+U2F+CCID
  bcdDevice            5.43
  iManufacturer           1 Yubico
  iProduct                2 YubiKey OTP+FIDO+CCID
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0096
    bNumInterfaces          3
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower               30mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      71
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              10
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      34
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               2
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               2
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass        11 Chip/SmartCard
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      ChipCard Interface Descriptor:
        bLength                54
        bDescriptorType        33
        bcdCCID              1.00
        nMaxSlotIndex           0
        bVoltageSupport         7  5.0V 3.0V 1.8V 
        dwProtocols             2  T=1
        dwDefaultClock       4000
        dwMaxiumumClock      4000
        bNumClockSupported      0
        dwDataRate         307200 bps
        dwMaxDataRate      307200 bps
        bNumDataRatesSupp.      0
        dwMaxIFSD            3062
        dwSyncProtocols  00000000 
        dwMechanical     00000000 
        dwFeatures       000400FE
          Auto configuration based on ATR
          Auto activation on insert
          Auto voltage selection
          Auto clock change
          Auto baud rate change
          Auto parameter negotiation made by CCID
          Short and extended APDU level exchange
        dwMaxCCIDMsgLen      3072
        bClassGetResponse    echo
        bClassEnvelope       echo
        wlcdLayout           none
        bPINSupport             0 
        bMaxCCIDBusySlots       1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              32
Device Status:     0x0000
  (Bus Powered)
The one I ordered just came today! ``` lsusb -v -d 1050:0407 Bus 003 Device 009: ID 1050:0407 Yubico.com Yubikey 4/5 OTP+U2F+CCID Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x1050 Yubico.com idProduct 0x0407 Yubikey 4/5 OTP+U2F+CCID bcdDevice 5.43 iManufacturer 1 Yubico iProduct 2 YubiKey OTP+FIDO+CCID iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x0096 bNumInterfaces 3 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 30mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 1 Boot Interface Subclass bInterfaceProtocol 1 Keyboard iInterface 0 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.10 bCountryCode 0 Not supported bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 71 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 10 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 0 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.10 bCountryCode 0 Not supported bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 34 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x04 EP 4 OUT bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 2 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x84 EP 4 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 2 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 11 Chip/SmartCard bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 0 ChipCard Interface Descriptor: bLength 54 bDescriptorType 33 bcdCCID 1.00 nMaxSlotIndex 0 bVoltageSupport 7 5.0V 3.0V 1.8V dwProtocols 2 T=1 dwDefaultClock 4000 dwMaxiumumClock 4000 bNumClockSupported 0 dwDataRate 307200 bps dwMaxDataRate 307200 bps bNumDataRatesSupp. 0 dwMaxIFSD 3062 dwSyncProtocols 00000000 dwMechanical 00000000 dwFeatures 000400FE Auto configuration based on ATR Auto activation on insert Auto voltage selection Auto clock change Auto baud rate change Auto parameter negotiation made by CCID Short and extended APDU level exchange dwMaxCCIDMsgLen 3072 bClassGetResponse echo bClassEnvelope echo wlcdLayout none bPINSupport 0 bMaxCCIDBusySlots 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 32 Device Status: 0x0000 (Bus Powered) ```
polhenarejos commented 2023-10-25 21:29:40 +08:00 (Migrated from github.com)

Found the bug.

TinyUSB in Pico SDK does not set the FEATURE report for keyboard HID. Windows expects a value for FEATURE report to set the FeatureByteLength, which is 0 by default. When YKMAN asks for a 9-bytes of FEATURE report, Windows detects a mismatch between the request length (9) and the actual FeatureByteLength (0) and raises an exception.

I figured out how to inject the FEATURE report to HID descriptor and it works now on Windows. Hope it will not break anything in Linux/macOS.

Found the bug. TinyUSB in Pico SDK does not set the FEATURE report for keyboard HID. Windows expects a value for FEATURE report to set the FeatureByteLength, which is 0 by default. When YKMAN asks for a 9-bytes of FEATURE report, Windows detects a mismatch between the request length (9) and the actual FeatureByteLength (0) and raises an exception. I figured out how to inject the FEATURE report to HID descriptor and it works now on Windows. Hope it will not break anything in Linux/macOS.
polhenarejos commented 2023-10-26 00:01:25 +08:00 (Migrated from github.com)

@641i130
What opensc-tool -an reports?

@641i130 What `opensc-tool -an` reports?
641i130 commented 2023-10-26 01:50:10 +08:00 (Migrated from github.com)

With the Yubikey or the pico-fido? Did you update the development branch or main branch?

With the Yubikey or the pico-fido? Did you update the development branch or main branch?
polhenarejos commented 2023-10-26 05:30:41 +08:00 (Migrated from github.com)

With the Yubikey. I managed to make it work with Yubikey Manager and YKMAN but it does not with Yubikey Authenticator. As soon I get it fixed I'll push the changes to dev branch.

With the Yubikey. I managed to make it work with Yubikey Manager and YKMAN but it does not with Yubikey Authenticator. As soon I get it fixed I'll push the changes to dev branch.
641i130 commented 2023-10-26 08:35:01 +08:00 (Migrated from github.com)

I'll do it for 2 keys:
Key 1:

# opensc-tool -an -v
Using reader with a card: Yubico YubiKey OTP+FIDO+CCID 00 00
Card ATR:
3B FD 13 00 00 81 31 FE 15 80 73 C0 21 C0 57 59 ;.....1...s.!.WY
75 62 69 4B 65 79 40                            ubiKey@
Connecting to card in reader Yubico YubiKey OTP+FIDO+CCID 00 00...
Using card driver Personal Identity Verification Card.
Card name: Personal Identity Verification Card

Key 2:

# opensc-tool -an -v
Using reader with a card: Yubico YubiKey OTP+FIDO+CCID 00 00
Card ATR:
3B FD 13 00 00 81 31 FE 15 80 73 C0 21 C0 57 59 ;.....1...s.!.WY
75 62 69 4B 65 79 40                            ubiKey@
Connecting to card in reader Yubico YubiKey OTP+FIDO+CCID 00 00...
Using card driver Personal Identity Verification Card.
Card name: Personal Identity Verification Card

Oh, haha they're not different keys...

I'll do it for 2 keys: Key 1: ``` # opensc-tool -an -v Using reader with a card: Yubico YubiKey OTP+FIDO+CCID 00 00 Card ATR: 3B FD 13 00 00 81 31 FE 15 80 73 C0 21 C0 57 59 ;.....1...s.!.WY 75 62 69 4B 65 79 40 ubiKey@ Connecting to card in reader Yubico YubiKey OTP+FIDO+CCID 00 00... Using card driver Personal Identity Verification Card. Card name: Personal Identity Verification Card ``` Key 2: ``` # opensc-tool -an -v Using reader with a card: Yubico YubiKey OTP+FIDO+CCID 00 00 Card ATR: 3B FD 13 00 00 81 31 FE 15 80 73 C0 21 C0 57 59 ;.....1...s.!.WY 75 62 69 4B 65 79 40 ubiKey@ Connecting to card in reader Yubico YubiKey OTP+FIDO+CCID 00 00... Using card driver Personal Identity Verification Card. Card name: Personal Identity Verification Card ``` Oh, haha they're not different keys...
polhenarejos commented 2023-10-29 03:00:58 +08:00 (Migrated from github.com)

Pushed latest changes. It should work in Windows too.

Pushed latest changes. It should work in Windows too.
641i130 commented 2023-10-30 02:39:11 +08:00 (Migrated from github.com)
make
[  1%] Built target bs2_default
[  2%] Built target bs2_default_padded_checksummed_asm
[  3%] Performing build step for 'ELF2UF2Build'
[100%] Built target elf2uf2
[  3%] No install step for 'ELF2UF2Build'
[  3%] Completed 'ELF2UF2Build'
[  6%] Built target ELF2UF2Build
[  7%] Building C object CMakeFiles/pico_fido.dir/src/fido/fido.c.obj
/pico-fido/src/fido/fido.c: In function 'fido_ctor':
/pico-fido/src/fido/fido.c:70:18: error: passing argument 1 of 'register
_app' from incompatible pointer type [-Werror=incompatible-pointer-types]
   70 |     register_app(fido_select, fido_aid);
      |                  ^~~~~~~~~~~
      |                  |
      |                  int (*)(app_t *) {aka int (*)(struct app *)}
In file included from /pico-fido/src/fido/fido.c:20:
/pico-fido/pico-hsm-sdk/src/apdu.h:35:25: note: expected 'app_t * (*)(ap
p_t *, const uint8_t *, uint8_t)' {aka 'struct app * (*)(struct app *, const unsigned 
char *, unsigned char)'} but argument is of type 'int (*)(app_t *)' {aka 'int (*)(stru
ct app *)'}
   35 | extern int register_app(app_t *(*)(app_t *, const uint8_t *, uint8_t));
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/pico-fido/src/fido/fido.c:70:5: error: too many arguments to function 
register_app'
   70 |     register_app(fido_select, fido_aid);
      |     ^~~~~~~~~~~~
/pico-fido/pico-hsm-sdk/src/apdu.h:35:12: note: declared here
   35 | extern int register_app(app_t *(*)(app_t *, const uint8_t *, uint8_t));
      |            ^~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/pico_fido.dir/build.make:76: CMakeFiles/pico_fido.dir/src/fid
o/fido.c.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:1509: CMakeFiles/pico_fido.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Most recent pull of development.

```c make [ 1%] Built target bs2_default [ 2%] Built target bs2_default_padded_checksummed_asm [ 3%] Performing build step for 'ELF2UF2Build' [100%] Built target elf2uf2 [ 3%] No install step for 'ELF2UF2Build' [ 3%] Completed 'ELF2UF2Build' [ 6%] Built target ELF2UF2Build [ 7%] Building C object CMakeFiles/pico_fido.dir/src/fido/fido.c.obj /pico-fido/src/fido/fido.c: In function 'fido_ctor': /pico-fido/src/fido/fido.c:70:18: error: passing argument 1 of 'register _app' from incompatible pointer type [-Werror=incompatible-pointer-types] 70 | register_app(fido_select, fido_aid); | ^~~~~~~~~~~ | | | int (*)(app_t *) {aka int (*)(struct app *)} In file included from /pico-fido/src/fido/fido.c:20: /pico-fido/pico-hsm-sdk/src/apdu.h:35:25: note: expected 'app_t * (*)(ap p_t *, const uint8_t *, uint8_t)' {aka 'struct app * (*)(struct app *, const unsigned char *, unsigned char)'} but argument is of type 'int (*)(app_t *)' {aka 'int (*)(stru ct app *)'} 35 | extern int register_app(app_t *(*)(app_t *, const uint8_t *, uint8_t)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /pico-fido/src/fido/fido.c:70:5: error: too many arguments to function register_app' 70 | register_app(fido_select, fido_aid); | ^~~~~~~~~~~~ /pico-fido/pico-hsm-sdk/src/apdu.h:35:12: note: declared here 35 | extern int register_app(app_t *(*)(app_t *, const uint8_t *, uint8_t)); | ^~~~~~~~~~~~ cc1: all warnings being treated as errors make[2]: *** [CMakeFiles/pico_fido.dir/build.make:76: CMakeFiles/pico_fido.dir/src/fid o/fido.c.obj] Error 1 make[1]: *** [CMakeFiles/Makefile2:1509: CMakeFiles/pico_fido.dir/all] Error 2 make: *** [Makefile:91: all] Error 2 ``` Most recent pull of `development`.
polhenarejos commented 2023-10-30 15:23:15 +08:00 (Migrated from github.com)

You have to update pico-hsm-sdk submodule too.

You have to update `pico-hsm-sdk` submodule too.
641i130 commented 2023-10-31 08:20:18 +08:00 (Migrated from github.com)

image

I'm able to configure it correctly and detect it in Windows 11.
I think this issue can be closed then!

![image](https://github.com/polhenarejos/pico-fido/assets/46945263/a4fc317d-19bd-4d0a-aec4-22bb86b32c60) I'm able to configure it correctly and detect it in Windows 11. I think this issue can be closed then!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dearsky/pico-fido#12