mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
Allow non-blocked ssl_client_new() operation.
git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@194 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
This commit is contained in:
parent
7ddde6ec6b
commit
f2dabd56b7
@ -82,6 +82,7 @@ extern "C" {
|
||||
#define SSL_DISPLAY_BYTES 0x00100000
|
||||
#define SSL_DISPLAY_CERTS 0x00200000
|
||||
#define SSL_DISPLAY_RSA 0x00400000
|
||||
#define SSL_CLIENT_NON_BLOCKING 0x00800000
|
||||
|
||||
/* errors that can be generated */
|
||||
#define SSL_OK 0
|
||||
|
@ -151,6 +151,8 @@ int do_client_connect(SSL *ssl)
|
||||
ssl->hs_status = SSL_NOT_OK; /* not connected */
|
||||
|
||||
/* sit in a loop until it all looks good */
|
||||
if (!IS_SET_SSL_FLAG(SSL_CLIENT_NON_BLOCKING))
|
||||
{
|
||||
while (ssl->hs_status != SSL_OK)
|
||||
{
|
||||
ret = basic_read(ssl, NULL);
|
||||
@ -170,6 +172,7 @@ int do_client_connect(SSL *ssl)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ssl->hs_status = ret; /* connected? */
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user