File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -235,4 +235,6 @@ exports.TLSSocket = require('_tls_wrap').TLSSocket;
235235exports . Server = require ( '_tls_wrap' ) . Server ;
236236exports . createServer = require ( '_tls_wrap' ) . createServer ;
237237exports . connect = require ( '_tls_wrap' ) . connect ;
238- exports . createSecurePair = require ( '_tls_legacy' ) . createSecurePair ;
238+ exports . createSecurePair = internalUtil . deprecate ( function ( ) {
239+ return require ( '_tls_legacy' ) . createSecurePair . apply ( null , arguments ) ;
240+ } , 'tls.createSecurePair is deprecated. Use tls.TLSSocket instead.' ) ;
Original file line number Diff line number Diff line change 1+ 'use strict' ;
2+ const common = require ( '../common' ) ;
3+ const tls = require ( 'tls' ) ;
4+
5+ common . expectWarning ( 'DeprecationWarning' , [
6+ 'tls.createSecurePair is deprecated. Use tls.TLSSocket instead.'
7+ ] ) ;
8+
9+ try {
10+ tls . createSecurePair ( ) ;
11+ } catch ( err ) { }
You can’t perform that action at this time.
0 commit comments