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

Remove deprecated secure pair in favor of tls.connect #5

Merged
merged 3 commits into from
Oct 4, 2017

Conversation

gangstead
Copy link

This fixes these deprecation warnings:

(node:5206) [DEP0064] DeprecationWarning: tls.createSecurePair() is deprecated. Please use tls.Socket instead.

Some Notes:

  • SecurePair is deprecated. Node tls docs say to use tls.TLSSocket()
    • tls.TLSSocket() doesn't seem to behave exactly as the docs say, it's an open issue
    • instead tls.connect() can reuse a socket
  • No longer need starttls or it's outdated dependencies
  • Fix license to pass npm's regex validation. License is still AGP-3

Steven Gangstead added 3 commits October 4, 2017 15:51
- SecurePair is deprecated and generates warnings when it's used
- Refactor to use `tls.TLSSocket()` to secure existing socket
- Do this inline instead of external `starttls` module
- Add package.lock
- Fix license regex warning
- You can pass an existing socket in the options of `tls.connect` and it will use that instead of creating a new one
- `new tls.TLSSocket` doesn't fire the right events despite what the docs say (they know it's an issue)
- Remove debug statements because I think I have it working
Copy link

@bigmarty bigmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

@bigmarty bigmarty merged commit 14b9594 into master Oct 4, 2017
@bigmarty bigmarty deleted the remove-secure-pair branch October 4, 2017 23:09
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.

2 participants