Forcing TLS 1.1 or higher on node.js

node.js, ssl

Solution

TLS 1.0 should no longer be used. This works to disable TLS 1.0 in node.js:

https.createServer({
        secureOptions: require('constants').SSL_OP_NO_TLSv1,
        pfx: fs.readFileSync(path.resolve(pathToCert))
    }, app).listen(443);

You can verify this using this tool: ssllabs

Problem

I'm trying to create a server that would use TLS 1.1 or higher. This is my current TLS configuration: ``` var options = {}; options.key = fs.readFileSync('privatekey.pem'); options.cert = fs.readFileSync('certificate.pem'); options.secureProtocol = 'TLSv1_server_method'; options.ciphers = "AES128-GCM-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH"; options.honorCipherOrder = true; httpServer = https.createServer(options, app); ``` Just as was suggested here From reading Openssl's guide here I didn't find anything about TLS 1.1 Any suggestions?

Original source