start ctap protocol
This commit is contained in:
14
main.c
14
main.c
@@ -8,7 +8,7 @@
|
||||
#include "util.h"
|
||||
|
||||
|
||||
void check_ret(CborError ret)
|
||||
static void check_ret(CborError ret)
|
||||
{
|
||||
if (ret != CborNoError)
|
||||
{
|
||||
@@ -18,14 +18,6 @@ void check_ret(CborError ret)
|
||||
}
|
||||
|
||||
|
||||
void ctaphid_write_block(uint8_t * data)
|
||||
{
|
||||
printf("usbhid send\n");
|
||||
dump_hex(data, 64);
|
||||
usbhid_send(data);
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
/*CborError ret;*/
|
||||
@@ -45,7 +37,6 @@ int main(int argc, char * argv[])
|
||||
|
||||
int count = 0;
|
||||
uint8_t hidmsg[64];
|
||||
CTAPHID_STATUS res;
|
||||
memset(hidmsg,0,sizeof(hidmsg));
|
||||
|
||||
printf("recv'ing hid msg \n");
|
||||
@@ -55,9 +46,8 @@ int main(int argc, char * argv[])
|
||||
usbhid_recv(hidmsg);
|
||||
printf("%d>> ",count++); dump_hex(hidmsg,sizeof(hidmsg));
|
||||
|
||||
ctaphid_handle_packet(hidmsg, &res);
|
||||
ctaphid_handle_packet(hidmsg);
|
||||
memset(hidmsg, 0, sizeof(hidmsg));
|
||||
ctaphid_dump_status(&res);
|
||||
|
||||
/*int i;*/
|
||||
/*for(i = 0; i < res.length; i += 64)*/
|
||||
|
Reference in New Issue
Block a user