Hi @roneld01
Thanks, it worked. Now it is really non-blocking, I have tested. I did this way:
mbedtls_ssl_set_bio(&ssl, &server_fd, mbedtls_net_send, mbedtls_net_recv, NULL);
mbedtls_net_set_nonblock(&server_fd);
But now I have another ‘problem’, maybe the last.
Is is about the certificate, I am getting the following messages:
Failed to verify peer certificate!
The certificate is not correctly signed by the trusted CA.
Currently, for incoming/outgoing fragment length, I am using both at 2.5KB, but I also tested with both at 4KB and got the same messages. I have just suspected on this, but is seems to not be the issue.
Here is my current code:
I suspect on the NULL of line 488…
The code shows on line 487: mbedtls_ssl_conf_authmode(&conf, MBEDTLS_SSL_VERIFY_OPTIONAL);
If I change to MBEDTLS_SSL_VERIFY_REQUIRED, the connection to the server does not work.
And to say, there is a file server_root_cert.pem on the main folder of my application. And in my application I am only HTTPS client always, never a server.
Do you have idea on how to solve this?
Regards.