update pc build
This commit is contained in:
parent
ff682d6b5e
commit
eb4a29edc6
50
pc/device.c
50
pc/device.c
@ -14,10 +14,23 @@
|
|||||||
#include "cbor.h"
|
#include "cbor.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
#include "ctaphid.h"
|
||||||
|
|
||||||
|
|
||||||
void authenticator_initialize();
|
void authenticator_initialize();
|
||||||
|
|
||||||
|
uint32_t __device_status = 0;
|
||||||
|
void device_set_status(int status)
|
||||||
|
{
|
||||||
|
if (status != CTAPHID_STATUS_IDLE && __device_status != status)
|
||||||
|
{
|
||||||
|
ctaphid_update_status(status);
|
||||||
|
}
|
||||||
|
__device_status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int udp_server()
|
int udp_server()
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
@ -211,15 +224,12 @@ int ctap_generate_rng(uint8_t * dst, size_t num)
|
|||||||
perror("fopen");
|
perror("fopen");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
ret = fread(dst, 1, num, urand);
|
if (fread(dst, 1, num, urand) != num)
|
||||||
fclose(urand);
|
|
||||||
|
|
||||||
if (ret != num)
|
|
||||||
{
|
{
|
||||||
perror("fwrite");
|
perror("fread");
|
||||||
exit(1);
|
|
||||||
}
|
}
|
||||||
/*memset(dst,0xaa,num);*/
|
|
||||||
|
fclose(urand);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -410,7 +420,31 @@ void authenticator_initialize()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void manage_device()
|
void device_manage()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ctap_reset_rk()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t ctap_rk_size()
|
||||||
|
{
|
||||||
|
printf("Warning: rk not implemented\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
void ctap_store_rk(int index,CTAP_residentKey * rk)
|
||||||
|
{
|
||||||
|
printf("Warning: rk not implemented\n");
|
||||||
|
}
|
||||||
|
void ctap_load_rk(int index,CTAP_residentKey * rk)
|
||||||
|
{
|
||||||
|
printf("Warning: rk not implemented\n");
|
||||||
|
}
|
||||||
|
void ctap_overwrite_rk(int index,CTAP_residentKey * rk)
|
||||||
|
{
|
||||||
|
printf("Warning: rk not implemented\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user