I would like to print the clients info that tries to connect with node https server, along with the info whether the connection is success or failure. If failed, need to print the reason.
Tried capturing the events like secureConnection. But, it has lots of information which I am not able to identify the info I need.
const serv = app.listen(config.port);
serv.on('connection', (socket) => {
socket.server.on("secureConnection", function(rawSocket){
console.log("secureConnection:")
console.log(rawSocket.ssl)
});
Can someone help in this.
Note: Server is configured to request client certificate for establishing mTLS connectivity