-
Hi, I’ve spend few days trying to understand, why authdata I receive is missing aaguid, public key coe, credentialId. Also flags and counter are "strange". I thought I was doing something wrong or something is not implemented so I was trying to look around the code/docs/internet. Today I’ve event tried to build the c project to look around more. After browsing the C code I’ve noticed that auth_data is encoded when parsing a reply for cred make and "modified"? After browsing more, I’ve noticed I could use After using raw data I can parse correct flags & data. In the docs I’ve not noticed that there is stated the difference. Is this desired? Is AuthData designed to follow attestation != "direct" in webauthn? With the incorrect AuthData I’ve used I was not able to verify the signature. Here is RAW data parsed (hex values).
fido_cred_authdata_ptr with fido_cred_authdata_len
Thank you very much for the great work on the library. A lot of resources can be found around. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, Thanks for reaching out.
In your example, it looks like you have not decoded the CBOR byte string before attempting to parse the authenticator data. The first two bytes of your "RpIdHash" contains a the CBOR byte string header Hope that helps. |
Beta Was this translation helpful? Give feedback.
Hi,
Thanks for reaching out.
fido_cred_authdata_ptr()
returns a pointer to the authenticator data encoded as a CBOR byte string, whereasfido_cred_authdata_raw_ptr()
returns a pointer to the authenticator data itself.In your example, it looks like you have not decoded the CBOR byte string before attempting to parse the authenticator data. The first two bytes of your "RpIdHash" contains a the CBOR byte string header
58 DA
(CBOR major tag 2, length 218), followed by the bytes which you can see are identical to the RPID hash in the "raw" output.Hope that helps.