Skip to content

TLS maxVersion not working #25267

@ghost

Description

  • 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();
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions