mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-12-16 11:39:32 +08:00
fix(components): Fix all components's compile warning and enable warning checking
This commit is contained in:
@@ -224,6 +224,8 @@ static int pem_decrypt(const char *where, const char *end,
|
||||
MD5_CTX md5_ctx;
|
||||
AES_CTX aes_ctx;
|
||||
uint8_t key[32]; /* AES256 size */
|
||||
char *aes_str_0_ram = NULL;
|
||||
char *aes_str_1_ram = NULL;
|
||||
|
||||
if (password == NULL || strlen(password) == 0)
|
||||
{
|
||||
@@ -233,8 +235,8 @@ static int pem_decrypt(const char *where, const char *end,
|
||||
goto error;
|
||||
}
|
||||
|
||||
char *aes_str_0_ram = (char *)SSL_MALLOC(24);
|
||||
char *aes_str_1_ram = (char *)SSL_MALLOC(24);
|
||||
aes_str_0_ram = (char *)SSL_MALLOC(24);
|
||||
aes_str_1_ram = (char *)SSL_MALLOC(24);
|
||||
|
||||
system_get_string_from_flash(aes_str[0], aes_str_0_ram, 24);
|
||||
system_get_string_from_flash(aes_str[1], aes_str_1_ram, 24);
|
||||
|
||||
@@ -88,14 +88,14 @@ EXP_FUNC int STDCALL getdomainname(char *buf, int buf_size)
|
||||
}
|
||||
#endif
|
||||
|
||||
static const char * out_of_mem_str = "out of memory %s %d\n";
|
||||
//static const char * out_of_mem_str = "out of memory %s %d\n";
|
||||
|
||||
#define exit_now printf
|
||||
//#define SSL_LOG
|
||||
#ifdef SSL_LOG
|
||||
#define debug_now printf
|
||||
#else
|
||||
#define debug_now
|
||||
#define debug_now(fmt, ...)
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
|
||||
@@ -184,6 +184,8 @@ EXP_FUNC int STDCALL esp_base64_encode(uint8_t *dst, size_t dlen, size_t *olen,
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static char *key_password = NULL;
|
||||
@@ -1098,11 +1100,11 @@ void esp_ssl_sleep(uint16_t mseconds)
|
||||
vTaskDelay(mseconds / portTICK_RATE_MS);
|
||||
}
|
||||
|
||||
esp_ssl_CTX_set_client_cert_cb(){}
|
||||
void esp_ssl_CTX_set_client_cert_cb(){}
|
||||
|
||||
esp_ssl_CTX_set_mode(){}
|
||||
void esp_ssl_CTX_set_mode(){}
|
||||
|
||||
esp_ssl_pending()
|
||||
void esp_ssl_pending()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -54,8 +54,9 @@ EXP_FUNC SSL * STDCALL ssl_server_new(SSL_CTX *ssl_ctx, int client_fd)
|
||||
ssl->next_state = HS_CLIENT_HELLO;
|
||||
|
||||
#ifdef CONFIG_SSL_FULL_MODE
|
||||
if (ssl_ctx->chain_length == 0)
|
||||
if (ssl_ctx->chain_length == 0) {
|
||||
ssl_printf("Warning - no server certificate defined\n"); //TTY_FLUSH();
|
||||
}
|
||||
#endif
|
||||
|
||||
return ssl;
|
||||
|
||||
@@ -491,7 +491,7 @@ end_verify:
|
||||
/**
|
||||
* Used for diagnostics.
|
||||
*/
|
||||
static const char *not_part_of_cert = "<Not Part Of Certificate>";
|
||||
//static const char *not_part_of_cert = "<Not Part Of Certificate>";
|
||||
void x509_print(const X509_CTX *cert, CA_CERT_CTX *ca_cert_ctx)
|
||||
{
|
||||
if (cert == NULL)
|
||||
|
||||
Reference in New Issue
Block a user