google / u2f-ref-code

U2F reference implementations
BSD 3-Clause "New" or "Revised" License
588 stars 182 forks source link

Bad CLA Response in U2F test not applicable to some NFC Authenticator #143

Open qingzhang001 opened 7 years ago

qingzhang001 commented 7 years ago

In u2f_nfc_test.cc, in the below mentioned portion of code:

std::cout << "\nCheck Bad CLA Response"; CHECK_NE(0x9000, xchgAPDUShort(1 / not U2F CLA, 0x00 /, U2F_INS_AUTHENTICATE, 0, 0, 0, "abc", &rapduLen, rapdu)); CHECK_EQ(0, rapduLen);

For some NFC authenticator, on contactless protocol (NFC), it only supports one basic logical channel. So after select the FIDO applet, when apdu class is 0x01, this authenticator will ignore the channel number in class byte and direct the command to the applet, and Authenticator replies with success (9000).

As multi logical channel on NFC in authenticator is not a requirement in FIDO spec, can we remove this bad cla response test?