quic: session.peerCertificate behaves differently than for http2
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 122k
- Forks
- 37.3k
- Avg merge
- 4d 2h
- Merged PRs (30d)
- 283
Description
I am currently implementing a custom certificate verifier.
So I wait for the sesssion.opened promise to be fullfilled, and try to check the peerCertificate.
It is an X509Certificate {} object.
I wanted to check the fingerprint256 property. For quic it is a function, for http2 it was a property (supposedly a getter).
The current doc says:
The peer's certificate as an object with properties such as subject, issuer, valid_from, valid_to, fingerprint, etc. Returns undefined if the session is destroyed or the peer did not present a certificate.
So I think the intention is that it is also a property for quic, but it is not.
Also the docu for X509Certificate says:
x509.fingerprint256#
Added in: v15.6.0
Type:
The SHA-256 fingerprint of this certificate.
Though I can see easily what differs between these implementations.
(Of course not a big deal).
@jasnell is this really an issue?
Probably this applies to other properties as well.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the QUIC and HTTP/2 session.peerCertificate entry points and compare how X509Certificate.fingerprint256 is exposed. Check the related X509Certificate documentation and other peer-certificate properties, then verify that the intended access style is consistent across protocols.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100