mirror of
				https://github.com/espressif/esp-protocols.git
				synced 2025-11-04 08:31:37 +01:00 
			
		
		
		
	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 * Original commit: espressif/esp-idf@d823106aa6
		
			
				
	
	
		
			31 lines
		
	
	
		
			691 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			691 B
		
	
	
	
		
			C++
		
	
	
	
	
	
/*
 | 
						|
 * SPDX-FileCopyrightText: 2018-2021 Espressif Systems (Shanghai) CO LTD
 | 
						|
 *
 | 
						|
 * SPDX-License-Identifier: Apache-2.0
 | 
						|
 */
 | 
						|
#ifndef _ESP_EXCEPTION_H_
 | 
						|
#define _ESP_EXCEPTION_H_
 | 
						|
 | 
						|
//
 | 
						|
// This exception stub is enabled only if exceptions are disabled in menuconfig
 | 
						|
//
 | 
						|
#if !defined(CONFIG_COMPILER_CXX_EXCEPTIONS) && defined (ASIO_NO_EXCEPTIONS)
 | 
						|
 | 
						|
#include "esp_log.h"
 | 
						|
 | 
						|
//
 | 
						|
// asio exception stub
 | 
						|
//
 | 
						|
namespace asio {
 | 
						|
namespace detail {
 | 
						|
template <typename Exception>
 | 
						|
void throw_exception(const Exception& e)
 | 
						|
{
 | 
						|
  ESP_LOGE("esp32_asio_exception", "Caught exception: %s!", e.what());
 | 
						|
  abort();
 | 
						|
}
 | 
						|
}}
 | 
						|
#endif // CONFIG_COMPILER_CXX_EXCEPTIONS==1 && defined (ASIO_NO_EXCEPTIONS)
 | 
						|
 | 
						|
#endif // _ESP_EXCEPTION_H_
 |