kopia lustrzana https://github.com/solokeys/solo1
update pc build
rodzic
ff682d6b5e
commit
eb4a29edc6
50
pc/device.c
50
pc/device.c
|
@ -14,10 +14,23 @@
|
|||
#include "cbor.h"
|
||||
#include "util.h"
|
||||
#include "log.h"
|
||||
#include "ctaphid.h"
|
||||
|
||||
|
||||
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 fd;
|
||||
|
@ -211,15 +224,12 @@ int ctap_generate_rng(uint8_t * dst, size_t num)
|
|||
perror("fopen");
|
||||
exit(1);
|
||||
}
|
||||
ret = fread(dst, 1, num, urand);
|
||||
fclose(urand);
|
||||
|
||||
if (ret != num)
|
||||
if (fread(dst, 1, num, urand) != num)
|
||||
{
|
||||
perror("fwrite");
|
||||
exit(1);
|
||||
perror("fread");
|
||||
}
|
||||
/*memset(dst,0xaa,num);*/
|
||||
|
||||
fclose(urand);
|
||||
|
||||
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");
|
||||
}
|
||||
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue