Tests failing
- Dominant language
- JavaScript
- Stars
- 86
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Description
## To reproduce
```sh
npm test
```
## What should happen
Tests should pass.
## What actually happens
Three tests fail.
## Relevant output
```sh
3 failing
1) OCSP Stapling Provider .check() should validate google.com:
Uncaught Error: Bad OCSP response status: unauthorized
at Object.parseResponse (lib/ocsp/utils.js:68:11)
at Object.verify (lib/ocsp/verify.js:52:22)
at lib/ocsp/check.js:38:12
at done (lib/ocsp/utils.js:26:7)
at IncomingMessage. (lib/ocsp/utils.js:46:7)
at endReadableNT (_stream_readable.js:1204:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
2) OCSP Cache should cache ocsp response:
Uncaught TypeError: Cannot read property 'getPeerCertificate' of null
at Agent.handleOCSPResponse (lib/ocsp/agent.js:70:25)
at TLSSocket. (lib/ocsp/agent.js:52:17)
at TLSSocket._finishInit (_tls_wrap.js:916:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:686:12)
3) OCSP Cache "after each" hook:
Uncaught Error: unsupported certificate purpose
at TLSSocket.onConnectSecure (_tls_wrap.js:1473:34)
at TLSSocket._finishInit (_tls_wrap.js:916:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:686:12)
```
## Update (2023-07-05):
- Above results were with Node 12.16.2.
- With Node 18.16.0, On the first two failures are shown.
Contributor guide
No contributing guide indexed for this repository
Research direction
Run npm test first, then trace the reported failures through lib/ocsp/utils.js, lib/ocsp/verify.js, lib/ocsp/check.js, and lib/ocsp/agent.js. Compare behavior on the Node.js versions mentioned in the update; done means the three reported tests and the after-each hook pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- security, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100