2019-02-28 12:57 PM
Hello,
i am currently using the x-cube-cld-gen on the 32f769idiscovery board. Everything works fine with the server test.mosquitto.org. We are trying to make a local network, when we use a local mosquitto server on our network with a dns to use a certification we are not able to trouble the server with the dns. With the ip address it works well but without TLS. We have no local dns server. Can you help us with this point?
2019-06-12 08:14 AM
Hi,
when the connection starts, during the TLS handshake phase, the TLS client verifies that the Common Name of the X509 certificate presented by the server matches the hostname of the remote host. In case of mismatch, the client immediately closes the TLS connection.
As far as I could test, it is not possible to use an IPv4 address as Common Name of the server certificate: mbedTLS would report a mismatch anyway.
If the server address cannot be resolved through DNS, there is however a possible workaround:
Note: Mind to also double-check to sign your server certificate with the Certification Authority whose certificate is used by the embedded application as Root CA. If it is not the case, the server certificate verification will fail as well, even if the Common Name matches.
-- grd