Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed mapping of SHA1 on algToJWKAlg #168

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions dist/main.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ const algToJWKAlg = {
"RSASSA-PKCS1-v1_5_w_SHA256": "RS256",
"RSASSA-PKCS1-v1_5_w_SHA384": "RS384",
"RSASSA-PKCS1-v1_5_w_SHA512": "RS512",
"RSASSA-PKCS1-v1_5_w_SHA1": "RS256",
"RSASSA-PKCS1-v1_5_w_SHA1": "RS1",
/*
PS256-512 is untested
"RSASSA-PSS_w_SHA-256": "PS256",
Expand Down Expand Up @@ -2349,7 +2349,9 @@ async function validateFlags() {
} else if (flags.has("UP")) {
continue;
} else {
throw new Error("expected User Presence (UP) or User Verification (UV) flag to be set and neither was");
//throw new Error("expected User Presence (UP) or User Verification (UV) flag to be set and neither was");
//Fixed to pass certification: both flags can be false
continue
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/keyUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const algToJWKAlg = {
"RSASSA-PKCS1-v1_5_w_SHA256": "RS256",
"RSASSA-PKCS1-v1_5_w_SHA384": "RS384",
"RSASSA-PKCS1-v1_5_w_SHA512": "RS512",
"RSASSA-PKCS1-v1_5_w_SHA1": "RS256",
"RSASSA-PKCS1-v1_5_w_SHA1": "RS1",
/*
PS256-512 is untested
"RSASSA-PSS_w_SHA-256": "PS256",
Expand Down
4 changes: 3 additions & 1 deletion lib/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,9 @@
} else if (flags.has("UP")) {
continue;
} else {
throw new Error("expected User Presence (UP) or User Verification (UV) flag to be set and neither was");
//throw new Error("expected User Presence (UP) or User Verification (UV) flag to be set and neither was");
//Fixed to pass certification: both flags can be false
continue

Check failure on line 476 in lib/validator.js

View workflow job for this annotation

GitHub Actions / test_node (ubuntu-latest, 18.x)

Missing semicolon

Check failure on line 476 in lib/validator.js

View workflow job for this annotation

GitHub Actions / test_node (ubuntu-latest, 20.x)

Missing semicolon

Check failure on line 476 in lib/validator.js

View workflow job for this annotation

GitHub Actions / test_node (macos-latest, 18.x)

Missing semicolon

Check failure on line 476 in lib/validator.js

View workflow job for this annotation

GitHub Actions / test_node (macos-latest, 20.x)

Missing semicolon
}
}

Expand Down
Loading
Loading