ESP8266 Developer Zone The Official ESP8266 Forum 2017-04-07T14:20:20+08:00 https://bbs.espressif.com:443/feed.php?f=65&t=3634 2017-04-07T14:20:20+08:00 2017-04-07T14:20:20+08:00 https://bbs.espressif.com:443/viewtopic.php?t=3634&p=12067#p12067 <![CDATA[Re: TSL Handshaking failed due to Error: Cert is self-signed]]> I'll let you know if I can figure out what this is.

Statistics: Posted by Guest — Fri Apr 07, 2017 2:20 pm


]]>
2017-04-06T06:53:22+08:00 2017-04-06T06:53:22+08:00 https://bbs.espressif.com:443/viewtopic.php?t=3634&p=12029#p12029 <![CDATA[Re: TSL Handshaking failed due to Error: Cert is self-signed]]> in particular for the suggestion of inserting it dynamically which is also good in a case of the certificate revocation.

By the way, do you happen to know anything about the error message during the client authentication


client handshake start.
espconn_mbedtls.c 652, type[private_key],length[1675]
client handshake failed!
Reason:[-0x7f00]


That one seems a lot more puzzling. I am using the TLSv1.2 during the handshake and inserted the private key-certificate at the location 7A.

Regards
Damir

Statistics: Posted by ddze7374 — Thu Apr 06, 2017 6:53 am


]]>
2017-04-05T14:51:36+08:00 2017-04-05T14:51:36+08:00 https://bbs.espressif.com:443/viewtopic.php?t=3634&p=12012#p12012 <![CDATA[Re: TSL Handshaking failed due to Error: Cert is self-signed]]> If the ESP8266 is working as a server, the client needs to ignore the fact that the certificate is not a valid one. Browsers like Firefox will ask you to add a security exception in that case.

Statistics: Posted by Guest — Wed Apr 05, 2017 2:51 pm


]]>
2017-04-03T19:10:40+08:00 2017-04-03T19:10:40+08:00 https://bbs.espressif.com:443/viewtopic.php?t=3634&p=11890#p11890 <![CDATA[TSL Handshaking failed due to Error: Cert is self-signed]]> following the procedure to establish a TSL communication found in the UserManual 5A-ESP8266_SDK_SSL v1.4 (the most recent I could get) a CA certificate in DER format is flashed to the ESP8266-01 at the location 7C (7C000). The certificate is of a self-signed type.

Unfortunately, running the code flags an error

ca.cer 391
distinguished names: [broker], [broker]
distinguished names: [anon-org], [anon-org]
distinguished names: [machine], [machine]
a self-signed certificate that is not in the CA store
before 1490486400, tv_sec 1491244537, after 1963526400
distinguished names: [broker], [broker]
distinguished names: [anon-org], [anon-org]
distinguished names: [machine], [machine]
client handshake failed
Error: cert is self-signed

PORT CLOSED


So, I am not clear with the meaning of the messages. Are they telling that the certificate is not found in the flash (though the first lign detects the certificate ca.cer 391). Or it is that the ESP8266 handshaking routine cannot deal with the self-signed certificates.

I tried to look-up in the code but only traced the call to the espconn_secure_connect but cannot go beyond the declaration in the header file.
Appreciate any clarification.
Regards

Statistics: Posted by ddze7374 — Mon Apr 03, 2017 7:10 pm


]]>