wvanbergen / node-vertica

Pure javascript Vertica database client. Except it is written in CoffeeScript.
MIT License
44 stars 30 forks source link

[DEP0064] DeprecationWarning: tls.createSecurePair() is deprecated. Please use tls.TLSSocket instead. #64

Open cmegens opened 5 years ago

cmegens commented 5 years ago

Running the basics of this NPM plugin gives this error message. It doesn't allow the code to run fully, so the plugin is quite useless for me as it stands now.

I found the createSecurePair in starttls.js, line 7, but no idea how to fix this...

pair = require('tls').createSecurePair(sslcontext, false);

Also found this, which seems to describe the problem and a solution: https://nodejs.org/dist/latest-v6.x/docs/api/tls.html#tls_class_securepair which says:

Note: The tls.createSecurePair() method is now deprecated in favor of tls.TLSSocket(). For example, the code:

pair = tls.createSecurePair(/* ... */);
pair.encrypted.pipe(socket);
socket.pipe(pair.encrypted);

can be replaced by:


secure_socket = tls.TLSSocket(socket, options);
where secure_socket has the same API as pair.cleartext
```.
wvanbergen commented 5 years ago

I am not actively working on this library anymore, so don't expect em to have a fix for this any time soon. Happy to accept PRs that fix this issue though!

kefon94 commented 3 years ago

I am not actively working on this library anymore, so don't expect em to have a fix for this any time soon. Happy to accept PRs that fix this issue though!

Hi @wvanbergen This is the fix for this issue: https://github.com/wvanbergen/node-vertica/pull/67 Thanks, Kevin.