Skip to content

Commit f03758a

Browse files
authored
Merge commit from fork
* Only validate revocation and time in chain certs * Rearrange x5c parsing * Tweak API of assertCertIsWithinValidTimeWindow * Can't check revocation of potential anchors * Only split leaf + intermediates once * Hoist verified `chain` * Replace last cert in chain to simplify later logic * Tweak tests that check updated error messages * Accept issuerCert in isCertRevoked * Check time validity of chain certs * Begin to check revocation status of chain certs * Get some testing set up for isCertRevoked() * Verify CRL signature * Assert CRL URL is fetched * Tweak isCertRevoked tests * Raise SimpleWebAuthnError from cert validation * Update verifyAttestationWithMetadata * Only validate chain after all checks pass * Update X.509 root cert maker to add CRL sign ext * Fix some dates * Check all CRL URLs, and cache by key ID + URL * Add test for multiple CRL distribution points * Soft-fail on AKI checks for cert and certCRL * Add note about generating test coverage report * Add http-server to host test coverage report * Tweak a bit of the root README * Tweak error messages for AKI check failures * Simplify generateCRLDistributionPointsExtension * Tweak some tests * Address PR feedback
1 parent 8f6e738 commit f03758a

12 files changed

Lines changed: 1065 additions & 187 deletions

‎README.md‎

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,20 +98,38 @@ Install the following before proceeding:
9898
After pulling down the code, set up dependencies:
9999

100100
```sh
101-
$> deno install
101+
deno install
102102
```
103103

104104
To run unit tests for all workspace packages, use the `test` series of scripts:
105105

106106
```sh
107-
# Run an individual package's tests
108-
$> cd packages/browser/ && deno task test
109-
$> cd packages/server/ && deno task test
107+
cd packages/browser/ && deno task test
108+
```
109+
110+
```sh
111+
cd packages/server/ && deno task test
110112
```
111113

112114
Tests can be run in watch mode with the `test:watch` series of scripts:
113115

114116
```sh
115-
$> cd packages/browser/ && deno task test:watch
116-
$> cd packages/server/ && deno task test:watch
117+
cd packages/browser/ && deno task test:watch
118+
```
119+
120+
```sh
121+
cd packages/server/ && deno task test:watch
122+
```
123+
124+
### Test Coverage <!-- omit in toc -->
125+
126+
The following additional dependencies are needed locally to display test coverage reports:
127+
128+
- **genhtml** (run `brew install lcov` on macOS to install this CLI tool)
129+
130+
Then run the following command to run tests and then host a coverage report at
131+
http://127.0.0.1:8000:
132+
133+
```
134+
deno run test:coverage
117135
```

‎deno.json‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"test:browser": "(cd packages/browser; deno task test)",
55
"test:server": "(cd packages/server; deno task test)",
66
"test:coverage": {
7-
"command": "(cd html_cov/ && python -m http.server -b 127.0.0.1)",
7+
"command": "http-server ./html_cov -a 127.0.0.1 -p 8000",
88
"dependencies": [
9-
"test:coverage:html"
9+
// "test:coverage:html"
1010
]
1111
},
1212
"test:coverage:html": {
@@ -62,6 +62,7 @@
6262
"@std/path": "jsr:@std/path@^1.0.8",
6363
"@std/semver": "jsr:@std/semver@^1.0.5",
6464
"@std/testing": "jsr:@std/testing@^1.0.4",
65+
"http-server": "npm:http-server@^14.1.1",
6566
"jsdom": "npm:jsdom@^25.0.1",
6667
"rollup": "npm:rollup@^4.27.3",
6768
"rollup-plugin-version-injector": "npm:rollup-plugin-version-injector@^1.3.3",

0 commit comments

Comments
 (0)