Please help me, I try connect to AWS iot.
But I get fail after start handshake.
I read SSL manual, also create and flash binary CA, client cert and RSA key that I take from Amazon.
I converted (pem) format to (der) format and convert to binary for flash.
I flash this binary (esp_ca_cert.bin - 0x3A000 ) and (esp_cert_private_key.bin - 0x7E000)
Code: Select all
espconn_secure_ca_enable(ESPCONN_CLIENT, 0x3A);
espconn_secure_cert_req_enable(ESPCONN_CLIENT, 0x7E);
After this I flash example code that have in mbedtls SDK.
(with my port and AWS url)
but i get error.
espconn connect return 0 !
client handshake start.
espconn_mbedtls.c 652, type[certificate],length[862]
espconn_mbedtls.c 652, type[certificate],length[862]
espconn_mbedtls.c 652, type[certificate],length[862]
espconn_mbedtls.c 652, type[private_key],length[1191]
espconn_mbedtls.c 652, type[!▒▒`▒▒▒n(],length[22132]
E:M 22144
client handshake failed!
Reason:[-0x7f00]
reconnect callback, error code -127 !
pm open,type:0 0
Maybe someone has a working example or a guide to setting up and loading certificates for mbed TLS SDK.
Thank you!