BryanJacobs / FIDO2Applet

FIDO2 Javacard Applet
MIT License
63 stars 12 forks source link

make_credential_pin_auth_protocol - Wrong error code #21

Closed StarGate01 closed 7 months ago

StarGate01 commented 7 months ago
Test successful: Tests if the PIN protocol parameter is checked in MakeCredential. (id: make_credential_pin_auth_protocol)
Expected error code `CTAP2_ERR_PIN_AUTH_INVALID`, got `CTAP1_ERR_INVALID_PARAMETER`.

This is one of the cases where the test suite is quite opinionated. The test succeeds, but there can be some discussion bout what error code is the correct one.

INFO:ctap:Received initialization packet
INFO:keep_alive:Start keep-alive called
INFO:bridge:Transmitting CTAP command: AUTHN_MakeCredential
DEBUG:bridge:CBOR command payload: {
  "1": "h'cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd",
  "2": {
    "id": "make_credential_pin_auth_protocol.example.com"
  },
  "3": {
    "id": "h'1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d",
    "name": "Adam"
  },
  "4": [
    {
      "alg": -7,
      "type": "public-key"
    }
  ],
  "8": "h'9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a",
  "9": 123456
}
INFO:bridge:CTAP command requires user presence, sending 'waiting for acknowledgment' status
INFO:bridge:APDU command: 195 bytes data
DEBUG:bridge:APDU command: DATA=801000000000ba01a6015820cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd02a1626964782d6d616b655f63726564656e7469616c5f70696e5f617574685f70726f746f636f6c2e6578616d706c652e636f6d03a262696458201d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d646e616d65644164616d0481a263616c672664747970656a7075626c69632d6b657908509a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a091a0001e2400000
INFO:bridge:APDU response: SW1=0x90, SW2=0x0, 1 bytes data
DEBUG:bridge:APDU response: DATA=02
ERROR:bridge:CTAP error: CTAP_STATUS_CODE.CTAP1_ERR_INVALID_PARAMETER
ERROR:ctap.auth:Exception from authenticator: CTAP error response from authenticator
INFO:bridge:Signaling external card reset
INFO:bridge:Disconnecting from card