uNetworking / uWebSockets.js

μWebSockets for Node.js back-ends :metal:
Apache License 2.0
7.65k stars 560 forks source link

TLS peer certificate #1058

Open cruz3rblade opened 1 month ago

cruz3rblade commented 1 month ago

Hey,

I am interested in using mTLS and verifying the client's peer certificate. Based on issue #589 from 3 years ago, it seems that this was not supported at the time. Is this feature currently supported, or are there any plans to support it in the future?

uNetworkingAB commented 1 month ago

Are you asking about peer verification in general or using mTLS as the SSL implementation?

cruz3rblade commented 1 month ago

I'm asking in general, basically I want to retrieve the peer's certificate in its raw form, like how NodeJS expose it with tlsSocket.getPeerCertificate. Then, I could verify the certificate using crypto.X509Certificate.verify.

uNetworkingAB commented 1 month ago

This is a feature that has never been fully thought about yet, I've only seen very few people interested in it and for those in C++ land they can access all OpenSSL functions but for Node.js it needs to be wrapped in some simple way. It would be a feature request

cruz3rblade commented 1 month ago

I understand, and yet please consider fulfilling this feature request in the future. 🙏 Also, Thank you for the quick reply and this awesome library!