feat(ssl): Don't need ICACHE_RODATA_ATTR for const

This commit is contained in:
Wu Jian Gang
2018-04-09 20:04:36 +08:00
parent 5ee5ade025
commit 3720ca8dba
23 changed files with 127 additions and 127 deletions

View File

@ -55,7 +55,7 @@ static const char mem_debug_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__;
(b)[(i) + 3] = (uint8_t) ((n) ); \
}
static const uint8_t sha256_padding[64] ICACHE_RODATA_ATTR STORE_ATTR =
static const uint8_t sha256_padding[64] =
{
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

View File

@ -49,7 +49,7 @@
static const char mem_debug_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__;
#endif
static const uint8_t padding[128] ICACHE_RODATA_ATTR STORE_ATTR =
static const uint8_t padding[128] =
{
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@ -61,7 +61,7 @@ static const uint8_t padding[128] ICACHE_RODATA_ATTR STORE_ATTR =
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
static const uint64_t k[80] ICACHE_RODATA_ATTR STORE_ATTR =
static const uint64_t k[80] =
{
0x428A2F98D728AE22ULL, 0x7137449123EF65CDULL, 0xB5C0FBCFEC4D3B2FULL, 0xE9B5DBA58189DBBCULL,
0x3956C25BF348B538ULL, 0x59F111F1B605D019ULL, 0x923F82A4AF194F9BULL, 0xAB1C5ED5DA6D8118ULL,

View File

@ -81,7 +81,7 @@ static const char mem_debug_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__;
/*
* AES S-box
*/
static const uint8_t aes_sbox[256] ICACHE_RODATA_ATTR STORE_ATTR =
static const uint8_t aes_sbox[256] =
{
0x63,0x7C,0x77,0x7B,0xF2,0x6B,0x6F,0xC5,
0x30,0x01,0x67,0x2B,0xFE,0xD7,0xAB,0x76,
@ -120,7 +120,7 @@ static const uint8_t aes_sbox[256] ICACHE_RODATA_ATTR STORE_ATTR =
/*
* AES is-box
*/
static const uint8_t aes_isbox[256] ICACHE_RODATA_ATTR STORE_ATTR =
static const uint8_t aes_isbox[256] =
{
0x52,0x09,0x6a,0xd5,0x30,0x36,0xa5,0x38,
0xbf,0x40,0xa3,0x9e,0x81,0xf3,0xd7,0xfb,
@ -156,7 +156,7 @@ static const uint8_t aes_isbox[256] ICACHE_RODATA_ATTR STORE_ATTR =
0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d
};
static const unsigned char Rcon[30] ICACHE_RODATA_ATTR STORE_ATTR =
static const unsigned char Rcon[30] =
{
0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,
0x1b,0x36,0x6c,0xd8,0xab,0x4d,0x9a,0x2f,

View File

@ -61,7 +61,7 @@ static HCRYPTPROV gCryptProv;
static uint8_t entropy_pool[ENTROPY_POOL_SIZE];
#endif
const char unsupported_str[] ICACHE_RODATA_ATTR STORE_ATTR = "Error: Feature not supported\n";
const char unsupported_str[] = "Error: Feature not supported\n";
#ifndef CONFIG_SSL_SKELETON_MODE
/**
@ -338,7 +338,7 @@ EXP_FUNC void STDCALL print_blob(const char *format, const unsigned char *data,
#if defined(CONFIG_SSL_HAS_PEM) || defined(CONFIG_HTTP_HAS_AUTHORIZATION)
/* base64 to binary lookup table */
static const uint8_t map[128] ICACHE_RODATA_ATTR STORE_ATTR =
static const uint8_t map[128] =
{
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,

View File

@ -191,7 +191,7 @@ void ICACHE_FLASH_ATTR ssl_obj_free(SSLObjLoader *ssl_obj)
#define IS_PRIVATE_KEY 2
#define IS_CERTIFICATE 3
static const char begins[NUM_PEM_TYPES][40] ICACHE_RODATA_ATTR STORE_ATTR =
static const char begins[NUM_PEM_TYPES][40] =
{
"-----BEGIN RSA PRIVATE KEY-----",
"-----BEGIN ENCRYPTED PRIVATE KEY-----",
@ -199,7 +199,7 @@ static const char begins[NUM_PEM_TYPES][40] ICACHE_RODATA_ATTR STORE_ATTR =
"-----BEGIN CERTIFICATE-----",
};
static const char ends[NUM_PEM_TYPES][40] ICACHE_RODATA_ATTR STORE_ATTR =
static const char ends[NUM_PEM_TYPES][40] =
{
"-----END RSA PRIVATE KEY-----",
"-----END ENCRYPTED PRIVATE KEY-----",
@ -207,7 +207,7 @@ static const char ends[NUM_PEM_TYPES][40] ICACHE_RODATA_ATTR STORE_ATTR =
"-----END CERTIFICATE-----",
};
static const char aes_str[2][24] ICACHE_RODATA_ATTR STORE_ATTR =
static const char aes_str[2][24] =
{
"DEK-Info: AES-128-CBC,",
"DEK-Info: AES-256-CBC,"

View File

@ -107,7 +107,7 @@ char *ICACHE_FLASH_ATTR esp_EVP_cleanup(void)
return NULL;
}
static const unsigned char base64_enc_map[64] ICACHE_RODATA_ATTR STORE_ATTR =
static const unsigned char base64_enc_map[64] =
{
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',

View File

@ -44,10 +44,10 @@ static const char mem_debug_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__;
/* The session expiry time */
#define SSL_EXPIRY_TIME (CONFIG_SSL_EXPIRY_TIME*3600)
static const uint8_t g_hello_request[] ICACHE_RODATA_ATTR STORE_ATTR = { HS_HELLO_REQUEST, 0, 0, 0 };
static const uint8_t g_chg_cipher_spec_pkt[] ICACHE_RODATA_ATTR STORE_ATTR = { 1 };
static const char server_finished[] ICACHE_RODATA_ATTR STORE_ATTR = "server finished";
static const char client_finished[] ICACHE_RODATA_ATTR STORE_ATTR = "client finished";
static const uint8_t g_hello_request[] = { HS_HELLO_REQUEST, 0, 0, 0 };
static const uint8_t g_chg_cipher_spec_pkt[] = { 1 };
static const char server_finished[] = "server finished";
static const char client_finished[] = "client finished";
static int do_handshake(SSL *ssl, uint8_t *buf, int read_len);
static int set_key_block(SSL *ssl, int is_write);
@ -65,7 +65,7 @@ const uint8_t ssl_prot_prefs[NUM_PROTOCOLS] =
#else
static void session_free(SSL_SESSION *ssl_sessions[], int sess_index);
const uint8_t ssl_prot_prefs[NUM_PROTOCOLS] ICACHE_RODATA_ATTR STORE_ATTR =
const uint8_t ssl_prot_prefs[NUM_PROTOCOLS] =
#ifdef CONFIG_SSL_PROT_LOW /* low security, fast speed */
{ SSL_RC4_128_SHA, SSL_AES128_SHA, SSL_AES256_SHA, SSL_RC4_128_MD5 };
#elif CONFIG_SSL_PROT_MEDIUM /* medium security, medium speed */

View File

@ -31,7 +31,7 @@
#include "ssl/ssl_os_port.h"
#include "ssl/ssl_ssl.h"
static const uint8_t g_hello_done[] ICACHE_RODATA_ATTR STORE_ATTR = { HS_SERVER_HELLO_DONE, 0, 0, 0 };
static const uint8_t g_hello_done[] = { HS_SERVER_HELLO_DONE, 0, 0, 0 };
#ifdef MEMLEAK_DEBUG
static const char mem_debug_file[] ICACHE_RODATA_ATTR STORE_ATTR = __FILE__;
@ -435,7 +435,7 @@ error:
}
#ifdef CONFIG_SSL_CERT_VERIFICATION
static const uint8_t g_cert_request[] ICACHE_RODATA_ATTR STORE_ATTR = { HS_CERT_REQ, 0, 0, 4, 1, 0, 0, 0 };
static const uint8_t g_cert_request[] = { HS_CERT_REQ, 0, 0, 4, 1, 0, 0, 0 };
/*
* Send the certificate request message.

View File

@ -92,7 +92,7 @@ static int aes_padlock_ace = -1;
/*
* Forward S-box
*/
static const unsigned char FSb[256] ICACHE_RODATA_ATTR STORE_ATTR =
static const unsigned char FSb[256] =
{
0x63, 0x7C, 0x77, 0x7B, 0xF2, 0x6B, 0x6F, 0xC5,
0x30, 0x01, 0x67, 0x2B, 0xFE, 0xD7, 0xAB, 0x76,
@ -199,19 +199,19 @@ static const unsigned char FSb[256] ICACHE_RODATA_ATTR STORE_ATTR =
V(CB,B0,B0,7B), V(FC,54,54,A8), V(D6,BB,BB,6D), V(3A,16,16,2C)
#define V(a,b,c,d) 0x##a##b##c##d
static const uint32_t FT0[256] ICACHE_RODATA_ATTR STORE_ATTR = { FT };
static const uint32_t FT0[256] = { FT };
#undef V
#define V(a,b,c,d) 0x##b##c##d##a
static const uint32_t FT1[256] ICACHE_RODATA_ATTR STORE_ATTR = { FT };
static const uint32_t FT1[256] = { FT };
#undef V
#define V(a,b,c,d) 0x##c##d##a##b
static const uint32_t FT2[256] ICACHE_RODATA_ATTR STORE_ATTR = { FT };
static const uint32_t FT2[256] = { FT };
#undef V
#define V(a,b,c,d) 0x##d##a##b##c
static const uint32_t FT3[256] ICACHE_RODATA_ATTR STORE_ATTR = { FT };
static const uint32_t FT3[256] = { FT };
#undef V
#undef FT
@ -219,7 +219,7 @@ static const uint32_t FT3[256] ICACHE_RODATA_ATTR STORE_ATTR = { FT };
/*
* Reverse S-box
*/
static const unsigned char RSb[256] ICACHE_RODATA_ATTR STORE_ATTR =
static const unsigned char RSb[256] =
{
0x52, 0x09, 0x6A, 0xD5, 0x30, 0x36, 0xA5, 0x38,
0xBF, 0x40, 0xA3, 0x9E, 0x81, 0xF3, 0xD7, 0xFB,
@ -326,19 +326,19 @@ static const unsigned char RSb[256] ICACHE_RODATA_ATTR STORE_ATTR =
V(61,84,CB,7B), V(70,B6,32,D5), V(74,5C,6C,48), V(42,57,B8,D0)
#define V(a,b,c,d) 0x##a##b##c##d
static const uint32_t RT0[256] ICACHE_RODATA_ATTR STORE_ATTR = { RT };
static const uint32_t RT0[256] = { RT };
#undef V
#define V(a,b,c,d) 0x##b##c##d##a
static const uint32_t RT1[256] ICACHE_RODATA_ATTR STORE_ATTR = { RT };
static const uint32_t RT1[256] = { RT };
#undef V
#define V(a,b,c,d) 0x##c##d##a##b
static const uint32_t RT2[256] ICACHE_RODATA_ATTR STORE_ATTR = { RT };
static const uint32_t RT2[256] = { RT };
#undef V
#define V(a,b,c,d) 0x##d##a##b##c
static const uint32_t RT3[256] ICACHE_RODATA_ATTR STORE_ATTR = { RT };
static const uint32_t RT3[256] = { RT };
#undef V
#undef RT
@ -346,7 +346,7 @@ static const uint32_t RT3[256] ICACHE_RODATA_ATTR STORE_ATTR = { RT };
/*
* Round constants
*/
static const uint32_t RCON[10] ICACHE_RODATA_ATTR =
static const uint32_t RCON[10] =
{
0x00000001, 0x00000002, 0x00000004, 0x00000008,
0x00000010, 0x00000020, 0x00000040, 0x00000080,

View File

@ -41,7 +41,7 @@
#endif /* MBEDTLS_PLATFORM_C */
#endif /* MBEDTLS_SELF_TEST */
static const unsigned char base64_enc_map[64] ICACHE_RODATA_ATTR =
static const unsigned char base64_enc_map[64] =
{
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
@ -52,7 +52,7 @@ static const unsigned char base64_enc_map[64] ICACHE_RODATA_ATTR =
'8', '9', '+', '/'
};
static const unsigned char base64_dec_map[128] ICACHE_RODATA_ATTR =
static const unsigned char base64_dec_map[128] =
{
127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
127, 127, 127, 127, 127, 127, 127, 127, 127, 127,

View File

@ -1968,7 +1968,7 @@ cleanup:
#if defined(MBEDTLS_GENPRIME)
static const int small_prime[] ICACHE_RODATA_ATTR STORE_ATTR =
static const int small_prime[] =
{
3, 5, 7, 11, 13, 17, 19, 23,
29, 31, 37, 41, 43, 47, 53, 59,

View File

@ -178,7 +178,7 @@ static void aes_ctx_free( void *ctx )
mbedtls_free( ctx );
}
static const mbedtls_cipher_base_t aes_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_base_t aes_info = {
MBEDTLS_CIPHER_ID_AES,
aes_crypt_ecb_wrap,
#if defined(MBEDTLS_CIPHER_MODE_CBC)
@ -199,7 +199,7 @@ static const mbedtls_cipher_base_t aes_info ICACHE_RODATA_ATTR = {
aes_ctx_free
};
static const mbedtls_cipher_info_t aes_128_ecb_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t aes_128_ecb_info = {
MBEDTLS_CIPHER_AES_128_ECB,
MBEDTLS_MODE_ECB,
128,
@ -210,7 +210,7 @@ static const mbedtls_cipher_info_t aes_128_ecb_info ICACHE_RODATA_ATTR = {
&aes_info
};
static const mbedtls_cipher_info_t aes_192_ecb_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t aes_192_ecb_info = {
MBEDTLS_CIPHER_AES_192_ECB,
MBEDTLS_MODE_ECB,
192,
@ -221,7 +221,7 @@ static const mbedtls_cipher_info_t aes_192_ecb_info ICACHE_RODATA_ATTR = {
&aes_info
};
static const mbedtls_cipher_info_t aes_256_ecb_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t aes_256_ecb_info = {
MBEDTLS_CIPHER_AES_256_ECB,
MBEDTLS_MODE_ECB,
256,
@ -233,7 +233,7 @@ static const mbedtls_cipher_info_t aes_256_ecb_info ICACHE_RODATA_ATTR = {
};
#if defined(MBEDTLS_CIPHER_MODE_CBC)
static const mbedtls_cipher_info_t aes_128_cbc_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t aes_128_cbc_info = {
MBEDTLS_CIPHER_AES_128_CBC,
MBEDTLS_MODE_CBC,
128,
@ -244,7 +244,7 @@ static const mbedtls_cipher_info_t aes_128_cbc_info ICACHE_RODATA_ATTR = {
&aes_info
};
static const mbedtls_cipher_info_t aes_192_cbc_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t aes_192_cbc_info = {
MBEDTLS_CIPHER_AES_192_CBC,
MBEDTLS_MODE_CBC,
192,
@ -255,7 +255,7 @@ static const mbedtls_cipher_info_t aes_192_cbc_info ICACHE_RODATA_ATTR = {
&aes_info
};
static const mbedtls_cipher_info_t aes_256_cbc_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t aes_256_cbc_info = {
MBEDTLS_CIPHER_AES_256_CBC,
MBEDTLS_MODE_CBC,
256,
@ -268,7 +268,7 @@ static const mbedtls_cipher_info_t aes_256_cbc_info ICACHE_RODATA_ATTR = {
#endif /* MBEDTLS_CIPHER_MODE_CBC */
#if defined(MBEDTLS_CIPHER_MODE_CFB)
static const mbedtls_cipher_info_t aes_128_cfb128_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t aes_128_cfb128_info = {
MBEDTLS_CIPHER_AES_128_CFB128,
MBEDTLS_MODE_CFB,
128,
@ -279,7 +279,7 @@ static const mbedtls_cipher_info_t aes_128_cfb128_info ICACHE_RODATA_ATTR = {
&aes_info
};
static const mbedtls_cipher_info_t aes_192_cfb128_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t aes_192_cfb128_info = {
MBEDTLS_CIPHER_AES_192_CFB128,
MBEDTLS_MODE_CFB,
192,
@ -290,7 +290,7 @@ static const mbedtls_cipher_info_t aes_192_cfb128_info ICACHE_RODATA_ATTR = {
&aes_info
};
static const mbedtls_cipher_info_t aes_256_cfb128_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t aes_256_cfb128_info = {
MBEDTLS_CIPHER_AES_256_CFB128,
MBEDTLS_MODE_CFB,
256,
@ -303,7 +303,7 @@ static const mbedtls_cipher_info_t aes_256_cfb128_info ICACHE_RODATA_ATTR = {
#endif /* MBEDTLS_CIPHER_MODE_CFB */
#if defined(MBEDTLS_CIPHER_MODE_CTR)
static const mbedtls_cipher_info_t aes_128_ctr_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t aes_128_ctr_info = {
MBEDTLS_CIPHER_AES_128_CTR,
MBEDTLS_MODE_CTR,
128,
@ -314,7 +314,7 @@ static const mbedtls_cipher_info_t aes_128_ctr_info ICACHE_RODATA_ATTR = {
&aes_info
};
static const mbedtls_cipher_info_t aes_192_ctr_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t aes_192_ctr_info = {
MBEDTLS_CIPHER_AES_192_CTR,
MBEDTLS_MODE_CTR,
192,
@ -325,7 +325,7 @@ static const mbedtls_cipher_info_t aes_192_ctr_info ICACHE_RODATA_ATTR = {
&aes_info
};
static const mbedtls_cipher_info_t aes_256_ctr_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t aes_256_ctr_info = {
MBEDTLS_CIPHER_AES_256_CTR,
MBEDTLS_MODE_CTR,
256,
@ -345,7 +345,7 @@ static int gcm_aes_setkey_wrap( void *ctx, const unsigned char *key,
key, key_bitlen );
}
static const mbedtls_cipher_base_t gcm_aes_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_base_t gcm_aes_info = {
MBEDTLS_CIPHER_ID_AES,
NULL,
#if defined(MBEDTLS_CIPHER_MODE_CBC)
@ -366,7 +366,7 @@ static const mbedtls_cipher_base_t gcm_aes_info ICACHE_RODATA_ATTR = {
gcm_ctx_free,
};
static const mbedtls_cipher_info_t aes_128_gcm_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t aes_128_gcm_info = {
MBEDTLS_CIPHER_AES_128_GCM,
MBEDTLS_MODE_GCM,
128,
@ -377,7 +377,7 @@ static const mbedtls_cipher_info_t aes_128_gcm_info ICACHE_RODATA_ATTR = {
&gcm_aes_info
};
static const mbedtls_cipher_info_t aes_192_gcm_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t aes_192_gcm_info = {
MBEDTLS_CIPHER_AES_192_GCM,
MBEDTLS_MODE_GCM,
192,
@ -388,7 +388,7 @@ static const mbedtls_cipher_info_t aes_192_gcm_info ICACHE_RODATA_ATTR = {
&gcm_aes_info
};
static const mbedtls_cipher_info_t aes_256_gcm_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t aes_256_gcm_info = {
MBEDTLS_CIPHER_AES_256_GCM,
MBEDTLS_MODE_GCM,
256,
@ -408,7 +408,7 @@ static int ccm_aes_setkey_wrap( void *ctx, const unsigned char *key,
key, key_bitlen );
}
static const mbedtls_cipher_base_t ccm_aes_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_base_t ccm_aes_info = {
MBEDTLS_CIPHER_ID_AES,
NULL,
#if defined(MBEDTLS_CIPHER_MODE_CBC)
@ -429,7 +429,7 @@ static const mbedtls_cipher_base_t ccm_aes_info ICACHE_RODATA_ATTR = {
ccm_ctx_free,
};
static const mbedtls_cipher_info_t aes_128_ccm_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t aes_128_ccm_info = {
MBEDTLS_CIPHER_AES_128_CCM,
MBEDTLS_MODE_CCM,
128,
@ -440,7 +440,7 @@ static const mbedtls_cipher_info_t aes_128_ccm_info ICACHE_RODATA_ATTR = {
&ccm_aes_info
};
static const mbedtls_cipher_info_t aes_192_ccm_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t aes_192_ccm_info = {
MBEDTLS_CIPHER_AES_192_CCM,
MBEDTLS_MODE_CCM,
192,
@ -451,7 +451,7 @@ static const mbedtls_cipher_info_t aes_192_ccm_info ICACHE_RODATA_ATTR = {
&ccm_aes_info
};
static const mbedtls_cipher_info_t aes_256_ccm_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t aes_256_ccm_info = {
MBEDTLS_CIPHER_AES_256_CCM,
MBEDTLS_MODE_CCM,
256,
@ -535,7 +535,7 @@ static void camellia_ctx_free( void *ctx )
mbedtls_free( ctx );
}
static const mbedtls_cipher_base_t camellia_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_base_t camellia_info = {
MBEDTLS_CIPHER_ID_CAMELLIA,
camellia_crypt_ecb_wrap,
#if defined(MBEDTLS_CIPHER_MODE_CBC)
@ -556,7 +556,7 @@ static const mbedtls_cipher_base_t camellia_info ICACHE_RODATA_ATTR = {
camellia_ctx_free
};
static const mbedtls_cipher_info_t camellia_128_ecb_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t camellia_128_ecb_info = {
MBEDTLS_CIPHER_CAMELLIA_128_ECB,
MBEDTLS_MODE_ECB,
128,
@ -567,7 +567,7 @@ static const mbedtls_cipher_info_t camellia_128_ecb_info ICACHE_RODATA_ATTR = {
&camellia_info
};
static const mbedtls_cipher_info_t camellia_192_ecb_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t camellia_192_ecb_info = {
MBEDTLS_CIPHER_CAMELLIA_192_ECB,
MBEDTLS_MODE_ECB,
192,
@ -578,7 +578,7 @@ static const mbedtls_cipher_info_t camellia_192_ecb_info ICACHE_RODATA_ATTR = {
&camellia_info
};
static const mbedtls_cipher_info_t camellia_256_ecb_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t camellia_256_ecb_info = {
MBEDTLS_CIPHER_CAMELLIA_256_ECB,
MBEDTLS_MODE_ECB,
256,
@ -590,7 +590,7 @@ static const mbedtls_cipher_info_t camellia_256_ecb_info ICACHE_RODATA_ATTR = {
};
#if defined(MBEDTLS_CIPHER_MODE_CBC)
static const mbedtls_cipher_info_t camellia_128_cbc_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t camellia_128_cbc_info = {
MBEDTLS_CIPHER_CAMELLIA_128_CBC,
MBEDTLS_MODE_CBC,
128,
@ -601,7 +601,7 @@ static const mbedtls_cipher_info_t camellia_128_cbc_info ICACHE_RODATA_ATTR = {
&camellia_info
};
static const mbedtls_cipher_info_t camellia_192_cbc_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t camellia_192_cbc_info = {
MBEDTLS_CIPHER_CAMELLIA_192_CBC,
MBEDTLS_MODE_CBC,
192,
@ -612,7 +612,7 @@ static const mbedtls_cipher_info_t camellia_192_cbc_info ICACHE_RODATA_ATTR = {
&camellia_info
};
static const mbedtls_cipher_info_t camellia_256_cbc_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t camellia_256_cbc_info = {
MBEDTLS_CIPHER_CAMELLIA_256_CBC,
MBEDTLS_MODE_CBC,
256,
@ -625,7 +625,7 @@ static const mbedtls_cipher_info_t camellia_256_cbc_info ICACHE_RODATA_ATTR = {
#endif /* MBEDTLS_CIPHER_MODE_CBC */
#if defined(MBEDTLS_CIPHER_MODE_CFB)
static const mbedtls_cipher_info_t camellia_128_cfb128_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t camellia_128_cfb128_info = {
MBEDTLS_CIPHER_CAMELLIA_128_CFB128,
MBEDTLS_MODE_CFB,
128,
@ -636,7 +636,7 @@ static const mbedtls_cipher_info_t camellia_128_cfb128_info ICACHE_RODATA_ATTR =
&camellia_info
};
static const mbedtls_cipher_info_t camellia_192_cfb128_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t camellia_192_cfb128_info = {
MBEDTLS_CIPHER_CAMELLIA_192_CFB128,
MBEDTLS_MODE_CFB,
192,
@ -647,7 +647,7 @@ static const mbedtls_cipher_info_t camellia_192_cfb128_info ICACHE_RODATA_ATTR =
&camellia_info
};
static const mbedtls_cipher_info_t camellia_256_cfb128_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t camellia_256_cfb128_info = {
MBEDTLS_CIPHER_CAMELLIA_256_CFB128,
MBEDTLS_MODE_CFB,
256,
@ -660,7 +660,7 @@ static const mbedtls_cipher_info_t camellia_256_cfb128_info ICACHE_RODATA_ATTR =
#endif /* MBEDTLS_CIPHER_MODE_CFB */
#if defined(MBEDTLS_CIPHER_MODE_CTR)
static const mbedtls_cipher_info_t camellia_128_ctr_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t camellia_128_ctr_info = {
MBEDTLS_CIPHER_CAMELLIA_128_CTR,
MBEDTLS_MODE_CTR,
128,
@ -671,7 +671,7 @@ static const mbedtls_cipher_info_t camellia_128_ctr_info ICACHE_RODATA_ATTR = {
&camellia_info
};
static const mbedtls_cipher_info_t camellia_192_ctr_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t camellia_192_ctr_info = {
MBEDTLS_CIPHER_CAMELLIA_192_CTR,
MBEDTLS_MODE_CTR,
192,
@ -682,7 +682,7 @@ static const mbedtls_cipher_info_t camellia_192_ctr_info ICACHE_RODATA_ATTR = {
&camellia_info
};
static const mbedtls_cipher_info_t camellia_256_ctr_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t camellia_256_ctr_info = {
MBEDTLS_CIPHER_CAMELLIA_256_CTR,
MBEDTLS_MODE_CTR,
256,
@ -702,7 +702,7 @@ static int gcm_camellia_setkey_wrap( void *ctx, const unsigned char *key,
key, key_bitlen );
}
static const mbedtls_cipher_base_t gcm_camellia_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_base_t gcm_camellia_info = {
MBEDTLS_CIPHER_ID_CAMELLIA,
NULL,
#if defined(MBEDTLS_CIPHER_MODE_CBC)
@ -723,7 +723,7 @@ static const mbedtls_cipher_base_t gcm_camellia_info ICACHE_RODATA_ATTR = {
gcm_ctx_free,
};
static const mbedtls_cipher_info_t camellia_128_gcm_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t camellia_128_gcm_info = {
MBEDTLS_CIPHER_CAMELLIA_128_GCM,
MBEDTLS_MODE_GCM,
128,
@ -734,7 +734,7 @@ static const mbedtls_cipher_info_t camellia_128_gcm_info ICACHE_RODATA_ATTR = {
&gcm_camellia_info
};
static const mbedtls_cipher_info_t camellia_192_gcm_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t camellia_192_gcm_info = {
MBEDTLS_CIPHER_CAMELLIA_192_GCM,
MBEDTLS_MODE_GCM,
192,
@ -745,7 +745,7 @@ static const mbedtls_cipher_info_t camellia_192_gcm_info ICACHE_RODATA_ATTR = {
&gcm_camellia_info
};
static const mbedtls_cipher_info_t camellia_256_gcm_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t camellia_256_gcm_info = {
MBEDTLS_CIPHER_CAMELLIA_256_GCM,
MBEDTLS_MODE_GCM,
256,
@ -765,7 +765,7 @@ static int ccm_camellia_setkey_wrap( void *ctx, const unsigned char *key,
key, key_bitlen );
}
static const mbedtls_cipher_base_t ccm_camellia_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_base_t ccm_camellia_info = {
MBEDTLS_CIPHER_ID_CAMELLIA,
NULL,
#if defined(MBEDTLS_CIPHER_MODE_CBC)
@ -786,7 +786,7 @@ static const mbedtls_cipher_base_t ccm_camellia_info ICACHE_RODATA_ATTR = {
ccm_ctx_free,
};
static const mbedtls_cipher_info_t camellia_128_ccm_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t camellia_128_ccm_info = {
MBEDTLS_CIPHER_CAMELLIA_128_CCM,
MBEDTLS_MODE_CCM,
128,
@ -797,7 +797,7 @@ static const mbedtls_cipher_info_t camellia_128_ccm_info ICACHE_RODATA_ATTR = {
&ccm_camellia_info
};
static const mbedtls_cipher_info_t camellia_192_ccm_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t camellia_192_ccm_info = {
MBEDTLS_CIPHER_CAMELLIA_192_CCM,
MBEDTLS_MODE_CCM,
192,
@ -808,7 +808,7 @@ static const mbedtls_cipher_info_t camellia_192_ccm_info ICACHE_RODATA_ATTR = {
&ccm_camellia_info
};
static const mbedtls_cipher_info_t camellia_256_ccm_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t camellia_256_ccm_info = {
MBEDTLS_CIPHER_CAMELLIA_256_CCM,
MBEDTLS_MODE_CCM,
256,
@ -941,7 +941,7 @@ static void des3_ctx_free( void *ctx )
mbedtls_free( ctx );
}
static const mbedtls_cipher_base_t des_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_base_t des_info = {
MBEDTLS_CIPHER_ID_DES,
des_crypt_ecb_wrap,
#if defined(MBEDTLS_CIPHER_MODE_CBC)
@ -962,7 +962,7 @@ static const mbedtls_cipher_base_t des_info ICACHE_RODATA_ATTR = {
des_ctx_free
};
static const mbedtls_cipher_info_t des_ecb_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t des_ecb_info = {
MBEDTLS_CIPHER_DES_ECB,
MBEDTLS_MODE_ECB,
MBEDTLS_KEY_LENGTH_DES,
@ -974,7 +974,7 @@ static const mbedtls_cipher_info_t des_ecb_info ICACHE_RODATA_ATTR = {
};
#if defined(MBEDTLS_CIPHER_MODE_CBC)
static const mbedtls_cipher_info_t des_cbc_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t des_cbc_info = {
MBEDTLS_CIPHER_DES_CBC,
MBEDTLS_MODE_CBC,
MBEDTLS_KEY_LENGTH_DES,
@ -986,7 +986,7 @@ static const mbedtls_cipher_info_t des_cbc_info ICACHE_RODATA_ATTR = {
};
#endif /* MBEDTLS_CIPHER_MODE_CBC */
static const mbedtls_cipher_base_t des_ede_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_base_t des_ede_info = {
MBEDTLS_CIPHER_ID_DES,
des3_crypt_ecb_wrap,
#if defined(MBEDTLS_CIPHER_MODE_CBC)
@ -1007,7 +1007,7 @@ static const mbedtls_cipher_base_t des_ede_info ICACHE_RODATA_ATTR = {
des3_ctx_free
};
static const mbedtls_cipher_info_t des_ede_ecb_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t des_ede_ecb_info = {
MBEDTLS_CIPHER_DES_EDE_ECB,
MBEDTLS_MODE_ECB,
MBEDTLS_KEY_LENGTH_DES_EDE,
@ -1019,7 +1019,7 @@ static const mbedtls_cipher_info_t des_ede_ecb_info ICACHE_RODATA_ATTR = {
};
#if defined(MBEDTLS_CIPHER_MODE_CBC)
static const mbedtls_cipher_info_t des_ede_cbc_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t des_ede_cbc_info = {
MBEDTLS_CIPHER_DES_EDE_CBC,
MBEDTLS_MODE_CBC,
MBEDTLS_KEY_LENGTH_DES_EDE,
@ -1031,7 +1031,7 @@ static const mbedtls_cipher_info_t des_ede_cbc_info ICACHE_RODATA_ATTR = {
};
#endif /* MBEDTLS_CIPHER_MODE_CBC */
static const mbedtls_cipher_base_t des_ede3_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_base_t des_ede3_info = {
MBEDTLS_CIPHER_ID_3DES,
des3_crypt_ecb_wrap,
#if defined(MBEDTLS_CIPHER_MODE_CBC)
@ -1052,7 +1052,7 @@ static const mbedtls_cipher_base_t des_ede3_info ICACHE_RODATA_ATTR = {
des3_ctx_free
};
static const mbedtls_cipher_info_t des_ede3_ecb_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t des_ede3_ecb_info = {
MBEDTLS_CIPHER_DES_EDE3_ECB,
MBEDTLS_MODE_ECB,
MBEDTLS_KEY_LENGTH_DES_EDE3,
@ -1063,7 +1063,7 @@ static const mbedtls_cipher_info_t des_ede3_ecb_info ICACHE_RODATA_ATTR = {
&des_ede3_info
};
#if defined(MBEDTLS_CIPHER_MODE_CBC)
static const mbedtls_cipher_info_t des_ede3_cbc_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t des_ede3_cbc_info = {
MBEDTLS_CIPHER_DES_EDE3_CBC,
MBEDTLS_MODE_CBC,
MBEDTLS_KEY_LENGTH_DES_EDE3,
@ -1140,7 +1140,7 @@ static void blowfish_ctx_free( void *ctx )
mbedtls_free( ctx );
}
static const mbedtls_cipher_base_t blowfish_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_base_t blowfish_info = {
MBEDTLS_CIPHER_ID_BLOWFISH,
blowfish_crypt_ecb_wrap,
#if defined(MBEDTLS_CIPHER_MODE_CBC)
@ -1161,7 +1161,7 @@ static const mbedtls_cipher_base_t blowfish_info ICACHE_RODATA_ATTR = {
blowfish_ctx_free
};
static const mbedtls_cipher_info_t blowfish_ecb_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t blowfish_ecb_info = {
MBEDTLS_CIPHER_BLOWFISH_ECB,
MBEDTLS_MODE_ECB,
128,
@ -1173,7 +1173,7 @@ static const mbedtls_cipher_info_t blowfish_ecb_info ICACHE_RODATA_ATTR = {
};
#if defined(MBEDTLS_CIPHER_MODE_CBC)
static const mbedtls_cipher_info_t blowfish_cbc_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t blowfish_cbc_info = {
MBEDTLS_CIPHER_BLOWFISH_CBC,
MBEDTLS_MODE_CBC,
128,
@ -1186,7 +1186,7 @@ static const mbedtls_cipher_info_t blowfish_cbc_info ICACHE_RODATA_ATTR = {
#endif /* MBEDTLS_CIPHER_MODE_CBC */
#if defined(MBEDTLS_CIPHER_MODE_CFB)
static const mbedtls_cipher_info_t blowfish_cfb64_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t blowfish_cfb64_info = {
MBEDTLS_CIPHER_BLOWFISH_CFB64,
MBEDTLS_MODE_CFB,
128,
@ -1199,7 +1199,7 @@ static const mbedtls_cipher_info_t blowfish_cfb64_info ICACHE_RODATA_ATTR = {
#endif /* MBEDTLS_CIPHER_MODE_CFB */
#if defined(MBEDTLS_CIPHER_MODE_CTR)
static const mbedtls_cipher_info_t blowfish_ctr_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t blowfish_ctr_info = {
MBEDTLS_CIPHER_BLOWFISH_CTR,
MBEDTLS_MODE_CTR,
128,
@ -1250,7 +1250,7 @@ static void arc4_ctx_free( void *ctx )
mbedtls_free( ctx );
}
static const mbedtls_cipher_base_t arc4_base_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_base_t arc4_base_info = {
MBEDTLS_CIPHER_ID_ARC4,
NULL,
#if defined(MBEDTLS_CIPHER_MODE_CBC)
@ -1271,7 +1271,7 @@ static const mbedtls_cipher_base_t arc4_base_info ICACHE_RODATA_ATTR = {
arc4_ctx_free
};
static const mbedtls_cipher_info_t arc4_128_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t arc4_128_info = {
MBEDTLS_CIPHER_ARC4_128,
MBEDTLS_MODE_STREAM,
128,
@ -1313,7 +1313,7 @@ static void null_ctx_free( void *ctx )
((void) ctx);
}
static const mbedtls_cipher_base_t null_base_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_base_t null_base_info = {
MBEDTLS_CIPHER_ID_NULL,
NULL,
#if defined(MBEDTLS_CIPHER_MODE_CBC)
@ -1334,7 +1334,7 @@ static const mbedtls_cipher_base_t null_base_info ICACHE_RODATA_ATTR = {
null_ctx_free
};
static const mbedtls_cipher_info_t null_cipher_info ICACHE_RODATA_ATTR = {
static const mbedtls_cipher_info_t null_cipher_info = {
MBEDTLS_CIPHER_NULL,
MBEDTLS_MODE_STREAM,
0,
@ -1346,7 +1346,7 @@ static const mbedtls_cipher_info_t null_cipher_info ICACHE_RODATA_ATTR = {
};
#endif /* defined(MBEDTLS_CIPHER_NULL_CIPHER) */
const mbedtls_cipher_definition_t mbedtls_cipher_definitions[] ICACHE_RODATA_ATTR =
const mbedtls_cipher_definition_t mbedtls_cipher_definitions[] =
{
#if defined(MBEDTLS_AES_C)
{ MBEDTLS_CIPHER_AES_128_ECB, &aes_128_ecb_info },

View File

@ -56,7 +56,7 @@ static void mbedtls_zeroize( void *v, size_t n ) {
/*
* Reminder: update profiles in x509_crt.c when adding a new hash!
*/
static const int supported_digests[] ICACHE_RODATA_ATTR = {
static const int supported_digests[] = {
#if defined(MBEDTLS_SHA512_C)
MBEDTLS_MD_SHA512,

View File

@ -275,7 +275,7 @@ void mbedtls_md5_update( mbedtls_md5_context *ctx, const unsigned char *input, s
}
}
static const unsigned char md5_padding[64] ICACHE_RODATA_ATTR =
static const unsigned char md5_padding[64] =
{
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

View File

@ -240,7 +240,7 @@ static void md5_process_wrap( void *ctx, const unsigned char *data )
mbedtls_md5_process( (mbedtls_md5_context *) ctx, data );
}
const mbedtls_md_info_t mbedtls_md5_info ICACHE_RODATA_ATTR = {
const mbedtls_md_info_t mbedtls_md5_info = {
MBEDTLS_MD_MD5,
"MD5",
16,
@ -364,7 +364,7 @@ static void sha1_process_wrap( void *ctx, const unsigned char *data )
mbedtls_sha1_process( (mbedtls_sha1_context *) ctx, data );
}
const mbedtls_md_info_t mbedtls_sha1_info ICACHE_RODATA_ATTR = {
const mbedtls_md_info_t mbedtls_sha1_info = {
MBEDTLS_MD_SHA1,
"SHA1",
20,
@ -435,7 +435,7 @@ static void sha224_process_wrap( void *ctx, const unsigned char *data )
mbedtls_sha256_process( (mbedtls_sha256_context *) ctx, data );
}
const mbedtls_md_info_t mbedtls_sha224_info ICACHE_RODATA_ATTR = {
const mbedtls_md_info_t mbedtls_sha224_info = {
MBEDTLS_MD_SHA224,
"SHA224",
28,
@ -461,7 +461,7 @@ static void sha256_wrap( const unsigned char *input, size_t ilen,
mbedtls_sha256( input, ilen, output, 0 );
}
const mbedtls_md_info_t mbedtls_sha256_info ICACHE_RODATA_ATTR = {
const mbedtls_md_info_t mbedtls_sha256_info = {
MBEDTLS_MD_SHA256,
"SHA256",
32,
@ -529,7 +529,7 @@ static void sha384_process_wrap( void *ctx, const unsigned char *data )
mbedtls_sha512_process( (mbedtls_sha512_context *) ctx, data );
}
const mbedtls_md_info_t mbedtls_sha384_info ICACHE_RODATA_ATTR = {
const mbedtls_md_info_t mbedtls_sha384_info = {
MBEDTLS_MD_SHA384,
"SHA384",
48,
@ -555,7 +555,7 @@ static void sha512_wrap( const unsigned char *input, size_t ilen,
mbedtls_sha512( input, ilen, output, 0 );
}
const mbedtls_md_info_t mbedtls_sha512_info ICACHE_RODATA_ATTR = {
const mbedtls_md_info_t mbedtls_sha512_info = {
MBEDTLS_MD_SHA512,
"SHA512",
64,

View File

@ -160,7 +160,7 @@ typedef struct {
const char *short_name;
} oid_x520_attr_t;
static const oid_x520_attr_t oid_x520_attr_type[] ICACHE_RODATA_ATTR =
static const oid_x520_attr_t oid_x520_attr_type[] =
{
{
{ ADD_LEN( MBEDTLS_OID_AT_CN ), "id-at-commonName", "Common Name" },
@ -256,7 +256,7 @@ typedef struct {
int ext_type;
} oid_x509_ext_t;
static const oid_x509_ext_t oid_x509_ext[] ICACHE_RODATA_ATTR =
static const oid_x509_ext_t oid_x509_ext[] =
{
{
{ ADD_LEN( MBEDTLS_OID_BASIC_CONSTRAINTS ), "id-ce-basicConstraints", "Basic Constraints" },
@ -287,7 +287,7 @@ static const oid_x509_ext_t oid_x509_ext[] ICACHE_RODATA_ATTR =
FN_OID_TYPED_FROM_ASN1(oid_x509_ext_t, x509_ext, oid_x509_ext)
FN_OID_GET_ATTR1(mbedtls_oid_get_x509_ext_type, oid_x509_ext_t, x509_ext, int, ext_type)
static const mbedtls_oid_descriptor_t oid_ext_key_usage[] ICACHE_RODATA_ATTR =
static const mbedtls_oid_descriptor_t oid_ext_key_usage[] =
{
{ ADD_LEN( MBEDTLS_OID_SERVER_AUTH ), "id-kp-serverAuth", "TLS Web Server Authentication" },
{ ADD_LEN( MBEDTLS_OID_CLIENT_AUTH ), "id-kp-clientAuth", "TLS Web Client Authentication" },
@ -312,7 +312,7 @@ typedef struct {
mbedtls_pk_type_t pk_alg;
} oid_sig_alg_t;
static const oid_sig_alg_t oid_sig_alg[] ICACHE_RODATA_ATTR =
static const oid_sig_alg_t oid_sig_alg[] =
{
{
{ ADD_LEN( MBEDTLS_OID_PKCS1_MD2 ), "md2WithRSAEncryption", "RSA with MD2" },
@ -394,7 +394,7 @@ typedef struct {
mbedtls_pk_type_t pk_alg;
} oid_pk_alg_t;
static const oid_pk_alg_t oid_pk_alg[] ICACHE_RODATA_ATTR =
static const oid_pk_alg_t oid_pk_alg[] =
{
{
{ ADD_LEN( MBEDTLS_OID_PKCS1_RSA ), "rsaEncryption", "RSA" },
@ -427,7 +427,7 @@ typedef struct {
mbedtls_ecp_group_id grp_id;
} oid_ecp_grp_t;
static const oid_ecp_grp_t oid_ecp_grp[] ICACHE_RODATA_ATTR =
static const oid_ecp_grp_t oid_ecp_grp[] =
{
{
{ ADD_LEN( MBEDTLS_OID_EC_GRP_SECP192R1 ), "secp192r1", "secp192r1" },
@ -493,7 +493,7 @@ typedef struct {
mbedtls_cipher_type_t cipher_alg;
} oid_cipher_alg_t;
static const oid_cipher_alg_t oid_cipher_alg[] ICACHE_RODATA_ATTR =
static const oid_cipher_alg_t oid_cipher_alg[] =
{
{
{ ADD_LEN( MBEDTLS_OID_DES_CBC ), "desCBC", "DES-CBC" },
@ -522,7 +522,7 @@ typedef struct {
mbedtls_md_type_t md_alg;
} oid_md_alg_t;
static const oid_md_alg_t oid_md_alg[] ICACHE_RODATA_ATTR =
static const oid_md_alg_t oid_md_alg[] =
{
{
{ ADD_LEN( MBEDTLS_OID_DIGEST_ALG_MD2 ), "id-md2", "MD2" },
@ -577,7 +577,7 @@ typedef struct {
mbedtls_cipher_type_t cipher_alg;
} oid_pkcs12_pbe_alg_t;
static const oid_pkcs12_pbe_alg_t oid_pkcs12_pbe_alg[] ICACHE_RODATA_ATTR =
static const oid_pkcs12_pbe_alg_t oid_pkcs12_pbe_alg[] =
{
{
{ ADD_LEN( MBEDTLS_OID_PKCS12_PBE_SHA1_DES3_EDE_CBC ), "pbeWithSHAAnd3-KeyTripleDES-CBC", "PBE with SHA1 and 3-Key 3DES" },

View File

@ -160,7 +160,7 @@ static void rsa_debug( const void *ctx, mbedtls_pk_debug_item *items )
items->value = &( ((mbedtls_rsa_context *) ctx)->E );
}
const mbedtls_pk_info_t mbedtls_rsa_info ICACHE_RODATA_ATTR = {
const mbedtls_pk_info_t mbedtls_rsa_info = {
MBEDTLS_PK_RSA,
"RSA",
rsa_get_bitlen,
@ -270,7 +270,7 @@ static void eckey_debug( const void *ctx, mbedtls_pk_debug_item *items )
items->value = &( ((mbedtls_ecp_keypair *) ctx)->Q );
}
const mbedtls_pk_info_t mbedtls_eckey_info ICACHE_RODATA_ATTR = {
const mbedtls_pk_info_t mbedtls_eckey_info = {
MBEDTLS_PK_ECKEY,
"EC",
eckey_get_bitlen,
@ -299,7 +299,7 @@ static int eckeydh_can_do( mbedtls_pk_type_t type )
type == MBEDTLS_PK_ECKEY_DH );
}
const mbedtls_pk_info_t mbedtls_eckeydh_info ICACHE_RODATA_ATTR = {
const mbedtls_pk_info_t mbedtls_eckeydh_info = {
MBEDTLS_PK_ECKEY_DH,
"EC_DH",
eckey_get_bitlen, /* Same underlying key structure */
@ -362,7 +362,7 @@ static void ecdsa_free_wrap( void *ctx )
mbedtls_free( ctx );
}
const mbedtls_pk_info_t mbedtls_ecdsa_info ICACHE_RODATA_ATTR = {
const mbedtls_pk_info_t mbedtls_ecdsa_info = {
MBEDTLS_PK_ECDSA,
"ECDSA",
eckey_get_bitlen, /* Compatible key structures */
@ -471,7 +471,7 @@ static void rsa_alt_free_wrap( void *ctx )
mbedtls_free( ctx );
}
const mbedtls_pk_info_t mbedtls_rsa_alt_info ICACHE_RODATA_ATTR = {
const mbedtls_pk_info_t mbedtls_rsa_alt_info = {
MBEDTLS_PK_RSA_ALT,
"RSA-alt",
rsa_alt_get_bitlen,

View File

@ -307,7 +307,7 @@ void mbedtls_sha1_update( mbedtls_sha1_context *ctx, const unsigned char *input,
memcpy( (void *) (ctx->buffer + left), input, ilen );
}
static const unsigned char sha1_padding[64] ICACHE_RODATA_ATTR =
static const unsigned char sha1_padding[64] =
{
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

View File

@ -132,7 +132,7 @@ void mbedtls_sha256_starts( mbedtls_sha256_context *ctx, int is224 )
}
#if !defined(MBEDTLS_SHA256_PROCESS_ALT)
static const uint32_t K[] ICACHE_RODATA_ATTR STORE_ATTR =
static const uint32_t K[] =
{
0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5,
0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5,
@ -274,7 +274,7 @@ void mbedtls_sha256_update( mbedtls_sha256_context *ctx, const unsigned char *in
memcpy( (void *) (ctx->buffer + left), input, ilen );
}
static const unsigned char sha256_padding[64] ICACHE_RODATA_ATTR =
static const unsigned char sha256_padding[64] =
{
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

View File

@ -93,7 +93,7 @@ static void mbedtls_zeroize( void *v, size_t n ) {
/*
* Round constants
*/
static const uint64_t K[80] ICACHE_RODATA_ATTR STORE_ATTR =
static const uint64_t K[80] =
{
UL64(0x428A2F98D728AE22), UL64(0x7137449123EF65CD),
UL64(0xB5C0FBCFEC4D3B2F), UL64(0xE9B5DBA58189DBBC),
@ -303,7 +303,7 @@ void mbedtls_sha512_update( mbedtls_sha512_context *ctx, const unsigned char *in
memcpy( (void *) (ctx->buffer + left), input, ilen );
}
static const unsigned char sha512_padding[128] ICACHE_RODATA_ATTR STORE_ATTR =
static const unsigned char sha512_padding[128] =
{
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

View File

@ -48,7 +48,7 @@
* 4. By hash function used when relevant
* 5. By key exchange/auth again: EC > non-EC
*/
static const int ciphersuite_preference[] ICACHE_RODATA_ATTR STORE_ATTR =
static const int ciphersuite_preference[] =
{
#if defined(MBEDTLS_SSL_CIPHERSUITES)
MBEDTLS_SSL_CIPHERSUITES,
@ -260,7 +260,7 @@ static const int ciphersuite_preference[] ICACHE_RODATA_ATTR STORE_ATTR =
0
};
static const mbedtls_ssl_ciphersuite_t ciphersuite_definitions[] ICACHE_RODATA_ATTR STORE_ATTR =
static const mbedtls_ssl_ciphersuite_t ciphersuite_definitions[] =
{
#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED)
#if defined(MBEDTLS_AES_C)

View File

@ -41,7 +41,7 @@ typedef struct {
#define ADD_STRLEN( s ) s, sizeof( s ) - 1
static const x509_attr_descriptor_t x509_attrs[] ICACHE_RODATA_ATTR STORE_ATTR =
static const x509_attr_descriptor_t x509_attrs[] =
{
{ ADD_STRLEN( "CN" ), MBEDTLS_OID_AT_CN },
{ ADD_STRLEN( "commonName" ), MBEDTLS_OID_AT_CN },

View File

@ -83,7 +83,7 @@ static void mbedtls_zeroize( void *v, size_t n ) {
/*
* Default profile
*/
const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_default ICACHE_RODATA_ATTR =
const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_default =
{
/* Hashes from SHA-1 and above */
MBEDTLS_X509_ID_FLAG( MBEDTLS_MD_SHA1 ) |
@ -100,7 +100,7 @@ const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_default ICACHE_RODATA_AT
/*
* Next-default profile
*/
const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_next ICACHE_RODATA_ATTR =
const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_next =
{
/* Hashes from SHA-256 and above */
MBEDTLS_X509_ID_FLAG( MBEDTLS_MD_SHA256 ) |
@ -125,7 +125,7 @@ const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_next ICACHE_RODATA_ATTR
/*
* NSA Suite B Profile
*/
const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_suiteb ICACHE_RODATA_ATTR =
const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_suiteb =
{
/* Only SHA-256 and 384 */
MBEDTLS_X509_ID_FLAG( MBEDTLS_MD_SHA256 ) |