secureConnection event (tls.Server)

Event: 'secureConnection'

function (tlsSocket) {}

This event is emitted after the handshaking process for a new connection has successfully completed. The argument is an instance of tls.TLSSocket and has all the common stream methods and events.

socket.authorized is a boolean value which indicates if the client has been verified by one of the supplied certificate authorities for the server. If socket.authorized is false, then socket.authorizationError is set to describe how authorization failed. Implied but worth mentioning: depending on the settings of the TLS server, unauthorized connections may be accepted.

socket.npnProtocol is a string containing the selected NPN protocol and socket.alpnProtocol is a string containing the selected ALPN protocol. When both NPN and ALPN extensions are received, ALPN takes precedence over NPN and the next protocol is selected by ALPN. When ALPN has no selected protocol, this returns false.

socket.servername is a string containing the server name requested with SNI.

doc_Nodejs
2016-04-30 04:42:17
Comments
Leave a Comment

Please login to continue.