@@ -570,32 +570,6 @@ The `cryptoStream.bytesWritten` property returns the total number of bytes
570570written to the underlying socket _ including_  the bytes required for the
571571implementation of the TLS protocol.
572572
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- 
599573## Class: ` tls.Server `   
600574
601575<!--  YAML
@@ -2125,70 +2099,6 @@ be used to create custom parameters. The key length must be greater than or
21252099equal to 1024 bits or else an error will be thrown. Although 1024 bits is
21262100permissible, use 2048 bits or larger for stronger security.
21272101
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- 
21922102## ` tls.createServer([options][, secureConnectionListener]) `  
21932103
21942104<!--  YAML
@@ -2556,7 +2466,6 @@ added:
25562466[ `tls.TLSSocket` ] : #class-tlstlssocket 
25572467[ `tls.connect()` ] : #tlsconnectoptions-callback 
25582468[ `tls.createSecureContext()` ] : #tlscreatesecurecontextoptions 
2559- [ `tls.createSecurePair()` ] : #tlscreatesecurepaircontext-isserver-requestcert-rejectunauthorized-options 
25602469[ `tls.createServer()` ] : #tlscreateserveroptions-secureconnectionlistener 
25612470[ `tls.getCACertificates()` ] : #tlsgetcacertificatestype 
25622471[ `tls.getCiphers()` ] : #tlsgetciphers 
0 commit comments