MQTT客户端向服务端建立ssl连接报错

报错信息:

org.eclipse.paho.client.mqttv3.MqttException: MqttException

Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names present

我们向一个外网的EMQX建立连接,并且要使用SSL加密,加密过程中遇到了上述问题

记录解决:

甲方的mqtt版本:(甲方表示他用他提供的ca认证和连接demo代码可以建立连接)

bash 复制代码
        <dependency>
            <groupId>org.eclipse.paho</groupId>
            <artifactId>org.eclipse.paho.client.mqttv3</artifactId>
            <version>1.2.0</version>
        </dependency>

我的版本:(我的就会爆出上述错误,然后降低至甲方版本即可解决,后续深究原因)

bash 复制代码
        <dependency>
            <groupId>org.eclipse.paho</groupId>
            <artifactId>org.eclipse.paho.client.mqttv3</artifactId>
            <version>1.2.2</version>
        </dependency>
相关推荐
赤月奇4 天前
https改为http
数据挖掘·https·ssl
k7Cx7e5 天前
宝塔域名强制SSL和带www的方法
网络·网络协议·ssl
qq_316837755 天前
使用 certbot docker镜像生成阿里云域名ssl证书
阿里云·docker·ssl
文静小土豆5 天前
CentOS 7 升级 OpenSSL 3.5.4 详细指南
linux·运维·centos·ssl
biubiubiu07065 天前
Certbot 申请SSL证书的三种方式详解(Ubuntu 22.04环境)
网络·网络协议·ssl
宇宙核6 天前
FreeSSL实现域名证书免费无限自动续签续期流程
linux·服务器·ssl·持续部署
风早爽太6 天前
使用 CocoaPods 出现 SSL 证书验证失败错误的临时解决方案
ssl·cocoapods
qq_316837758 天前
caddy 使用阿里云的域名通过dns验证申请ssl证书
阿里云·云计算·ssl
无籽西瓜a10 天前
SSL/TLS工作流程以及HTTP与HTTPS详解
http·https·ssl
数据知道14 天前
PostgreSQL:如何配置数据库的传输层加密(SSL加密连接)
数据库·postgresql·ssl