google / u2f-ref-code

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

issue with the test_LeadingZero() #148

Open harshaintc opened 7 years ago

harshaintc commented 7 years ago

void test_LeadingZero() { U2FHID_FRAME f, r; initFrame(&f, 0x100, U2FHID_PING, 10);

SEND(f);
RECV(r, 1.0);
CHECK_EQ(r.cid, f.cid);

CHECK_EQ(r.init.cmd, U2FHID_PING);
CHECK_EQ(MSG_LEN(f), MSG_LEN(r));

} I have problem understanding the logic behind the test case. Why does the cid value is 0x100. The device initialized in the earlier part of the code gets some other value for the cid and how does the authenticator do any validation?