forked from espressif/arduino-esp32
Update IDF, fix SS definition, add custom partitions and debug level selection (#174)
* Add build time partitions compilation * Fix wrong definition of SS pin * Add support for core debug level selection * update idf libs
This commit is contained in:
@ -15,34 +15,6 @@
|
||||
#ifndef _SSL_OPT_H_
|
||||
#define _SSL_OPT_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* if not define "ESP32_IDF_PLATFORM", system will use esp8266 platform interface
|
||||
*/
|
||||
#define ESP32_IDF_PLATFORM
|
||||
|
||||
/**
|
||||
* openssl debug print function enable
|
||||
*/
|
||||
#define SSL_DEBUG_ENBALE 0
|
||||
|
||||
/**
|
||||
* openssl debug print function level. function whose level is lower that "SSL_DEBUG_LEVEL"
|
||||
* will not print message
|
||||
*/
|
||||
#define SSL_DEBUG_LEVEL 0
|
||||
|
||||
/**
|
||||
* openssl assert function enable, it will check the input paramter and print the message
|
||||
*/
|
||||
#define SSL_ASSERT_ENABLE 0
|
||||
|
||||
/**
|
||||
* openssl location function enable, it will print location of the positioning error
|
||||
*/
|
||||
#define SSL_DEBUG_LOCATION_ENABLE 0
|
||||
#include "sdkconfig.h"
|
||||
|
||||
#endif
|
||||
|
@ -19,6 +19,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include "ssl_types.h"
|
||||
#include "ssl_port.h"
|
||||
|
||||
@ -53,4 +54,8 @@ int pkey_pm_load(EVP_PKEY *pk, const unsigned char *buffer, int len);
|
||||
|
||||
long ssl_pm_get_verify_result(const SSL *ssl);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -19,31 +19,27 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "platform/ssl_opt.h"
|
||||
|
||||
#ifdef ESP32_IDF_PLATFORM
|
||||
|
||||
#include "esp_types.h"
|
||||
#include "esp_log.h"
|
||||
#include "string.h"
|
||||
#include "malloc.h"
|
||||
|
||||
void *ssl_mem_zalloc(size_t size);
|
||||
void *ssl_mem_malloc(size_t size);
|
||||
void ssl_mem_free(void *p);
|
||||
|
||||
void* ssl_memcpy(void *to, const void *from, size_t size);
|
||||
size_t ssl_strlen(const char *src);
|
||||
#define ssl_mem_malloc malloc
|
||||
#define ssl_mem_free free
|
||||
|
||||
void ssl_speed_up_enter(void);
|
||||
void ssl_speed_up_exit(void);
|
||||
#define ssl_memcpy memcpy
|
||||
#define ssl_strlen strlen
|
||||
|
||||
#define SSL_PRINT_LOG(fmt, ...) ESP_LOGD("openssl", fmt, ##__VA_ARGS__)
|
||||
#define SSL_ERROR_LOG(fmt, ...) ESP_LOGE("openssl", fmt, ##__VA_ARGS__)
|
||||
#define SSL_LOCAL_LOG(fmt, ...) ESP_LOGD("openssl", fmt, ##__VA_ARGS__)
|
||||
#define ssl_speed_up_enter()
|
||||
#define ssl_speed_up_exit()
|
||||
|
||||
#elif defined(SSL_PLATFORM_USER_INCLUDE)
|
||||
|
||||
SSL_PLATFORM_USER_INCLUDE
|
||||
#define SSL_DEBUG_FL
|
||||
#define SSL_DEBUG_LOG(fmt, ...) ESP_LOGI("openssl", fmt, ##__VA_ARGS__)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user