-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Description
Is your feature request related to a problem? Please describe.
For TLSv1.2 and below, it is possible to renegotiate the session if you need to request the peer certificate (docs).
The TLSv1.3 spec does not support renegotiation, so connections using this protocol cannot use renegotiation to request the peer certificate. From OpenSSL's wiki
TLSv1.3 does not have renegotiation so calls to SSL_renegotiate() or SSL_renegotiate_abbreviated() will immediately fail if invoked on a connection that has negotiated TLSv1.3.
A common use case for renegotiation is to update the connection keys. The function SSL_key_update() can be used for this purpose in TLSv1.3.
Another use case is to request a certificate from the client. This can be achieved by using the SSL_verify_client_post_handshake() function in TLSv1.3.
Describe the solution you'd like
OpenSSL describes an alternative method to request the peer certificate: SSL_verify_client_post_handshake (docs).
Similar to how Node.js exposes SSL_renegotiate(), I would like to see Node.js expose SSL_verify_client_post_handshake to that we can consume this from application code.
Describe alternatives you've considered
For my specific use case, I only need to renegotiate because resumed/reused TLS sessions do not always contain the full certificate chain, which is a requirement for me. Forcing renegotiation solves my problem for TLSv1.2 and below, but I don't have a solution for TLSv1.3 at this time.