|
From: | Giuseppe Modugno |
Subject: | Re: [lwip-devel] altcp_tls_mbedtls: MBEDTLS_ECP_RESTARTABLE |
Date: | Tue, 25 Jun 2019 16:40:21 +0200 |
User-agent: | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 |
Il 25/06/2019 14:29, Simon Goldschmidt ha scritto:
"Giuseppe Modugno" wrote:No it doesn't work. Poll callback is called only 2 times a second. mbedtls_handshake() must be called several times until it doesn't return CRYPTO_IN_PROGRESS. With poll callback the handshake would take too much time. Another possibility is to fire a timeout that is already expired: sys_timeout(0, ...). Do you think there's a better solution?Not really. If you implement the sys_timeout() thing, you might want to find a solution that doesn't use one sys_timeout() per connection.
In my case I have only one TLS connection, so it's not important.
And a fallback to using 'poll' might be good as well (as sys_timeout() can fail due to lack of resources).
As I said, poll can't be used because it is called only two times per second.
[Prev in Thread] | Current Thread | [Next in Thread] |