BryanJacobs / FIDO2Applet

FIDO2 Javacard Applet
MIT License
63 stars 12 forks source link

GetAssertion fails with CBOR_UNEXPECTED_TYPE if "transports" is set in PublicKeyCredentialDescriptor #13

Closed StarGate01 closed 7 months ago

StarGate01 commented 7 months ago

If the optional "transports" key is set in on of the PublicKeyCredentialDescriptors in the allowList of authenticatorGetAssertion , the consumeMapAndGetID fails.

Stacktrace:

FIDO2Applet.consumeMapAndGetID(APDU,byte[],short,short,boolean,boolean,boolean,boolean) (FIDO2Applet.java:3401)
FIDO2Applet.getAssertion(APDU,short,byte[],short) (FIDO2Applet.java:2134)
FIDO2Applet.process(APDU) (FIDO2Applet.java:3646)

Example CBOR:

{
    1: "demo.yubico.com",
    2: h'f30fe8c6c1d50a207511523fa63402c144de5d981a340b9e8cd88db6af8c3312',
    3: [
        {
            "id": h'0847d61f95f2b5fa7743510d61401c3379c4a2cffe8b108cd35be7aba52e991ec759309db9ddc6407c09ddf6dba3e189ef0e0ee617c0f9d98c24ee6676b11a773fc52955a836d423df2ae4a5c4d1e7761632a01316c821ca5213f2ef922649ea010a7b7a3f9daae4de28da44160c9cff',
            "type": "public-key",
            "transports": ["usb", "ble", "nfc", "usb", "internal"],
        },
    ],
    5: {},
}

This request was sent by the MicroG FIDO2 service, via Google Chrome and demo.yubico.com.