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

Add support for TLS 1.3 #2

Closed
styfle opened this issue Nov 12, 2019 · 1 comment · Fixed by #3
Closed

Add support for TLS 1.3 #2

styfle opened this issue Nov 12, 2019 · 1 comment · Fixed by #3
Labels
enhancement New feature or request

Comments

@styfle
Copy link
Owner

styfle commented Nov 12, 2019

Blocked by nodejs/node#30367

@styfle styfle added the enhancement New feature or request label Nov 12, 2019
@styfle
Copy link
Owner Author

styfle commented Nov 12, 2019

This can be implemented with minVersion and maxVersion and we'll need to change the node engines to Node 12 or newer. https://nodejs.org/api/tls.html#tls_tls_createsecurecontext_options

const { createSecureContext, connect }  = require('tls');
const v = 'TLSv1.3';
const hostname = 'zeit.co';
const opt = {
  host: hostname,
  servername: hostname,
  port: 443,
  secureContext: createSecureContext({ minVersion: v, maxVersion: v })
};
const socket = connect(opt); // etc

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

Successfully merging a pull request may close this issue.

1 participant