espressif / esp-aws-iot

AWS IoT SDK for ESP32 based chipsets
Apache License 2.0
256 stars 153 forks source link

mbedtls_ssl_handshake returned -0x7780 (CA-321) #206

Open yasiralijaved opened 7 months ago

yasiralijaved commented 7 months ago

I am stuck for days into this problem with ESP32 WROOM 32D. I created a thing in aws iot core and downloaded the certificates. Then setup the tls_mutual_auth example in VS Code from https://github.com/espressif/esp-aws-iot/tree/master/examples/mqtt/tls_mutual_auth. Modified the cert folder with downloaded certificates but getting the error. Although the same certificates are working FINE when using MQTTX in Windows, it can connect, subscribe and publish without any issue.

esp-tls-mbedtls: mbedtls_ssl_handshake returned -0x7780
esp-tls-mbedtls: Certificate verified.
esp-tls: Failed to open new connection

coreMQTT: A clean MQTT connection is established. Cleaning up all the stored outgoing publishes.
coreMQTT: Subscribing to the MQTT topic MyDevice/example/topic.
coreMQTT: sendMessageVector: Unable to send packet: Network Error.
.
.
.
mbedtls: ssl_msg.c:4799 is a fatal alert message (msg 70)

mbedtls: ssl_msg.c:3942 mbedtls_ssl_handle_message_type() returned -30592 (-0x7780)

mbedtls: ssl_tls12_client.c:1199 mbedtls_ssl_read_record() returned -30592 (-0x7780)
.
.