Bläddra i källkod

new memp config for mbedTLS

balbekova 7 år sedan
förälder
incheckning
552e917a8a

+ 2 - 2
modules/Ethernet/lwipopts.h

@@ -51,7 +51,7 @@
 
 /* MEM_SIZE: the size of the heap memory. If the application will send
 a lot of data that needs to be copied, this should be set high. */
-#define MEM_SIZE                (5*1024)
+#define MEM_SIZE                (10*1024)
 //#define MEM_SIZE                (10*1024)
 
 /* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application
@@ -84,7 +84,7 @@ a lot of data that needs to be copied, this should be set high. */
  * MEMP_NUM_NETCONN: the number of struct netconns.
  * (only needed if you use the sequential API, like api_lib.c)
  */
-#define MEMP_NUM_NETCONN                8
+#define MEMP_NUM_NETCONN                10
 
 /* ---------- Pbuf options ---------- */
 /* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */

+ 1 - 7
modules/HTTP_Server/http_server.c

@@ -2854,9 +2854,6 @@ uint8_t nameLen = 0, idLen = 0;
 uint8_t user_id; // Id of currently logged-in user     
 struct fs_file file = {0, 0};
 
-#define HEAP_SIZE       (1u << 14)  // 16k
-unsigned char malloc_buf[HEAP_SIZE];
-
 //
 void Cockie(void)
 {
@@ -2901,10 +2898,7 @@ void ssl_server(void *pvParameters)
   SSL_SERVER_STATE ssl_state = SSL_ACCEPT;
   char* sendPtr;
   int ret;
-  
-#ifdef MBEDTLS_MEMORY_BUFFER_ALLOC_C
-  mbedtls_memory_buffer_alloc_init(malloc_buf, sizeof(malloc_buf));
-#endif
+
   mbedtls_net_init( &listen_fd );
   mbedtls_net_init( &client_fd );
   mbedtls_ssl_init( &ssl );

+ 1 - 1
modules/mbedtls_api/mbedtls_config.h

@@ -48,7 +48,7 @@
 
 /* mbed TLS feature support */
 #define MBEDTLS_ECP_DP_SECP256R1_ENABLED
-#define MBEDTLS_ECP_DP_SECP384R1_ENABLED
+//#define MBEDTLS_ECP_DP_SECP384R1_ENABLED
 #define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
 
 #define MBEDTLS_SSL_PROTO_TLS1_2