Skip to content

Commit 9b2ee5f

Browse files
authored
doc: added 'secure' event to tls.TLSSocket
Fixes #61060 PR-URL: #61066 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent d73c49e commit 9b2ee5f

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

doc/api/tls.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -952,6 +952,18 @@ The listener callback is passed a single argument when called:
952952
Typically, the `response` is a digitally signed object from the server's CA that
953953
contains information about server's certificate revocation status.
954954

955+
### Event: `'secure'`
956+
957+
<!-- YAML
958+
added: v0.11.4
959+
-->
960+
961+
The `'secure'` event is emitted after the TLS handshake has successfully
962+
completed and a secure connection has been established.
963+
964+
This event is emitted on both client and server {tls.TLSSocket} instances,
965+
including sockets created using the `new tls.TLSSocket()` constructor.
966+
955967
### Event: `'secureConnect'`
956968

957969
<!-- YAML
@@ -1530,7 +1542,7 @@ changes:
15301542
* `requestCert`
15311543

15321544
* `callback` {Function} If `renegotiate()` returned `true`, callback is
1533-
attached once to the `'secure'` event. If `renegotiate()` returned `false`,
1545+
attached once to the [`'secure'`][] event. If `renegotiate()` returned `false`,
15341546
`callback` will be called in the next tick with an error, unless the
15351547
`tlsSocket` has been destroyed, in which case `callback` will not be called
15361548
at all.
@@ -2460,6 +2472,7 @@ added: v0.11.3
24602472
[TLS recommendations]: https://wiki.mozilla.org/Security/Server_Side_TLS
24612473
[`'newSession'`]: #event-newsession
24622474
[`'resumeSession'`]: #event-resumesession
2475+
[`'secure'`]: #event-secure
24632476
[`'secureConnect'`]: #event-secureconnect
24642477
[`'secureConnection'`]: #event-secureconnection
24652478
[`'session'`]: #event-session

0 commit comments

Comments
 (0)