nodejs / nodejs/node

quic: session.peerCertificate behaves differently than for http2

Open
#63,673 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

quic
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.