http2/quic: Support of custom certificate verifier, serverCertificateHashes
Personne n'a encore pris cette issue.
- Langage dominant
- JavaScript
- Étoiles
- 122k
- Forks
- 37.3k
- Merge moyen
- 4 j 2 h
- PR mergées (30 j)
- 283
Description
What is the problem this feature will solve?
I am currently trying to implement http/2 webtransport with native node functions.
Webtransport has (at least on http/3) the feature, that certificates are verified using a hash identifier if their validity is below 14 days.
My objective is to achieve this also for the http/2 implementation. (I believe that similar problems may arrise for http/3 webtransport for the upcoming quic/http/3 infrastructure, although different code is used for quic then for TCP TLS)
What is the feature you are proposing to solve the problem?
So far, I tried to use the checkServerIdentity feature for checking.
However, if the verification fails at
https://github.com/nodejs/node/blob/ab5fa2a2210416b0db0e601620da81ce34adf59a/lib/_tls_wrap.js#L1600C35-L1600C47
checkServerIdentity is never called.
The verification happens inside OpenSSL apparently.
I got a self-signed certificate error in my first attempts, so it did not reach the checkServerIdentity.
I can not supply the certificate as ca, as I do not know it before a connection.
rejectUnauthorized=false is not an option, as it also removes the call to checkServerIdentity:
I see the following options:
- I have missed something, and there is a workaround, so that patch for node.js is not required (as it would allow usage in older node versions, this is my preferred option).
- An option for supplying a custom certificate verifier function as a replacement for the OpenSSL version, analog to
checkServerIdentity - An option to use only checkServerIdentity and no certificate verification with OpenSSL
(If I am not mistaken, this is also missing for the tlscontext.cc in quic).
Of course, whatever option is the best (if any), I would be happy to create a PR.
What alternatives have you considered?
No response
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par lire le chemin de vérification des certificats dans lib/_tls_wrap.js autour de l'appel checkServerIdentity référencé, puis examinez tlscontext.cc pour trouver le chemin QUIC correspondant. Comparez le comportement de vérification OpenSSL existant avec le vérificateur personnalisé proposé et définissez la portée de l'API, notamment en déterminant si HTTP/2 et QUIC sont tous deux couverts. Le travail est terminé lorsque le comportement de vérification choisi est spécifié et testé pour le transport concerné.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript, nodejs
- Domaine
- backend, networking, security
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- Active
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100