node.js - 在 TLS 中使用自签名证书如何使一个人受到中间人攻击?

标签 node.js ssl certificate mqtt tls1.2

我正在尝试在 node.js 上的 MQTT 中实现安全性。我不太明白下面的段落。

https://github.com/mqttjs/MQTT.js

In case mqtts (mqtt over tls) is required, the options object is passed through to tls.connect(). If you are using a self-signed certificate, pass the rejectUnauthorized: false option. Beware that you are exposing yourself to man in the middle attacks, so it is a configuration that is not recommended for production environments.

最佳答案

如果您使用 rejectUnauthorized,则客户端将接受来自远程系统的任何证书。

这意味着攻击者可以创建他们自己的自签名证书,并将他们自己插入到您和您的经纪人之间,而您将无法知道他们有。

如果你用我在另一个question的回答中提到的方法您可以确定您正在使用您的证书连接到代理

关于node.js - 在 TLS 中使用自签名证书如何使一个人受到中间人攻击?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40036725/

相关文章:

node.js - 是否需要在nodejs中关闭mongodb连接?

node.js - S3.getSignedUrl 接受多种内容类型

基于另一个 http(s) 查询的 node.js (restify) 服务器响应

ssl - 嵌入式网络服务器和证书

ssl - nginx www 重定向到非 www 抛出证书错误

ios - Cordova visual studio ios 代理配置

javascript - 将 mac Node 脚本转换为 windows

java - 公钥和 keystore 不匹配

azure - 如何使用 Powershell 获取与服务主体关联的证书的指纹?

c# - 读取客户端证书容器名称