Closed
Description
We need to change the certificate info (credentials/secureContext) dynamically while the server is online without having to shut down and start a new server. We have patched node with code that enables this, but it would be nice to have it on upstream as well.
The API we have is:
server.setSharedCredentials(secureContext)
Used to change the server's TLS options such as the server certificate on the fly. secureContext
must be an instance of SecureContext
as is created with tls.createSecureContext()
.
After the call, if there were active sockets using old context, those sockets will be disconnected next time data is sent over them.