m5stack / Core2-for-AWS-IoT-Kit

Accompanying code for use with AWS IoT Kit content. Works with PlatformIO and ESP-IDF v4.2.
https://m5stack.com/collections/m5-core/products/m5stack-core2-esp32-iot-development-kit-for-aws-iot-edukit
MIT License
127 stars 66 forks source link

ERROR: Unable to verify the server's certificate. #93

Closed Raunak-Singh-Inventor closed 2 years ago

Raunak-Singh-Inventor commented 2 years ago

@rashedtalukder Trying to connect to AWS IoT Core by using the code from Blinky-Hello-World project in my project. Here is the error I am getting:

␛[0;32mI (6566) STOCKLY: Connecting to AWS IoT Core at xxxxxxxxxxxxxx-ats.iot.us-west-2.amazonaws.com:8883␛[0m
␛[0;32mI (6616) aws_iot: Attempting to use device certificate from ATECC608␛[0m
␛[0;31mE (7666) aws_iot: failed! mbedtls_ssl_handshake returned -0x2700␛[0m
␛[0;31mE (7666) aws_iot:     Unable to verify the server's certificate. ␛[0m
␛[0;31mE (7666) STOCKLY: Error(-4) connecting to xxxxxxxxxxxxxx-ats.iot.us-west-2.amazonaws.com:8883␛[0m

main.c: https://github.com/Raunak-Singh-Inventor/stockly/blob/master/edukit_deployment/main/main.c#L88

rashedtalukder commented 2 years ago

Appears to be something wrong with the root CA. That's actually a separately attached file that should be included in the certs directory.

Raunak-Singh-Inventor commented 2 years ago

@rashedtalukder I have already included the aws-root-ca.pem file in main/certs. Could you give some pointers as how I could fix the root CA as it shows as active on the AWS console.

Raunak-Singh-Inventor commented 2 years ago

@rashedtalukder Any updates as to why the certificate is not valid? I really want to complete my project.

Raunak-Singh-Inventor commented 2 years ago

Hi Rasheed,

I am still waiting on your response?

rashedtalukder commented 2 years ago

Hey Raunak, I’m no longer with amazon as of a few weeks ago and don’t have access to some of the tools that would let me better help you. I’m hoping that someone from AWS will help you. If they don’t, let me know and I’ll schedule some time with you to debug it in a video call.

Raunak-Singh-Inventor commented 2 years ago

@rashedtalukder Thanks for the reply.

Could you please drop me an email with your new contact id.