mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
tls: reintroduce socket.encrypted
Just a property that is always `true` for TLS sockets. fix #6735
This commit is contained in:
parent
2ca6905160
commit
7c3643b767
@ -540,6 +540,11 @@ If `tlsSocket.authorized === false` then the error can be found in
|
|||||||
`tlsSocket.authorizationError`. Also if NPN was used - you can check
|
`tlsSocket.authorizationError`. Also if NPN was used - you can check
|
||||||
`tlsSocket.npnProtocol` for negotiated protocol.
|
`tlsSocket.npnProtocol` for negotiated protocol.
|
||||||
|
|
||||||
|
### tlsSocket.encrypted
|
||||||
|
|
||||||
|
Static boolean value, always `true`. May be used to distinguish TLS sockets
|
||||||
|
from regular ones.
|
||||||
|
|
||||||
### tlsSocket.authorized
|
### tlsSocket.authorized
|
||||||
|
|
||||||
A boolean that is `true` if the peer certificate was signed by one of the
|
A boolean that is `true` if the peer certificate was signed by one of the
|
||||||
|
@ -172,6 +172,10 @@ function TLSSocket(socket, options) {
|
|||||||
this.authorized = false;
|
this.authorized = false;
|
||||||
this.authorizationError = null;
|
this.authorizationError = null;
|
||||||
|
|
||||||
|
// Just a documented property to make secure sockets
|
||||||
|
// distinguishable from regular ones.
|
||||||
|
this.encrypted = true;
|
||||||
|
|
||||||
this.on('error', this._tlsError);
|
this.on('error', this._tlsError);
|
||||||
|
|
||||||
if (!this._handle)
|
if (!this._handle)
|
||||||
|
Loading…
Reference in New Issue
Block a user