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

TLS maxVersion not working #25267

Closed
ghost opened this issue Dec 29, 2018 · 4 comments
Closed

TLS maxVersion not working #25267

ghost opened this issue Dec 29, 2018 · 4 comments

Comments

@ghost
Copy link

ghost commented Dec 29, 2018

  • Version: v10.15.0
  • Platform: Windows 10 Home v10.0.14393 x64
  • Subsystem: TLS

When using TLS.connect() the options are passed to TLS.createSecureContext().
TLS.createSecureContext() can take a maxVersion argument which specifies the maximum TLS version to allow, however this doesn't work.
The snippet below demonstrates that when you pass a maxVersion value of TLSv1 the connection succeeds even though the domain personal.natwest.com does not support TLS 1.0

const TLS = require("tls");

let options = {
    port: 443,
    host: "personal.natwest.com",
    maxVersion: "TLSv1"
};

let socket = TLS.connect(options, () => {
    console.log("Success");
    socket.destroy();
}).on("error", (err) => {
    console.log("Error");
    socket.destroy();
});
@ZYSzys
Copy link
Member

ZYSzys commented Dec 29, 2018

TBH, The output is Error when I run the snippet above🤔.

@Trott
Copy link
Member

Trott commented Dec 29, 2018

minVersion and maxVersion were added in 11.4.0. So they will have no effect in 10.15.0.

@ghost
Copy link
Author

ghost commented Dec 29, 2018

Of course, sorry completely missed that

@ghost ghost closed this as completed Dec 29, 2018
@Trott
Copy link
Member

Trott commented Dec 29, 2018

minVersion and maxVersion are being added to 10.x in #24979 but that version won't be out until March, if all goes according to plan.

This issue was closed.
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

No branches or pull requests

2 participants