Added ping command functionality.

This commit is contained in:
2018-08-10 18:31:22 +00:00
parent a20c190fea
commit 2b01dbc605
11 changed files with 47 additions and 11 deletions

View File

@@ -7,12 +7,12 @@
using namespace std;
U2F_Version_APDU::U2F_Version_APDU(const U2F_Msg_CMD &msg)
U2F_Version_APDU::U2F_Version_APDU(const U2F_Msg_CMD &msg, const std::vector<uint8_t> &data)
{
//Don't actually respond yet unless invalid
if (msg.p1 != 0 || msg.p2 != 0)
throw APDU_STATUS::SW_COMMAND_NOT_ALLOWED;
else if (msg.data.size() != 0)
else if (data.size() != 0)
throw APDU_STATUS::SW_WRONG_LENGTH;
}