Git Product home page Git Product logo

Comments (3)

iamlook avatar iamlook commented on July 20, 2024 1

这是因为 nettype_tls_init 的时候用 传入的host(服务器地址) 来初始化 ssl 的hostname了 mbedtls_ssl_set_hostname .
而ssl里面的hostname是mbedtls用来校验证书的CN的, 所以合理的方法是给 mqtt_client_t 加上一个 ca_cn 之类的成员用来在初始化的时候传入多一个发证机构名, 然后用这个名字来 mbedtls_ssl_set_hostname .
如果你证书是自己写死的, 可以干脆不去 verify 了.

from mqttclient.

jiejieTop avatar jiejieTop commented on July 20, 2024

这个应该是代码中mbedtls没处理正确,我之前有发现这个问题

from mqttclient.

ThomasVon2021 avatar ThomasVon2021 commented on July 20, 2024

root@63a364bdf4db:~/service/mqttclient-master/mqttclient-master/build# ./bin/emqx_example

welcome to mqttclient test...

[E] >> /root/service/mqttclient-master/mqttclient-master/network/nettype_tls.c:30 server_certificate_verify()... server_certificate_verify failed returned 0x0008

[E] >> /root/service/mqttclient-master/mqttclient-master/network/nettype_tls.c:149 nettype_tls_connect()...mbedtls handshake failed returned 0x0008
[I] >> /root/service/mqttclient-master/mqttclient-master/mqttclient/mqttclient.c:1473 mqtt_list_subscribe_topic()... there are no subscribed topics..
是的,请问可以修复一下此bug吗,我也发现了类似的问题

from mqttclient.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.