Express HTTPS - 无法安全连接 - SSLv3 损坏的协议

Express HTTPS - unable to connect securely- SSLv3 broken protocol

尝试使 HTTPS 服务器在 Express 4 上运行,但是出现 SSLv3 安全错误(请参见图片)。据我了解,由于 POODLE 攻击,浏览器不再支持 SSLv3 协议。

如何让HTTPS服务器使用TLS1.2协议?

var express = require('express'),
app = express(),
fs = require('fs'),
https = require('https'),
key = fs.readFileSync('/usr/local/etc/ssl/key.pem'),
cert = fs.readFileSync('/usr/local/etc/ssl/cert.pem'),
https_options = {
    key: key,
    cert: cert
},
PORT = 8000,
HOST = 'localhost';

https.createServer(https_options.key, app).listen(PORT);

app.get('/', function(req, res) {
  res.send('Hello');
});

module.exports = app;

服务器正在侦听localhost:8000

错误

尝试创建这样的服务器

它在我身边工作正常,

var server = require('https').createServer(options, app),
server.listen(port);

或者如果想添加套接字

var server = require('https').createServer(options, app),
io = require('socket.io').listen(server);
server.listen(port);