简体   繁体   English

使用自签名证书运行节点HTTPS服务器是否违反了使用HTTPS的目的?

[英]Does running a node HTTPS server with a self-signed certificate defeat the purpose of using HTTPS?

I'm a bit confused here. 我在这里有点困惑。 I want to run a node server which will be queried from some clients. 我想运行一个可以从某些客户端查询的节点服务器。 I'm trying to use HTTPS, which I am not familiar with. 我正在尝试使用不熟悉的HTTPS。

After reading some guides and the node docs, I created a key and self signed certificate with openssl, and created a node HTTPS server. 阅读一些指南和节点文档后,我使用openssl创建了密钥和自签名证书,并创建了节点HTTPS服务器。 So far so good. 到现在为止还挺好。

The problem is, when trying to query it (I'm doing it from a node script as a test), I get an error: self signed certificate . 问题是,当尝试查询它时(我正在从节点脚本中进行测试),我得到一个error: self signed certificate Fixing this seems to involve using a rejectUnauthorized: false option when sending the request. 解决此问题似乎涉及在发送请求时使用rejectUnauthorized: false选项。

So my question: Does this defeat the purpose of using HTTPS, or is the communication still encrypted? 所以我的问题是:这是否违背了使用HTTPS的目的,还是通信仍处于加密状态?

With a self-signed cert, your traffic is encrypted , but not authenticated (leaving you open to man-in-the-middle attacks). 使用自签名证书,您的流量将被加密 ,但不会经过身份验证 (使您容易受到中间人攻击)。

You can get free certificates from Let's Encrypt ; 您可以从Let's Encrypt获得免费证书; why not use that? 为什么不使用它?

暂无
暂无

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

相关问题 Android Studio:如何将HTTPS请求发送到使用自签名证书的Node.js服务器? - Android Studio: How to send HTTPS requests to Node.js Server which is using self-signed certificate? 在Node.JS中带有自签名证书的HTTPS代理 - HTTPS proxy with a self-signed certificate in Node.JS 具有自签名证书的Https服务器 - Https server with self signed certificate 错误:自签名证书,node.JS https 客户端证书认证请求 - Error: Self-signed certificate, node.JS https client certificate authentication with request 在本地运行 firebase ZC1C42525268E68384FC1 时,如何使 https 工作并添加自签名 SSL 证书? - How to make https work and add a self-signed SSL certificate when running firebase function locally? Node.js 快速会话在 HTTP 上正常,session 未在 Z0E8433F9A404F1F3BA21Z01C 中恢复 - Node.js express-session ok on HTTP, session not recovered in HTTPS, localhost, self-signed certificate Node.js:如何向使用自签名证书的应用程序发送 HTTPS 请求 - Node.js: how to send HTTPS requests to an app which uses a self-signed certificate 使用 https.request 忽略 node.js 中无效的自签名 ssl 证书? - Ignore invalid self-signed ssl certificate in node.js with https.request? 在Swift 5中无法调用https请求(自签名证书) - Can't call https request(self-signed certificate) in the Swift 5 电子内部节点Web服务器的自签名证书 - Self-Signed Certificate for Node Web Server inside Electron
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM