parsedCredentialRequest.Verify doesn't define what credentialBytes is or where it comes from, and even looking at the function definition, it's not clear what it is.
There's no other mention of credentialBytes anywhere in the code.
Reproduction
I was originally preparing to file this as a bug that the credentialBytes don't accept the ASN.1 / DER publicKey bytes, but as I was preparing the test case, I eventually found that
parsedCredentialCreation.Response.AttestationObject.AuthData.AttData.CredentialPublicKey is the CBOR-encoded key that the function expects.
Version
0.11.2
Description
parsedCredentialRequest.Verify
doesn't define whatcredentialBytes
is or where it comes from, and even looking at the function definition, it's not clear what it is.There's no other mention of
credentialBytes
anywhere in the code.Reproduction
I was originally preparing to file this as a bug that the
credentialBytes
don't accept the ASN.1 / DERpublicKey
bytes, but as I was preparing the test case, I eventually found thatparsedCredentialCreation.Response.AttestationObject.AuthData.AttData.CredentialPublicKey
is the CBOR-encoded key that the function expects.Expectations
It should be more clear as to what
credentialBytes
is, and it should be referred by the same name in the documentation and code where it is used.Perhaps renaming it to:
credentialPublicKey
credentialPublicKeyCBORBytes
Documentation