mbedtls TLS 1.2 AWS connection.

maksym.shestirko
Posts: 1
Joined: Mon Oct 31, 2016 7:39 am

mbedtls TLS 1.2 AWS connection.

Postby maksym.shestirko » Mon Oct 31, 2016 8:11 am

Hi All!
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!
Attachments
tls.PNG

Who is online

Users browsing this forum: No registered users and 59 guests