Closed InfiniteYuan closed 5 years ago
Hi @InfiniteYuan1
Would it help to create a certificate with CN=xxx.com
and (as extension) alternative name yyy.com
?
it look that the implementation of lwip_gethostbyname is not able to got the alias list
there are other solution for this situation.
AFAIK there's no way to resolve DNS aliases through LwIP as is, so I can see two options: 1) Update LWIP/dns module to process nameservers in dns queries. 2) Send a separate udp packet with NS query and process responses in application code (which sounds better to me)
But still updating a certificate seems to me like the easiest option, there's no issue in having devices in field as it's the server certificate, client certificate can stay the same as well as the CA certificate for server verification in your device. Just update your backend the same way as if your server certificate expired.
What shoudl we do use LWIP/dns module to process nameservers in dns queries? And send a separate udp packet?Can you provide some doc for me, thank you.
I would suggest to continue with this conversation on the forum to get more feedback from more knowledge people. Plus it's not in scope of esp-mqtt
(nor issue with the library)
General idea is to took at dns packets and parse for NS entries (https://tools.ietf.org/html/rfc2929). I would not recommend updating dns module in lwip. As a separate query you can start with composing a packet (as outlined for example here https://github.com/tigerlyb/DNS-Lookup-Tool-in-Python/blob/master/dnslookup.py) and parse a response.
I have also encountered this problem when using the tls_mutual_auth routine, it is not clear why this problem occurs.
@LHYYSY I suggest that you open a new issue with the details of your problem. I also noticed that you are using coremqtt so this repository would not be the right place to ask.
Looking into your logs I can see the certificate could not be verified, check you have the correct certificates set.
we use different DNS record to point to endpoint cname
for example: xxx.com => yyy.com
this seem cause fail, because it look for yyy.com
please help me