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

Supporting TLSSocket for Node 12.x or higher #67

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kefon94
Copy link

@kefon94 kefon94 commented Jul 6, 2021

Supporting TLSSocket for Node 12.x or higher

Issue

fix #64
createSecurePair is not longer supported on Node version 12.x or higher. The issue was difficult to find because of there isn't an error / exception thrown by this code.

Solution

  • Ask if TLSSocket exists and use it, if not then use createSecurePair for Node JS version 0.11.
  • The event listener called _tlsError was added in order to let devs know any issue with the connection to troubleshoot.
  • Some common code that was the pipe function was added to the main function . The pipe function keeps only the old implementation it needs for createSecurePair

Kevin Fonseca Araya and others added 2 commits July 6, 2021 10:16
@hulmgulm
Copy link

hulmgulm commented Jul 7, 2021

Which issue do you want to solve with this change? We're using this library with Node 14 and TLS works fine.

@hulmgulm-at-work
Copy link

Which issue do you want to solve with this change? We're using this library with Node 14 and TLS works fine.

Ok, digging deeper into it I understand now. Secure Pair is long deprecated in NodeJS and should be replaced by TLSSocket.

@kefon94
Copy link
Author

kefon94 commented Jul 8, 2021

Which issue do you want to solve with this change? We're using this library with Node 14 and TLS works fine.

Ok, digging deeper into it I understand now. Secure Pair is long deprecated in NodeJS and should be replaced by TLSSocket.

Hi @hulmgulm-at-work , I have added a better description of the issue, any other comment or suggest please let me know.
Thanks.

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 this pull request may close these issues.

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