summaryrefslogtreecommitdiff
path: root/src/u2f.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/u2f.c')
-rw-r--r--src/u2f.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/u2f.c b/src/u2f.c
index 3f2d9aa..82b289f 100644
--- a/src/u2f.c
+++ b/src/u2f.c
@@ -439,7 +439,7 @@ encode_cred_authdata(const char *rp_id, const uint8_t *kh, uint8_t kh_len,
439 authdata.sigcount = 0; 439 authdata.sigcount = 0;
440 440
441 memset(&attcred_raw.aaguid, 0, sizeof(attcred_raw.aaguid)); 441 memset(&attcred_raw.aaguid, 0, sizeof(attcred_raw.aaguid));
442 attcred_raw.id_len = (uint16_t)(kh_len << 8); /* XXX */ 442 attcred_raw.id_len = htobe16(kh_len);
443 443
444 len = authdata_blob.len = sizeof(authdata) + sizeof(attcred_raw) + 444 len = authdata_blob.len = sizeof(authdata) + sizeof(attcred_raw) +
445 kh_len + pk_blob.len; 445 kh_len + pk_blob.len;