summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--example/fido-conformance.js19
1 files changed, 12 insertions, 7 deletions
diff --git a/example/fido-conformance.js b/example/fido-conformance.js
index f4b6aab..48a9ef6 100644
--- a/example/fido-conformance.js
+++ b/example/fido-conformance.js
@@ -17,18 +17,23 @@ const {
* FIDO2 > TESTS CONFIGURATION > DOWNLOAD SERVER METADATA (button)
*/
// Update this to whatever folder you extracted the statements to
-const conformanceMetadataPath = './fido-conformance-mds-v1.3.4';
-const conformanceMetadataFilenames = fs.readdirSync(conformanceMetadataPath);
const statements = [];
-for (const statementPath of conformanceMetadataFilenames) {
- if (statementPath.endsWith('.json')) {
- const contents = fs.readFileSync(`${conformanceMetadataPath}/${statementPath}`, 'utf-8');
- statements.push(JSON.parse(contents));
+
+try {
+ const conformanceMetadataPath = './fido-conformance-mds-v1.3.4';
+ const conformanceMetadataFilenames = fs.readdirSync(conformanceMetadataPath);
+ for (const statementPath of conformanceMetadataFilenames) {
+ if (statementPath.endsWith('.json')) {
+ const contents = fs.readFileSync(`${conformanceMetadataPath}/${statementPath}`, 'utf-8');
+ statements.push(JSON.parse(contents));
+ }
}
+ console.log('initializing metadata service with', conformanceMetadataFilenames);
+} catch (err) {
+ // pass
}
// Initialize the metadata service with the prepared statements
// For MakeCredential and GetAssertion Request/Response tests
-console.log('initializing metadata service with', conformanceMetadataFilenames);
MetadataService.initialize({
statements,
mdsServers: [],