@@ -570,32 +570,6 @@ The `cryptoStream.bytesWritten` property returns the total number of bytes
570
570
written to the underlying socket _ including_ the bytes required for the
571
571
implementation of the TLS protocol.
572
572
573
- ## Class: ` tls.SecurePair `
574
-
575
- <!-- YAML
576
- added: v0.3.2
577
- deprecated: v0.11.3
578
- -->
579
-
580
- > Stability: 0 - Deprecated: Use [ ` tls.TLSSocket ` ] [ ] instead.
581
-
582
- Returned by [ ` tls.createSecurePair() ` ] [ ] .
583
-
584
- ### Event: ` 'secure' `
585
-
586
- <!-- YAML
587
- added: v0.3.2
588
- deprecated: v0.11.3
589
- -->
590
-
591
- The ` 'secure' ` event is emitted by the ` SecurePair ` object once a secure
592
- connection has been established.
593
-
594
- As with checking for the server
595
- [ ` 'secureConnection' ` ] [ ]
596
- event, ` pair.cleartext.authorized ` should be inspected to confirm whether the
597
- certificate used is properly authorized.
598
-
599
573
## Class: ` tls.Server `
600
574
601
575
<!-- YAML
@@ -2125,70 +2099,6 @@ be used to create custom parameters. The key length must be greater than or
2125
2099
equal to 1024 bits or else an error will be thrown. Although 1024 bits is
2126
2100
permissible, use 2048 bits or larger for stronger security.
2127
2101
2128
- ## ` tls.createSecurePair([context][, isServer][, requestCert][, rejectUnauthorized][, options]) `
2129
-
2130
- <!-- YAML
2131
- added: v0.3.2
2132
- deprecated: v0.11.3
2133
- changes:
2134
- - version: v5.0.0
2135
- pr-url: https://github.com/nodejs/node/pull/2564
2136
- description: ALPN options are supported now.
2137
- -->
2138
-
2139
- > Stability: 0 - Deprecated: Use [ ` tls.TLSSocket ` ] [ ] instead.
2140
-
2141
- * ` context ` {Object} A secure context object as returned by
2142
- ` tls.createSecureContext() `
2143
- * ` isServer ` {boolean} ` true ` to specify that this TLS connection should be
2144
- opened as a server.
2145
- * ` requestCert ` {boolean} ` true ` to specify whether a server should request a
2146
- certificate from a connecting client. Only applies when ` isServer ` is ` true ` .
2147
- * ` rejectUnauthorized ` {boolean} If not ` false ` a server automatically reject
2148
- clients with invalid certificates. Only applies when ` isServer ` is ` true ` .
2149
- * ` options `
2150
- * ` enableTrace ` : See [ ` tls.createServer() ` ] [ ]
2151
- * ` secureContext ` : A TLS context object from [ ` tls.createSecureContext() ` ] [ ]
2152
- * ` isServer ` : If ` true ` the TLS socket will be instantiated in server-mode.
2153
- ** Default:** ` false ` .
2154
- * ` server ` {net.Server} A [ ` net.Server ` ] [ ] instance
2155
- * ` requestCert ` : See [ ` tls.createServer() ` ] [ ]
2156
- * ` rejectUnauthorized ` : See [ ` tls.createServer() ` ] [ ]
2157
- * ` ALPNProtocols ` : See [ ` tls.createServer() ` ] [ ]
2158
- * ` SNICallback ` : See [ ` tls.createServer() ` ] [ ]
2159
- * ` session ` {Buffer} A ` Buffer ` instance containing a TLS session.
2160
- * ` requestOCSP ` {boolean} If ` true ` , specifies that the OCSP status request
2161
- extension will be added to the client hello and an ` 'OCSPResponse' ` event
2162
- will be emitted on the socket before establishing a secure communication.
2163
-
2164
- Creates a new secure pair object with two streams, one of which reads and writes
2165
- the encrypted data and the other of which reads and writes the cleartext data.
2166
- Generally, the encrypted stream is piped to/from an incoming encrypted data
2167
- stream and the cleartext one is used as a replacement for the initial encrypted
2168
- stream.
2169
-
2170
- ` tls.createSecurePair() ` returns a ` tls.SecurePair ` object with ` cleartext ` and
2171
- ` encrypted ` stream properties.
2172
-
2173
- Using ` cleartext ` has the same API as [ ` tls.TLSSocket ` ] [ ] .
2174
-
2175
- The ` tls.createSecurePair() ` method is now deprecated in favor of
2176
- ` tls.TLSSocket() ` . For example, the code:
2177
-
2178
- ``` js
2179
- pair = tls .createSecurePair (/* ... */ );
2180
- pair .encrypted .pipe (socket);
2181
- socket .pipe (pair .encrypted );
2182
- ```
2183
-
2184
- can be replaced by:
2185
-
2186
- ``` js
2187
- secureSocket = tls .TLSSocket (socket, options);
2188
- ```
2189
-
2190
- where ` secureSocket ` has the same API as ` pair.cleartext ` .
2191
-
2192
2102
## ` tls.createServer([options][, secureConnectionListener]) `
2193
2103
2194
2104
<!-- YAML
@@ -2556,7 +2466,6 @@ added:
2556
2466
[ `tls.TLSSocket` ] : #class-tlstlssocket
2557
2467
[ `tls.connect()` ] : #tlsconnectoptions-callback
2558
2468
[ `tls.createSecureContext()` ] : #tlscreatesecurecontextoptions
2559
- [ `tls.createSecurePair()` ] : #tlscreatesecurepaircontext-isserver-requestcert-rejectunauthorized-options
2560
2469
[ `tls.createServer()` ] : #tlscreateserveroptions-secureconnectionlistener
2561
2470
[ `tls.getCACertificates()` ] : #tlsgetcacertificatestype
2562
2471
[ `tls.getCiphers()` ] : #tlsgetciphers
0 commit comments