version 1.29, 2021/02/18 02:15:07 |
version 1.30, 2021/05/31 06:48:42 |
|
|
{ |
{ |
fido_cred_t *cred = NULL; |
fido_cred_t *cred = NULL; |
const uint8_t *ptr; |
const uint8_t *ptr; |
uint8_t user_id[32]; |
uint8_t user_id[32], chall_hash[32]; |
struct sk_usbhid *sk = NULL; |
struct sk_usbhid *sk = NULL; |
struct sk_enroll_response *response = NULL; |
struct sk_enroll_response *response = NULL; |
size_t len; |
size_t len; |
|
|
skdebug(__func__, "fido_cred_set_type: %s", fido_strerr(r)); |
skdebug(__func__, "fido_cred_set_type: %s", fido_strerr(r)); |
goto out; |
goto out; |
} |
} |
if ((r = fido_cred_set_clientdata_hash(cred, challenge, |
if (sha256_mem(challenge, challenge_len, |
challenge_len)) != FIDO_OK) { |
chall_hash, sizeof(chall_hash)) != 0) { |
|
skdebug(__func__, "hash challenge failed"); |
|
goto out; |
|
} |
|
if ((r = fido_cred_set_clientdata_hash(cred, chall_hash, |
|
sizeof(chall_hash))) != FIDO_OK) { |
skdebug(__func__, "fido_cred_set_clientdata_hash: %s", |
skdebug(__func__, "fido_cred_set_clientdata_hash: %s", |
fido_strerr(r)); |
fido_strerr(r)); |
goto out; |
goto out; |