mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
d823106aa6
Implement asio-ssl layer with three classes in asio::ssl::mbedtls: * context -- replaces SSL_CTX, used mainly as a container to options, certs, keys * engine -- replaces SSL, implements the actual mbedtls operations * bio -- implements openssl BIO specifically tailered to mbedtls and its asio usage Further updates: * asio: Used shared_ptr<> for bio pairs * asio: Add error checks to mbedtls-bio * asio: Address potential ssl-context ownership issue * asio: Address potential bio-engine ownership issue
46 lines
1.0 KiB
C
46 lines
1.0 KiB
C
/*
|
|
* SPDX-FileCopyrightText: 2018-2021 Espressif Systems (Shanghai) CO LTD
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
#ifndef _ESP_ASIO_CONFIG_H_
|
|
#define _ESP_ASIO_CONFIG_H_
|
|
|
|
//
|
|
// Enabling exceptions only when they are enabled in menuconfig
|
|
//
|
|
# include <sdkconfig.h>
|
|
# ifndef CONFIG_COMPILER_CXX_EXCEPTIONS
|
|
# define ASIO_NO_EXCEPTIONS
|
|
# endif // CONFIG_COMPILER_CXX_EXCEPTIONS
|
|
|
|
# ifndef CONFIG_COMPILER_RTTI
|
|
# define ASIO_NO_TYPEID
|
|
# endif // CONFIG_COMPILER_RTTI
|
|
|
|
//
|
|
// LWIP compatibility inet and address macros/functions
|
|
//
|
|
# define LWIP_COMPAT_SOCKET_INET 1
|
|
# define LWIP_COMPAT_SOCKET_ADDR 1
|
|
|
|
//
|
|
// Specific ASIO feature flags
|
|
//
|
|
# define ASIO_DISABLE_SERIAL_PORT
|
|
# define ASIO_SEPARATE_COMPILATION
|
|
# define ASIO_STANDALONE
|
|
# define ASIO_HAS_PTHREADS
|
|
|
|
# ifdef CONFIG_ASIO_USE_ESP_OPENSSL
|
|
# define ASIO_USE_ESP_OPENSSL
|
|
# define OPENSSL_NO_ENGINE
|
|
# define ASIO_SSL_DETAIL_OPENSSL_TYPES_HPP
|
|
# include "openssl_stub.hpp"
|
|
|
|
# elif CONFIG_ASIO_USE_ESP_WOLFSSL
|
|
# define ASIO_USE_WOLFSSL
|
|
# endif // CONFIG_ASIO_USE_ESP_OPENSSL
|
|
|
|
#endif // _ESP_ASIO_CONFIG_H_
|