help icon indicating copy to clipboard operation
help copied to clipboard

Changes in TLS between Node v8 and v7

Open ezequiel-umu opened this issue 9 years ago • 2 comments

  • Node version: 7.10.1 - 8.7.0:
  • OS: Ubuntu 16.10
  • Runtime: HTTPS server Runtime

Using this code:

// This import is transpiled to a classical require.
import * as https from "https";

this.server = https.createServer({
  cert: this.cert, key: this.privKey, requestCert: true,
}, (request, response) => {
    ...
}

With version Node 7.10.1, I can connect using Java 1.8.0_131 64 bit, offering a client certificate.

But, with the same code in both server (NodeJS) and client (Java), when upgrading to version 8.7.0, the Java code throws an exception:

Remote host closed connection during handshake during web service communication

Is there any breaking change in TLS from v7 to v8?

https://stackoverflow.com/questions/46786863/ssl-in-node-8-vs-node-7

ezequiel-umu avatar Oct 18 '17 11:10 ezequiel-umu

@ezequiel-umu Do you have something like code and/or a setup that reproduces your problem? Can you try to look for the version of Node where this issue first occurred?

addaleax avatar Oct 18 '17 11:10 addaleax

The handshake relies upon negotiating an agreement about protocols, and determining trust based upon the certificate you are presenting. In terms of protocols, you should be using TLS 1.2 (because everything preceding is now considered weakened). Similarly, the hashing algorithms used to sign your certificate (as part of determining trust) are also subject to changes in perception as to whether they remain secure (or are now tractable to be brute-force attacked/collisions reduce effectiveness). You likely generated your client certificate using SHA1? SHA1 is now considered too weak, and all certificates should be re-generated signed with SHA2. I'd expect that you're relying on an aged client certificate that is no longer being treated as sufficient to establish the secure connection (or possibly even relied on a revoked certificate authority, or other breakdown in the trust chain!).

shellberg avatar Oct 18 '17 12:10 shellberg