Reputation: 760
I am moving my nodejs application from local to web server. When I test the DB connection(SQL Server using 'mssql' package) on my local machine, the connection is successful, but on the webserver I get the error message:
<node:6316> [DEP0064] DeprecationWarning: tls.createSecurePair() is deprecated.
Please use tls.Socket() instead.
The only difference I can think of is my local server npm version is 2.15.5 and web server npm version is 5.6.0. Do I need to install an old version of nodejs to make it work or there could be some way to make it work?
Thanks in advance
Upvotes: 2
Views: 4514
Reputation: 2438
This warning actually comes from the underlying TDS driver (see https://github.com/tediousjs/tedious/issues/515), and is currently (as of early 2018) receiving attention and attempts to resolve. It should also be noted that according to https://github.com/nodejs/node/pull/17882 the tls.createSecurePair()
API will remain in Node 8 which is now LTS until the end of 2019.
Furthermore, this is just a warning, but the functionality is still there. If you tcpdump
port 1433 you'll see that your connection is encrypted if you are using the encrypt
option.
Upvotes: 2