Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cmegens opened this issue Apr 9, 2019 · 2 comments · May be fixed by #67

Comments

@cmegens
Copy link

cmegens commented Apr 9, 2019

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
Copy link
Owner

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 kefon94 linked a pull request Jul 8, 2021 that will close this issue
@kefon94
Copy link

kefon94 commented Jul 8, 2021

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: #67
Thanks, Kevin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants