asio: Basic SSL/TLS support in asio port for ESP platform

This port employs IDF port of OpenSSL for most common features, others
are discouraged or not supported. The port also introduces several stubs
for OpenSSL functions which ASIO needs to get compiled and linked.

Upstream ASIO supports WolfSSL as SSL/TLS stack, as well, which is
another option for SSL support in ASIO on ESP platform.
This commit is contained in:
David Cermak
2020-06-05 16:17:01 +02:00
committed by bot
parent 085d2b8d25
commit 9459c0dd43
10 changed files with 292 additions and 11 deletions
+3 -3
View File
@@ -276,14 +276,14 @@ failed1:
return 0;
}
#define ESP_OPENSSL_FILES_NOT_SUPPORTED 1
#define ESP_OPENSSL_FILES_IS_SUPPORTED 0
/**
* @brief load the private key file into SSL context
*/
int SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type)
{
// Using file name as private key is discouraged
SSL_ASSERT1(ESP_OPENSSL_FILES_NOT_SUPPORTED);
SSL_ASSERT1(ESP_OPENSSL_FILES_IS_SUPPORTED);
return -1;
}
@@ -293,7 +293,7 @@ int SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type)
int SSL_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type)
{
// Using file name as private key is discouraged
SSL_ASSERT1(ESP_OPENSSL_FILES_NOT_SUPPORTED);
SSL_ASSERT1(ESP_OPENSSL_FILES_IS_SUPPORTED);
return -1;
}