webauthn-open-source / fido2-lib

A node.js library for performing FIDO 2.0 / WebAuthn server functionality
https://webauthn.io
MIT License
407 stars 120 forks source link

Error Parsing ASN.1 #144

Closed popeeyy closed 9 months ago

popeeyy commented 11 months ago

Not sure what exactly the problem is, but as of a couple hours ago, whenever I import from https://mds.fidoalliance.org I get an error saying "Error Parsing ASN.1" from fido2-lib/lib/certUtils.js:31:10 when calling addMdsCollection. This appears to only happen when I import a certificate from TruU.

Code:


axios.get("https://mds.fidoalliance.org").then(async (response) => {
    const tocObj = await mdsCollection.addToc(response.data, cert);

    tocObj.entries.forEach((entry) => {
        mdsCollection.addEntry(base64url.encode(JSON.stringify(entry)));
    });

    Fido2Lib.addMdsCollection(mdsCollection);
})