简体   繁体   English

如何为node.js HTTPS服务器设置允许的协议?

[英]How to set the allowed protocol for a node.js HTTPS server?

I have built a HTTPS server using the default https module and express . 我已经使用默认的https模块并express了HTTPS服务器。

However, I can't find anywhere how to tell it to only use the latest version of TLS, nor any information on which version of SSL/TLS was supported by the default server. 但是,在任何地方都找不到如何告诉它仅使用TLS的最新版本的信息,也找不到任何关于默认服务器支持哪个版本的SSL / TLS的信息。

I did found some express middlware promising to enforce SSL , but SSL is obsolete since 2015, and there is still no information on which version is enforced. 我确实找到了一些有望实施SSL的明示中间件软件,但是SSL自2015年以来已过时,并且仍然没有有关实施哪个版本的信息。

How can I define which version of TLS to use for my app? 如何定义要用于我的应用程序的TLS版本? Or at least how to find out which version is used? 或至少如何找出使用哪个版本?

Have a look in the nodejs documentation. 看一下nodejs文档。 They refer to your OpenSSL version, for example here . 它们引用您的OpenSSL版本,例如here

So if you set secureProtocol in the options, you can choose the protocol. 因此,如果在选项中设置secureProtocol ,则可以选择协议。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM