-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Description
- Version: 10.x+
- Platform: All
- Subsystem: tls
When I try to create a secure connection over an existing stream, implementing something similar to STARTTLS, the suggested way is to use new tls.TLSSocket().
I also want to use mutual certification authentication but the tlsSocket.authorized is never set to true for the Server even when the client certificate is signed correctly by the expected CA. From the _tls_wrap.js code, it seems this flag is only set for the server when the underlying stream is an actual socket.
On the client side things are working as expected, as the client side connection is created with tls.connect().
It used to be that the deprecated pair returned by tls.createSecurePair() has access to the internal SSL object, which I can use verifyError() to check the validity of the client certificate. But this hidden feature has also been removed in recent versions.
What is the correct approach to mca for "upgraded" connection?