Commit 2fb145d3 authored by Alexander Alashkin's avatar Alexander Alashkin Committed by Cesanta Bot

Fix DISABLE_MD5 and DISABLE_SHA1 naming

PUBLISHED_FROM=2babde0d0c6add14aa500f4bf1c833715d979c6c
parent 14094aae
...@@ -3,6 +3,6 @@ title: Disabling flags ...@@ -3,6 +3,6 @@ title: Disabling flags
--- ---
- `MG_DISABLE_HTTP_DIGEST_AUTH` disable HTTP Digest (MD5) authorisation support - `MG_DISABLE_HTTP_DIGEST_AUTH` disable HTTP Digest (MD5) authorisation support
- `MG_DISABLE_SHA1` disable SHA1 support (used by WebSocket) - `CS_DISABLE_SHA1` disable SHA1 support (used by WebSocket)
- `MG_DISABLE_MD5` disable MD5 support (used by HTTP auth) - `CS_DISABLE_MD5` disable MD5 support (used by HTTP auth)
- `MG_DISABLE_HTTP_KEEP_ALIVE` useful for embedded systems to save resources - `MG_DISABLE_HTTP_KEEP_ALIVE` useful for embedded systems to save resources
...@@ -3,7 +3,7 @@ PROJECT_NAME := iot_lwip_tcp_server_pca10028 ...@@ -3,7 +3,7 @@ PROJECT_NAME := iot_lwip_tcp_server_pca10028
export OUTPUT_FILENAME export OUTPUT_FILENAME
#MAKEFILE_NAME := $(CURDIR)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) #MAKEFILE_NAME := $(CURDIR)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
MAKEFILE_NAME := $(MAKEFILE_LIST) MAKEFILE_NAME := $(MAKEFILE_LIST)
MAKEFILE_DIR := $(dir $(MAKEFILE_NAME) ) MAKEFILE_DIR := $(dir $(MAKEFILE_NAME) )
TEMPLATE_PATH = ../../../../nrf51_iot_sdk/components/toolchain/gcc TEMPLATE_PATH = ../../../../nrf51_iot_sdk/components/toolchain/gcc
ifeq ($(OS),Windows_NT) ifeq ($(OS),Windows_NT)
...@@ -17,7 +17,7 @@ RM := rm -rf ...@@ -17,7 +17,7 @@ RM := rm -rf
#echo suspend #echo suspend
ifeq ("$(VERBOSE)","1") ifeq ("$(VERBOSE)","1")
NO_ECHO := NO_ECHO :=
else else
NO_ECHO := @ NO_ECHO := @
endif endif
...@@ -118,7 +118,7 @@ BUILD_DIRECTORIES := $(sort $(OBJECT_DIRECTORY) $(OUTPUT_BINARY_DIRECTORY) $(LIS ...@@ -118,7 +118,7 @@ BUILD_DIRECTORIES := $(sort $(OBJECT_DIRECTORY) $(OUTPUT_BINARY_DIRECTORY) $(LIS
# Mongoose features # Mongoose features
MG_FEATURES_TINY = \ MG_FEATURES_TINY = \
-DMG_DISABLE_HTTP_DIGEST_AUTH \ -DMG_DISABLE_HTTP_DIGEST_AUTH \
-DMG_DISABLE_MD5 \ -DCS_DISABLE_MD5 \
-DMG_DISABLE_HTTP_KEEP_ALIVE \ -DMG_DISABLE_HTTP_KEEP_ALIVE \
-DMG_ENABLE_HTTP_SSI=0 \ -DMG_ENABLE_HTTP_SSI=0 \
-DMG_ENABLE_HTTP_STREAMING_MULTIPART -DMG_ENABLE_HTTP_STREAMING_MULTIPART
...@@ -251,7 +251,7 @@ genbin: ...@@ -251,7 +251,7 @@ genbin:
$(NO_ECHO)$(OBJCOPY) -O binary $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).bin $(NO_ECHO)$(OBJCOPY) -O binary $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).bin
## Create binary .hex file from the .out file ## Create binary .hex file from the .out file
genhex: genhex:
@echo Preparing: $(OUTPUT_FILENAME).hex @echo Preparing: $(OUTPUT_FILENAME).hex
$(NO_ECHO)$(OBJCOPY) -O ihex $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).hex $(NO_ECHO)$(OBJCOPY) -O ihex $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).hex
......
...@@ -3,7 +3,7 @@ PROJECT_NAME := iot_lwip_tcp_server_pca10040 ...@@ -3,7 +3,7 @@ PROJECT_NAME := iot_lwip_tcp_server_pca10040
export OUTPUT_FILENAME export OUTPUT_FILENAME
#MAKEFILE_NAME := $(CURDIR)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) #MAKEFILE_NAME := $(CURDIR)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
MAKEFILE_NAME := $(MAKEFILE_LIST) MAKEFILE_NAME := $(MAKEFILE_LIST)
MAKEFILE_DIR := $(dir $(MAKEFILE_NAME) ) MAKEFILE_DIR := $(dir $(MAKEFILE_NAME) )
TEMPLATE_PATH = ../../../../nrf5_iot_sdk/components/toolchain/gcc TEMPLATE_PATH = ../../../../nrf5_iot_sdk/components/toolchain/gcc
ifeq ($(OS),Windows_NT) ifeq ($(OS),Windows_NT)
...@@ -17,7 +17,7 @@ RM := rm -rf ...@@ -17,7 +17,7 @@ RM := rm -rf
#echo suspend #echo suspend
ifeq ("$(VERBOSE)","1") ifeq ("$(VERBOSE)","1")
NO_ECHO := NO_ECHO :=
else else
NO_ECHO := @ NO_ECHO := @
endif endif
...@@ -165,7 +165,7 @@ BUILD_DIRECTORIES := $(sort $(OBJECT_DIRECTORY) $(OUTPUT_BINARY_DIRECTORY) $(LIS ...@@ -165,7 +165,7 @@ BUILD_DIRECTORIES := $(sort $(OBJECT_DIRECTORY) $(OUTPUT_BINARY_DIRECTORY) $(LIS
# Mongoose features # Mongoose features
MG_FEATURES_TINY = \ MG_FEATURES_TINY = \
-DMG_DISABLE_HTTP_DIGEST_AUTH \ -DMG_DISABLE_HTTP_DIGEST_AUTH \
-DMG_DISABLE_MD5 \ -DCS_DISABLE_MD5 \
-DMG_DISABLE_HTTP_KEEP_ALIVE \ -DMG_DISABLE_HTTP_KEEP_ALIVE \
-DMG_ENABLE_HTTP_SSI=0 \ -DMG_ENABLE_HTTP_SSI=0 \
-DMG_ENABLE_HTTP_STREAMING_MULTIPART -DMG_ENABLE_HTTP_STREAMING_MULTIPART
...@@ -297,7 +297,7 @@ genbin: ...@@ -297,7 +297,7 @@ genbin:
$(NO_ECHO)$(OBJCOPY) -O binary $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).bin $(NO_ECHO)$(OBJCOPY) -O binary $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).bin
## Create binary .hex file from the .out file ## Create binary .hex file from the .out file
genhex: genhex:
@echo Preparing: $(OUTPUT_FILENAME).hex @echo Preparing: $(OUTPUT_FILENAME).hex
$(NO_ECHO)$(OBJCOPY) -O ihex $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).hex $(NO_ECHO)$(OBJCOPY) -O ihex $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).hex
echosize: echosize:
......
...@@ -793,7 +793,7 @@ double cs_time(void) { ...@@ -793,7 +793,7 @@ double cs_time(void) {
/* Amalgamated: #include "common/str_util.h" */ /* Amalgamated: #include "common/str_util.h" */
#if !defined(EXCLUDE_COMMON) #if !defined(EXCLUDE_COMMON)
#if !DISABLE_MD5 #if !CS_DISABLE_MD5
/* Amalgamated: #include "common/cs_endian.h" */ /* Amalgamated: #include "common/cs_endian.h" */
...@@ -980,7 +980,7 @@ void MD5_Final(unsigned char digest[16], MD5_CTX *ctx) { ...@@ -980,7 +980,7 @@ void MD5_Final(unsigned char digest[16], MD5_CTX *ctx) {
memcpy(digest, ctx->buf, 16); memcpy(digest, ctx->buf, 16);
memset((char *) ctx, 0, sizeof(*ctx)); memset((char *) ctx, 0, sizeof(*ctx));
} }
#endif /* DISABLE_MD5 */ #endif /* CS_DISABLE_MD5 */
char *cs_md5(char buf[33], ...) { char *cs_md5(char buf[33], ...) {
unsigned char hash[16]; unsigned char hash[16];
...@@ -1203,7 +1203,7 @@ int mg_strncmp(const struct mg_str str1, const struct mg_str str2, size_t n) { ...@@ -1203,7 +1203,7 @@ int mg_strncmp(const struct mg_str str1, const struct mg_str str2, size_t n) {
/* Amalgamated: #include "common/sha1.h" */ /* Amalgamated: #include "common/sha1.h" */
#if !DISABLE_SHA1 && !defined(EXCLUDE_COMMON) #if !CS_DISABLE_SHA1 && !defined(EXCLUDE_COMMON)
/* Amalgamated: #include "common/cs_endian.h" */ /* Amalgamated: #include "common/cs_endian.h" */
......
...@@ -1802,11 +1802,11 @@ void mbuf_trim(struct mbuf *); ...@@ -1802,11 +1802,11 @@ void mbuf_trim(struct mbuf *);
#ifndef CS_COMMON_SHA1_H_ #ifndef CS_COMMON_SHA1_H_
#define CS_COMMON_SHA1_H_ #define CS_COMMON_SHA1_H_
#ifndef DISABLE_SHA1 #ifndef CS_DISABLE_SHA1
#define DISABLE_SHA1 0 #define CS_DISABLE_SHA1 0
#endif #endif
#if !DISABLE_SHA1 #if !CS_DISABLE_SHA1
/* Amalgamated: #include "common/platform.h" */ /* Amalgamated: #include "common/platform.h" */
...@@ -1830,7 +1830,7 @@ void cs_hmac_sha1(const unsigned char *key, size_t key_len, ...@@ -1830,7 +1830,7 @@ void cs_hmac_sha1(const unsigned char *key, size_t key_len,
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* DISABLE_SHA1 */ #endif /* CS_DISABLE_SHA1 */
#endif /* CS_COMMON_SHA1_H_ */ #endif /* CS_COMMON_SHA1_H_ */
#ifdef MG_MODULE_LINES #ifdef MG_MODULE_LINES
...@@ -1846,8 +1846,8 @@ void cs_hmac_sha1(const unsigned char *key, size_t key_len, ...@@ -1846,8 +1846,8 @@ void cs_hmac_sha1(const unsigned char *key, size_t key_len,
/* Amalgamated: #include "common/platform.h" */ /* Amalgamated: #include "common/platform.h" */
#ifndef DISABLE_MD5 #ifndef CS_DISABLE_MD5
#define DISABLE_MD5 0 #define CS_DISABLE_MD5 0
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment