Made a service to enable auto-starting.

This commit is contained in:
2018-08-12 12:00:38 +00:00
parent 0de7ee2fd7
commit 5c908d8530
10 changed files with 33 additions and 10 deletions

View File

@@ -20,10 +20,11 @@ U2F_Register_APDU::U2F_Register_APDU(const U2F_Msg_CMD &msg, const vector<uint8_
//Incorrect registration size
throw APDU_STATUS::SW_WRONG_LENGTH;
}
else if (p1 != 0x00 || p2 != 0x00)
else if ((p1 != 0x00 && p1 != 0x03) || p2 != 0x00) //According to spec, 0x03 not allowed here
//However, browsers seem to do it, so...
{
//Invalid U2F Message (APDU) parameters detected
throw APDU_STATUS::SW_COMMAND_NOT_ALLOWED;
throw APDU_STATUS::SW_INS_NOT_SUPPORTED;
}
copy(data.data() + 0, data.data() + 32, challengeP.begin());