openssl_server example, Safari/macosx: SSL_accept() fails with 0

hpanther
Posts: 1
Joined: Mon Aug 13, 2018 2:07 am

openssl_server example, Safari/macosx: SSL_accept() fails with 0

Postby hpanther » Mon Aug 13, 2018 2:28 am

I have built the openssl_server example, using the default SSL cert and key. When I connect to the ESP32 via curl, this works:

Code: Select all

I (6608) event: sta ip: 172.16.189.151, mask: 255.255.254.0, gw: 172.16.189.244
I (6608) Openssl_example: SSL server context create ......
I (6608) Openssl_example: OK
I (6608) Openssl_example: SSL server context set own certification......
I (6618) Openssl_example: OK
I (6618) Openssl_example: SSL server context set private key......
I (6738) Openssl_example: OK
I (6738) Openssl_example: SSL server create socket ......
I (6738) Openssl_example: OK
I (6738) Openssl_example: SSL server socket bind ......
I (6748) Openssl_example: OK
I (6748) Openssl_example: SSL server socket listen ......
I (6748) Openssl_example: OK
I (6758) Openssl_example: SSL server create ......
I (6768) Openssl_example: OK
I (6768) Openssl_example: SSL server socket accept client ......
I (10818) Openssl_example: OK
I (10818) Openssl_example: SSL server accept client ......
I (17588) Openssl_example: OK
I (17588) Openssl_example: SSL server read message ......
I (17628) Openssl_example: SSL read: GET / HTTP/1.1
Host: 172.16.189.151
User-Agent: curl/7.54.0
Accept: */*


I (17628) Openssl_example: SSL get matched message
I (17628) Openssl_example: SSL write message
I (17638) Openssl_example: OK
However, when I attempt to load the page with Safari on macosx 10.13.16, I don't get the page. Safari asks to confirm the insecure page, but then doesn't load it, instead asks for the confirmation again. In the log, I added the output of result values. You can see that the failure occurs twice as Safari loads the page again immediately.

Code: Select all

I (17648) Openssl_example: SSL server create ......
I (17648) Openssl_example: OK
I (17648) Openssl_example: SSL server socket accept client ......
I (31918) Openssl_example: OK
I (31918) Openssl_example: SSL server accept client ......
I (40218) Openssl_example: failed with MBEDTLS_ERR = 0
I (40218) Openssl_example: SSL server create ......
I (40218) Openssl_example: OK
I (40218) Openssl_example: SSL server socket accept client ......
I (45388) Openssl_example: OK
I (45388) Openssl_example: SSL server accept client ......
I (48558) Openssl_example: failed with MBEDTLS_ERR = 0
Any help with this issue would be appreciated. Thanks!

Who is online

Users browsing this forum: Baidu [Spider] and 117 guests