mirror of
https://github.com/espressif/esp-idf.git
synced 2026-05-05 04:15:21 +02:00
asio: option to use wolfSSL as TLS stack for ASIO
Plus other minor update, make openssl aware of current modes (SSL_set_mode) Update coding style in examples and tests, including copyright notices
This commit is contained in:
@@ -1597,7 +1597,9 @@ void SSL_set_verify_depth(SSL *ssl, int depth)
|
||||
void SSL_CTX_set_verify(SSL_CTX *ctx, int mode, int (*verify_callback)(int, X509_STORE_CTX *))
|
||||
{
|
||||
SSL_ASSERT3(ctx);
|
||||
SSL_ASSERT3(ESP_OPENSSL_VERIFYCB_IS_SUPPORTED);
|
||||
if (verify_callback) {
|
||||
SSL_ASSERT3(ESP_OPENSSL_VERIFYCB_IS_SUPPORTED);
|
||||
}
|
||||
|
||||
ctx->verify_mode = mode;
|
||||
ctx->default_verify_callback = verify_callback;
|
||||
@@ -1609,7 +1611,9 @@ void SSL_CTX_set_verify(SSL_CTX *ctx, int mode, int (*verify_callback)(int, X509
|
||||
void SSL_set_verify(SSL *ssl, int mode, int (*verify_callback)(int, X509_STORE_CTX *))
|
||||
{
|
||||
SSL_ASSERT3(ssl);
|
||||
SSL_ASSERT3(ESP_OPENSSL_VERIFYCB_IS_SUPPORTED);
|
||||
if (verify_callback) {
|
||||
SSL_ASSERT3(ESP_OPENSSL_VERIFYCB_IS_SUPPORTED);
|
||||
}
|
||||
|
||||
ssl->verify_mode = mode;
|
||||
ssl->verify_callback = verify_callback;
|
||||
@@ -1669,3 +1673,12 @@ int SSL_CTX_set_alpn_protos(SSL_CTX *ctx, const unsigned char *protos, unsigned
|
||||
ctx->ssl_alpn.alpn_list[i] = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the mode, but might assert if the related mode is not supported once session starts
|
||||
*/
|
||||
uint32_t SSL_set_mode(SSL *ssl, uint32_t mode)
|
||||
{
|
||||
ssl->mode |= mode;
|
||||
return ssl->mode;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user