add info to authData for ext reqs

This commit is contained in:
Conor Patrick 2019-04-23 21:57:27 -04:00
parent 4fb25e165a
commit ce96fffddd
2 changed files with 8 additions and 1 deletions

View File

@ -1219,6 +1219,12 @@ uint8_t ctap_get_assertion(CborEncoder * encoder, uint8_t * request, int length)
{
memset(auth_data_buf,0,sizeof(CTAP_authDataHeader));
auth_data_buf_sz = sizeof(CTAP_authDataHeader);
crypto_sha256_init();
crypto_sha256_update(GA.rp.id, GA.rp.size);
crypto_sha256_final(((CTAP_authData *)auth_data_buf)->head.rpIdHash);
((CTAP_authData *)auth_data_buf)->head.flags = (1 << 0);
((CTAP_authData *)auth_data_buf)->head.flags |= (ctap_is_pin_set() << 2);
}
else
#endif

View File

@ -42,9 +42,10 @@ int main(int argc, char *argv[])
TAG_U2F|
//TAG_PARSE |
//TAG_TIME|
//TAG_DUMP|
TAG_DUMP|
TAG_GREEN|
TAG_RED|
TAG_EXT|
TAG_ERR
);