Unverified Commit 67027c0d authored by Marcel Stör's avatar Marcel Stör Committed by GitHub
Browse files

Merge pull request #2340 from nodemcu/dev

2.2 master snap
parents 5073c199 18f33f5f
sdk/ sdk/
cache/ cache/
.ccache/
user_config.h user_config.h
server-ca.crt server-ca.crt
......
...@@ -2,24 +2,26 @@ ...@@ -2,24 +2,26 @@
# #
.NOTPARALLEL: .NOTPARALLEL:
# SDK version NodeMCU is locked to # SDK base version, as released by Espressif
SDK_VER:=2.1.0 SDK_BASE_VER:=2.2.0
# no patch: SDK_BASE_VER equals SDK_VER and sdk dir depends on sdk_extracted # no patch: SDK_VER equals SDK_BASE_VER and sdk dir depends on sdk_extracted
SDK_BASE_VER:=$(SDK_VER) #SDK_VER:=$(SDK_BASE_VER)
SDK_DIR_DEPENDS:=sdk_extracted #SDK_DIR_DEPENDS:=sdk_extracted
# with patch: SDK_BASE_VER differs from SDK_VER and sdk dir depends on sdk_patched
#SDK_BASE_VER:=1.5.4 # with patch: SDK_VER differs from SDK_BASE_VER and sdk dir depends on sdk_patched
#SDK_DIR_DEPENDS:=sdk_patched SDK_PATCH_VER:=f8f27ce
SDK_VER:=$(SDK_BASE_VER)-$(SDK_PATCH_VER)
SDK_DIR_DEPENDS:=sdk_patched
SDK_FILE_VER:=$(SDK_BASE_VER) SDK_FILE_VER:=$(SDK_BASE_VER)
SDK_FILE_SHA1:=66a4272894dc1bcec19f5f8bf79fee80f60a021b SDK_FILE_SHA1:=8b63f1066d3560ff77f119e8ba30a9c39e7baaad
#SDK_PATCH_VER:=$(SDK_VER)_patch_20160704 SDK_PATCH_SHA1:=0bc21ec77b08488f04d3e1c9d161b711d07201a8
#SDK_PATCH_SHA1:=388d9e91df74e3b49fca126da482cf822cf1ebf1
# Ensure we search "our" SDK before the tool-chain's SDK (if any) # Ensure we search "our" SDK before the tool-chain's SDK (if any)
TOP_DIR:=$(abspath $(dir $(lastword $(MAKEFILE_LIST)))) TOP_DIR:=$(abspath $(dir $(lastword $(MAKEFILE_LIST))))
SDK_DIR:=$(TOP_DIR)/sdk/esp_iot_sdk_v$(SDK_VER) SDK_REL_DIR=sdk/esp_iot_sdk_v$(SDK_VER)
CCFLAGS:= -I$(TOP_DIR)/sdk-overrides/include -I$(SDK_DIR)/include SDK_DIR:=$(TOP_DIR)/$(SDK_REL_DIR)
CCFLAGS:= -I$(TOP_DIR)/sdk-overrides/include -I$(TOP_DIR)/app/include/lwip/app -I$(SDK_DIR)/include
LDFLAGS:= -L$(SDK_DIR)/lib -L$(SDK_DIR)/ld $(LDFLAGS) LDFLAGS:= -L$(SDK_DIR)/lib -L$(SDK_DIR)/ld $(LDFLAGS)
ifdef DEBUG ifdef DEBUG
...@@ -39,6 +41,7 @@ ifeq ($(OS),Windows_NT) ...@@ -39,6 +41,7 @@ ifeq ($(OS),Windows_NT)
# It is xcc # It is xcc
AR = xt-ar AR = xt-ar
CC = xt-xcc CC = xt-xcc
CXX = xt-xcc
NM = xt-nm NM = xt-nm
CPP = xt-cpp CPP = xt-cpp
OBJCOPY = xt-objcopy OBJCOPY = xt-objcopy
...@@ -50,6 +53,7 @@ ifeq ($(OS),Windows_NT) ...@@ -50,6 +53,7 @@ ifeq ($(OS),Windows_NT)
CCFLAGS += -ffunction-sections -fno-jump-tables -fdata-sections CCFLAGS += -ffunction-sections -fno-jump-tables -fdata-sections
AR = xtensa-lx106-elf-ar AR = xtensa-lx106-elf-ar
CC = xtensa-lx106-elf-gcc CC = xtensa-lx106-elf-gcc
CXX = xtensa-lx106-elf-g++
NM = xtensa-lx106-elf-nm NM = xtensa-lx106-elf-nm
CPP = xtensa-lx106-elf-cpp CPP = xtensa-lx106-elf-cpp
OBJCOPY = xtensa-lx106-elf-objcopy OBJCOPY = xtensa-lx106-elf-objcopy
...@@ -77,6 +81,7 @@ else ...@@ -77,6 +81,7 @@ else
CCFLAGS += -ffunction-sections -fno-jump-tables -fdata-sections CCFLAGS += -ffunction-sections -fno-jump-tables -fdata-sections
AR = xtensa-lx106-elf-ar AR = xtensa-lx106-elf-ar
CC = $(WRAPCC) xtensa-lx106-elf-gcc CC = $(WRAPCC) xtensa-lx106-elf-gcc
CXX = $(WRAPCC) xtensa-lx106-elf-g++
NM = xtensa-lx106-elf-nm NM = xtensa-lx106-elf-nm
CPP = $(WRAPCC) xtensa-lx106-elf-gcc -E CPP = $(WRAPCC) xtensa-lx106-elf-gcc -E
OBJCOPY = xtensa-lx106-elf-objcopy OBJCOPY = xtensa-lx106-elf-objcopy
...@@ -104,6 +109,7 @@ ESPTOOL ?= ../tools/esptool.py ...@@ -104,6 +109,7 @@ ESPTOOL ?= ../tools/esptool.py
CSRCS ?= $(wildcard *.c) CSRCS ?= $(wildcard *.c)
CXXSRCS ?= $(wildcard *.cpp)
ASRCs ?= $(wildcard *.s) ASRCs ?= $(wildcard *.s)
ASRCS ?= $(wildcard *.S) ASRCS ?= $(wildcard *.S)
SUBDIRS ?= $(patsubst %/,%,$(dir $(filter-out tools/Makefile,$(wildcard */Makefile)))) SUBDIRS ?= $(patsubst %/,%,$(dir $(filter-out tools/Makefile,$(wildcard */Makefile))))
...@@ -112,10 +118,12 @@ ODIR := .output ...@@ -112,10 +118,12 @@ ODIR := .output
OBJODIR := $(ODIR)/$(TARGET)/$(FLAVOR)/obj OBJODIR := $(ODIR)/$(TARGET)/$(FLAVOR)/obj
OBJS := $(CSRCS:%.c=$(OBJODIR)/%.o) \ OBJS := $(CSRCS:%.c=$(OBJODIR)/%.o) \
$(CXXSRCS:%.cpp=$(OBJODIR)/%.o) \
$(ASRCs:%.s=$(OBJODIR)/%.o) \ $(ASRCs:%.s=$(OBJODIR)/%.o) \
$(ASRCS:%.S=$(OBJODIR)/%.o) $(ASRCS:%.S=$(OBJODIR)/%.o)
DEPS := $(CSRCS:%.c=$(OBJODIR)/%.d) \ DEPS := $(CSRCS:%.c=$(OBJODIR)/%.d) \
$(CXXSCRS:%.cpp=$(OBJODIR)/%.d) \
$(ASRCs:%.s=$(OBJODIR)/%.d) \ $(ASRCs:%.s=$(OBJODIR)/%.d) \
$(ASRCS:%.S=$(OBJODIR)/%.d) $(ASRCS:%.S=$(OBJODIR)/%.d)
...@@ -196,26 +204,31 @@ $(BINODIR)/%.bin: $(IMAGEODIR)/%.out ...@@ -196,26 +204,31 @@ $(BINODIR)/%.bin: $(IMAGEODIR)/%.out
# Should be done in top-level makefile only # Should be done in top-level makefile only
# #
all: $(SDK_DIR_DEPENDS) pre_build .subdirs $(OBJS) $(OLIBS) $(OIMAGES) $(OBINS) $(SPECIAL_MKTARGETS) all: sdk_pruned pre_build .subdirs $(OBJS) $(OLIBS) $(OIMAGES) $(OBINS) $(SPECIAL_MKTARGETS)
.PHONY: sdk_extracted .PHONY: sdk_extracted
.PHONY: sdk_patched .PHONY: sdk_patched
.PHONY: sdk_pruned
sdk_extracted: $(TOP_DIR)/sdk/.extracted-$(SDK_BASE_VER) sdk_extracted: $(TOP_DIR)/sdk/.extracted-$(SDK_BASE_VER)
sdk_patched: sdk_extracted $(TOP_DIR)/sdk/.patched-$(SDK_VER) sdk_patched: sdk_extracted $(TOP_DIR)/sdk/.patched-$(SDK_VER)
sdk_pruned: $(SDK_DIR_DEPENDS) $(TOP_DIR)/sdk/.pruned-$(SDK_VER)
$(TOP_DIR)/sdk/.extracted-$(SDK_BASE_VER): $(TOP_DIR)/cache/v$(SDK_FILE_VER).zip $(TOP_DIR)/sdk/.extracted-$(SDK_BASE_VER): $(TOP_DIR)/cache/v$(SDK_FILE_VER).zip
mkdir -p "$(dir $@)" mkdir -p "$(dir $@)"
(cd "$(dir $@)" && rm -fr esp_iot_sdk_v$(SDK_VER) ESP8266_NONOS_SDK-$(SDK_VER) && unzip $(TOP_DIR)/cache/v$(SDK_FILE_VER).zip ESP8266_NONOS_SDK-$(SDK_VER)/lib/* ESP8266_NONOS_SDK-$(SDK_VER)/ld/eagle.rom.addr.v6.ld ESP8266_NONOS_SDK-$(SDK_VER)/include/* ESP8266_NONOS_SDK-$(SDK_VER)/bin/esp_init_data_default.bin) (cd "$(dir $@)" && rm -fr esp_iot_sdk_v$(SDK_VER) ESP8266_NONOS_SDK-$(SDK_BASE_VER) && unzip $(TOP_DIR)/cache/v$(SDK_FILE_VER).zip ESP8266_NONOS_SDK-$(SDK_BASE_VER)/lib/* ESP8266_NONOS_SDK-$(SDK_BASE_VER)/ld/eagle.rom.addr.v6.ld ESP8266_NONOS_SDK-$(SDK_BASE_VER)/include/* ESP8266_NONOS_SDK-$(SDK_BASE_VER)/bin/esp_init_data_default_v05.bin)
mv $(dir $@)/ESP8266_NONOS_SDK-$(SDK_VER) $(dir $@)/esp_iot_sdk_v$(SDK_VER) mv $(dir $@)/ESP8266_NONOS_SDK-$(SDK_BASE_VER) $(dir $@)/esp_iot_sdk_v$(SDK_BASE_VER)
rm -f $(SDK_DIR)/lib/liblwip.a touch $@
$(TOP_DIR)/sdk/.patched-$(SDK_VER): $(TOP_DIR)/cache/$(SDK_PATCH_VER).patch
mv $(dir $@)/esp_iot_sdk_v$(SDK_BASE_VER) $(dir $@)/esp_iot_sdk_v$(SDK_VER)
git apply --verbose -p1 --exclude='*VERSION' --exclude='*bin/at*' --directory=$(SDK_REL_DIR) $<
touch $@ touch $@
$(TOP_DIR)/sdk/.patched-$(SDK_VER): $(TOP_DIR)/cache/esp_iot_sdk_v$(SDK_PATCH_VER).zip $(TOP_DIR)/sdk/.pruned-$(SDK_VER):
mkdir -p "$(dir $@)/patch" rm -f $(SDK_DIR)/lib/liblwip.a $(SDK_DIR)/lib/libssl.a $(SDK_DIR)/lib/libmbedtls.a
(cd "$(dir $@)/patch" && unzip $(TOP_DIR)/cache/esp_iot_sdk_v$(SDK_PATCH_VER)*.zip *.a esp_init_data_default.bin && mv *.a $(SDK_DIR)/lib/ && mv esp_init_data_default.bin $(SDK_DIR)/bin/) ar d $(SDK_DIR)/lib/libmain.a time.o
rmdir $(dir $@)/patch ar d $(SDK_DIR)/lib/libc.a lib_a-time.o
rm -f $(SDK_DIR)/lib/liblwip.a
touch $@ touch $@
$(TOP_DIR)/cache/v$(SDK_FILE_VER).zip: $(TOP_DIR)/cache/v$(SDK_FILE_VER).zip:
...@@ -223,9 +236,9 @@ $(TOP_DIR)/cache/v$(SDK_FILE_VER).zip: ...@@ -223,9 +236,9 @@ $(TOP_DIR)/cache/v$(SDK_FILE_VER).zip:
wget --tries=10 --timeout=15 --waitretry=30 --read-timeout=20 --retry-connrefused https://github.com/espressif/ESP8266_NONOS_SDK/archive/v$(SDK_FILE_VER).zip -O $@ || { rm -f "$@"; exit 1; } wget --tries=10 --timeout=15 --waitretry=30 --read-timeout=20 --retry-connrefused https://github.com/espressif/ESP8266_NONOS_SDK/archive/v$(SDK_FILE_VER).zip -O $@ || { rm -f "$@"; exit 1; }
(echo "$(SDK_FILE_SHA1) $@" | sha1sum -c -) || { rm -f "$@"; exit 1; } (echo "$(SDK_FILE_SHA1) $@" | sha1sum -c -) || { rm -f "$@"; exit 1; }
$(TOP_DIR)/cache/esp_iot_sdk_v$(SDK_PATCH_VER).zip: $(TOP_DIR)/cache/$(SDK_PATCH_VER).patch:
mkdir -p "$(dir $@)" mkdir -p "$(dir $@)"
wget --tries=10 --timeout=15 --waitretry=30 --read-timeout=20 --retry-connrefused http://espressif.com/sites/default/files/sdks/esp8266_nonos_sdk_v$(SDK_PATCH_VER).zip -O $@ || { rm -f "$@"; exit 1; } wget --tries=10 --timeout=15 --waitretry=30 --read-timeout=20 --retry-connrefused "https://github.com/espressif/ESP8266_NONOS_SDK/compare/v$(SDK_BASE_VER)...$(SDK_PATCH_VER).patch" -O $@ || { rm -f "$@"; exit 1; }
(echo "$(SDK_PATCH_SHA1) $@" | sha1sum -c -) || { rm -f "$@"; exit 1; } (echo "$(SDK_PATCH_SHA1) $@" | sha1sum -c -) || { rm -f "$@"; exit 1; }
clean: clean:
...@@ -306,6 +319,17 @@ $(OBJODIR)/%.d: %.c ...@@ -306,6 +319,17 @@ $(OBJODIR)/%.d: %.c
sed 's,\($*\.o\)[ :]*,$(OBJODIR)/\1 $@ : ,g' < $@.$$$$ > $@; \ sed 's,\($*\.o\)[ :]*,$(OBJODIR)/\1 $@ : ,g' < $@.$$$$ > $@; \
rm -f $@.$$$$ rm -f $@.$$$$
$(OBJODIR)/%.o: %.cpp
@mkdir -p $(OBJODIR);
$(CXX) $(if $(findstring $<,$(DSRCS)),$(DFLAGS),$(CFLAGS)) $(COPTS_$(*F)) -o $@ -c $<
$(OBJODIR)/%.d: %.cpp
@mkdir -p $(OBJODIR);
@echo DEPEND: $(CXX) -M $(CFLAGS) $<
@set -e; rm -f $@; \
sed 's,\($*\.o\)[ :]*,$(OBJODIR)/\1 $@ : ,g' < $@.$$$$ > $@; \
rm -f $@.$$$$
$(OBJODIR)/%.o: %.s $(OBJODIR)/%.o: %.s
@mkdir -p $(OBJODIR); @mkdir -p $(OBJODIR);
$(CC) $(CFLAGS) -o $@ -c $< $(CC) $(CFLAGS) -o $@ -c $<
......
# **NodeMCU 2.1.0** # # **NodeMCU 2.2.0** #
[![Join the chat at https://gitter.im/nodemcu/nodemcu-firmware](https://img.shields.io/gitter/room/badges/shields.svg)](https://gitter.im/nodemcu/nodemcu-firmware?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Join the chat at https://gitter.im/nodemcu/nodemcu-firmware](https://img.shields.io/gitter/room/badges/shields.svg)](https://gitter.im/nodemcu/nodemcu-firmware?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status](https://travis-ci.org/nodemcu/nodemcu-firmware.svg)](https://travis-ci.org/nodemcu/nodemcu-firmware) [![Build Status](https://travis-ci.org/nodemcu/nodemcu-firmware.svg)](https://travis-ci.org/nodemcu/nodemcu-firmware)
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
### A Lua based firmware for ESP8266 WiFi SOC ### A Lua based firmware for ESP8266 WiFi SOC
NodeMCU is an [eLua](http://www.eluaproject.net/) based firmware for the [ESP8266 WiFi SOC from Espressif](http://espressif.com/en/products/esp8266/). The firmware is based on the [Espressif NON-OS SDK 2.1.0](https://github.com/espressif/ESP8266_NONOS_SDK/releases/tag/v2.1.0) and uses a file system based on [spiffs](https://github.com/pellepl/spiffs). The code repository consists of 98.1% C-code that glues the thin Lua veneer to the SDK. NodeMCU is an [eLua](http://www.eluaproject.net/) based firmware for the [ESP8266 WiFi SOC from Espressif](http://espressif.com/en/products/esp8266/). The firmware is based on the [Espressif NON-OS SDK 2.2.0](https://github.com/espressif/ESP8266_NONOS_SDK/releases/tag/v2.2.0) and uses a file system based on [spiffs](https://github.com/pellepl/spiffs). The code repository consists of 98.1% C-code that glues the thin Lua veneer to the SDK.
The NodeMCU *firmware* is a companion project to the popular [NodeMCU dev kits](https://github.com/nodemcu/nodemcu-devkit-v1.0), ready-made open source development boards with ESP8266-12E chips. The NodeMCU *firmware* is a companion project to the popular [NodeMCU dev kits](https://github.com/nodemcu/nodemcu-devkit-v1.0), ready-made open source development boards with ESP8266-12E chips.
...@@ -16,7 +16,7 @@ The NodeMCU *firmware* is a companion project to the popular [NodeMCU dev kits]( ...@@ -16,7 +16,7 @@ The NodeMCU *firmware* is a companion project to the popular [NodeMCU dev kits](
- Easy to program wireless node and/or access point - Easy to program wireless node and/or access point
- Based on Lua 5.1.4 (without *debug, os* modules) - Based on Lua 5.1.4 (without *debug, os* modules)
- Asynchronous event-driven programming model - Asynchronous event-driven programming model
- 55+ built-in modules - more than 65 built-in modules
- Firmware available with or without floating point support (integer-only uses less memory) - Firmware available with or without floating point support (integer-only uses less memory)
- Up-to-date documentation at [https://nodemcu.readthedocs.io](https://nodemcu.readthedocs.io) - Up-to-date documentation at [https://nodemcu.readthedocs.io](https://nodemcu.readthedocs.io)
...@@ -38,7 +38,7 @@ end) ...@@ -38,7 +38,7 @@ end)
```lua ```lua
-- connect to WiFi access point -- connect to WiFi access point
wifi.setmode(wifi.STATION) wifi.setmode(wifi.STATION)
wifi.sta.config("SSID", "password") wifi.sta.config{ssid="SSID", pwd="password"}
``` ```
# Documentation # Documentation
......
...@@ -50,6 +50,7 @@ SUBDIRS= \ ...@@ -50,6 +50,7 @@ SUBDIRS= \
misc \ misc \
pm \ pm \
sjson \ sjson \
sqlite3 \
endif # } PDIR endif # } PDIR
...@@ -104,6 +105,7 @@ COMPONENTS_eagle.app.v6 = \ ...@@ -104,6 +105,7 @@ COMPONENTS_eagle.app.v6 = \
swTimer/libswtimer.a \ swTimer/libswtimer.a \
misc/libmisc.a \ misc/libmisc.a \
sjson/libsjson.a \ sjson/libsjson.a \
sqlite3/libsqlite3.a \
# Inspect the modules library and work out which modules need to be linked. # Inspect the modules library and work out which modules need to be linked.
...@@ -164,6 +166,7 @@ CONFIGURATION_DEFINES = -D__ets__ \ ...@@ -164,6 +166,7 @@ CONFIGURATION_DEFINES = -D__ets__ \
-DLWIP_OPEN_SRC \ -DLWIP_OPEN_SRC \
-DPBUF_RSV_FOR_WLAN \ -DPBUF_RSV_FOR_WLAN \
-DEBUF_LWIP \ -DEBUF_LWIP \
-DUSE_OPTIMIZE_PRINTF \
-DMBEDTLS_USER_CONFIG_FILE=\"user_mbedtls.h\" \ -DMBEDTLS_USER_CONFIG_FILE=\"user_mbedtls.h\" \
DEFINES += \ DEFINES += \
......
...@@ -549,7 +549,7 @@ void coap_setup(void) ...@@ -549,7 +549,7 @@ void coap_setup(void)
message_id = (unsigned short)os_random(); // calculate only once message_id = (unsigned short)os_random(); // calculate only once
} }
inline int int
check_token(coap_packet_t *pkt) { check_token(coap_packet_t *pkt) {
return pkt->tok.len == the_token.len && c_memcmp(pkt->tok.p, the_token.p, the_token.len) == 0; return pkt->tok.len == the_token.len && c_memcmp(pkt->tok.p, the_token.p, the_token.len) == 0;
} }
...@@ -132,9 +132,9 @@ key_50ms_cb(struct single_key_param *single_key) ...@@ -132,9 +132,9 @@ key_50ms_cb(struct single_key_param *single_key)
LOCAL void LOCAL void
key_intr_handler(void *arg) key_intr_handler(void *arg)
{ {
struct keys_param *keys = arg;
uint8 i; uint8 i;
uint32 gpio_status = GPIO_REG_READ(GPIO_STATUS_ADDRESS); uint32 gpio_status = GPIO_REG_READ(GPIO_STATUS_ADDRESS);
struct keys_param *keys = arg;
for (i = 0; i < keys->key_num; i++) { for (i = 0; i < keys->key_num; i++) {
if (gpio_status & BIT(keys->single_key[i]->gpio_id)) { if (gpio_status & BIT(keys->single_key[i]->gpio_id)) {
......
...@@ -112,12 +112,12 @@ struct myvfs_dir { ...@@ -112,12 +112,12 @@ struct myvfs_dir {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// exported helper functions for FatFS // exported helper functions for FatFS
// //
inline void *ff_memalloc( UINT size ) void *ff_memalloc( UINT size )
{ {
return c_malloc( size ); return c_malloc( size );
} }
inline void ff_memfree( void *mblock ) void ff_memfree( void *mblock )
{ {
c_free( mblock ); c_free( mblock );
} }
......
...@@ -215,20 +215,23 @@ static void ICACHE_FLASH_ATTR http_connect_callback( void * arg ) ...@@ -215,20 +215,23 @@ static void ICACHE_FLASH_ATTR http_connect_callback( void * arg )
ua_len = strlen(ua_header); ua_len = strlen(ua_header);
} }
char host_header[32] = ""; char * host_header = "";
int host_len = 0; int host_len = 0;
if ( os_strstr( req->headers, "Host:" ) == NULL && os_strstr( req->headers, "host:" ) == NULL) if ( os_strstr( req->headers, "Host:" ) == NULL && os_strstr( req->headers, "host:" ) == NULL)
{ {
int max_header_len = 9 + strlen(req->hostname); // 9 is fixed size of "Host:[space][cr][lf]\0"
if ((req->port == 80) if ((req->port == 80)
#ifdef CLIENT_SSL_ENABLE #ifdef CLIENT_SSL_ENABLE
|| ((req->port == 443) && ( req->secure )) || ((req->port == 443) && ( req->secure ))
#endif #endif
) )
{ {
host_header = alloca(max_header_len);
os_sprintf( host_header, "Host: %s\r\n", req->hostname ); os_sprintf( host_header, "Host: %s\r\n", req->hostname );
} }
else else
{ {
host_header = alloca(max_header_len + 6); // 6 is worst case of ":port" where port is maximum 5 digits
os_sprintf( host_header, "Host: %s:%d\r\n", req->hostname, req->port ); os_sprintf( host_header, "Host: %s:%d\r\n", req->hostname, req->port );
} }
host_len = strlen(host_header); host_len = strlen(host_header);
......
...@@ -65,7 +65,7 @@ typedef uint32_t mem_ptr_t; ...@@ -65,7 +65,7 @@ typedef uint32_t mem_ptr_t;
#define U32_F "d" #define U32_F "d"
#define X32_F "x" #define X32_F "x"
#define LWIP_ERR_T s32_t
//#define PACK_STRUCT_FIELD(x) x __attribute__((packed)) //#define PACK_STRUCT_FIELD(x) x __attribute__((packed))
#define PACK_STRUCT_FIELD(x) x #define PACK_STRUCT_FIELD(x) x
......
/*
* ESPRESSIF MIT License
*
* Copyright (c) 2016 <ESPRESSIF SYSTEMS (SHANGHAI) PTE LTD>
*
* Permission is hereby granted for use on ESPRESSIF SYSTEMS ESP8266 only, in which case,
* it is free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the Software is furnished
* to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or
* substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
#ifndef __ESPCONN_H__ #ifndef __ESPCONN_H__
#define __ESPCONN_H__ #define __ESPCONN_H__
#include "lwip/err.h"
#include "lwip/dns.h" #include "lwip/dns.h"
#include "os_type.h" #include "os_type.h"
#include "lwip/app/espconn_buf.h" #include "lwip/app/espconn_buf.h"
...@@ -37,8 +62,7 @@ typedef void (* espconn_reconnect_callback)(void *arg, sint8 err); ...@@ -37,8 +62,7 @@ typedef void (* espconn_reconnect_callback)(void *arg, sint8 err);
#define ESPCONN_NODATA -17 /* No data can be read */ #define ESPCONN_NODATA -17 /* No data can be read */
#define ESPCONN_HANDSHAKE -28 /* ssl handshake failed */ #define ESPCONN_HANDSHAKE -28 /* ssl handshake failed */
#define ESPCONN_RESP_TIMEOUT -29 /* ssl handshake no response*/ #define ESPCONN_SSL_INVALID_DATA -61 /* ssl application invalid */
#define ESPCONN_PROTO_MSG -61 /* ssl application invalid */
#define ESPCONN_SSL 0x01 #define ESPCONN_SSL 0x01
#define ESPCONN_NORM 0x00 #define ESPCONN_NORM 0x00
...@@ -121,6 +145,7 @@ enum espconn_option{ ...@@ -121,6 +145,7 @@ enum espconn_option{
ESPCONN_NODELAY = 0x02, ESPCONN_NODELAY = 0x02,
ESPCONN_COPY = 0x04, ESPCONN_COPY = 0x04,
ESPCONN_KEEPALIVE = 0x08, ESPCONN_KEEPALIVE = 0x08,
ESPCONN_MANUALRECV = 0x10,
ESPCONN_END ESPCONN_END
}; };
...@@ -461,6 +486,17 @@ extern sint8 espconn_regist_sentcb(struct espconn *espconn, espconn_sent_callbac ...@@ -461,6 +486,17 @@ extern sint8 espconn_regist_sentcb(struct espconn *espconn, espconn_sent_callbac
*******************************************************************************/ *******************************************************************************/
extern sint8 espconn_regist_write_finish(struct espconn *espconn, espconn_connect_callback write_finish_fn); extern sint8 espconn_regist_write_finish(struct espconn *espconn, espconn_connect_callback write_finish_fn);
/******************************************************************************
* FunctionName : espconn_send
* Description : sent data for client or server
* Parameters : espconn -- espconn to set for client or server
* psent -- data to send
* length -- length of data to send
* Returns : none
*******************************************************************************/
extern sint8 espconn_send(struct espconn *espconn, uint8 *psent, uint16 length);
/****************************************************************************** /******************************************************************************
* FunctionName : espconn_sent * FunctionName : espconn_sent
* Description : sent data for client or server * Description : sent data for client or server
...@@ -573,7 +609,163 @@ extern sint8 espconn_get_keepalive(struct espconn *espconn, uint8 level, void *o ...@@ -573,7 +609,163 @@ extern sint8 espconn_get_keepalive(struct espconn *espconn, uint8 level, void *o
* - ESPCONN_ARG: dns client not initialized or invalid hostname * - ESPCONN_ARG: dns client not initialized or invalid hostname
*******************************************************************************/ *******************************************************************************/
extern sint8 espconn_gethostbyname(struct espconn *pespconn, const char *name, ip_addr_t *addr, dns_found_callback found); extern err_t espconn_gethostbyname(struct espconn *pespconn, const char *name, ip_addr_t *addr, dns_found_callback found);
/******************************************************************************
* FunctionName : espconn_abort
* Description : Forcely abort with host
* Parameters : espconn -- the espconn used to connect with the host
* Returns : result
*******************************************************************************/
extern sint8 espconn_abort(struct espconn *espconn);
/******************************************************************************
* FunctionName : espconn_encry_connect
* Description : The function given as connection
* Parameters : espconn -- the espconn used to connect with the host
* Returns : none
*******************************************************************************/
extern sint8 espconn_secure_connect(struct espconn *espconn);
/******************************************************************************
* FunctionName : espconn_encry_disconnect
* Description : The function given as the disconnection
* Parameters : espconn -- the espconn used to disconnect with the host
* Returns : none
*******************************************************************************/
extern sint8 espconn_secure_disconnect(struct espconn *espconn);
/******************************************************************************
* FunctionName : espconn_secure_send
* Description : sent data for client or server
* Parameters : espconn -- espconn to set for client or server
* psent -- data to send
* length -- length of data to send
* Returns : none
*******************************************************************************/
extern sint8 espconn_secure_send(struct espconn *espconn, uint8 *psent, uint16 length);
/******************************************************************************
* FunctionName : espconn_encry_sent
* Description : sent data for client or server
* Parameters : espconn -- espconn to set for client or server
* psent -- data to send
* length -- length of data to send
* Returns : none
*******************************************************************************/
extern sint8 espconn_secure_sent(struct espconn *espconn, uint8 *psent, uint16 length);
/******************************************************************************
* FunctionName : espconn_secure_set_size
* Description : set the buffer size for client or server
* Parameters : level -- set for client or server
* 1: client,2:server,3:client and server
* size -- buffer size
* Returns : true or false
*******************************************************************************/
extern bool espconn_secure_set_size(uint8 level, uint16 size);
/******************************************************************************
* FunctionName : espconn_secure_get_size
* Description : get buffer size for client or server
* Parameters : level -- set for client or server
* 1: client,2:server,3:client and server
* Returns : buffer size for client or server
*******************************************************************************/
extern sint16 espconn_secure_get_size(uint8 level);
/******************************************************************************
* FunctionName : espconn_secure_ca_enable
* Description : enable the certificate authenticate and set the flash sector
* as client or server
* Parameters : level -- set for client or server
* 1: client,2:server,3:client and server
* flash_sector -- flash sector for save certificate
* Returns : result true or false
*******************************************************************************/
extern bool espconn_secure_ca_enable(uint8 level, uint32 flash_sector );
/******************************************************************************
* FunctionName : espconn_secure_ca_disable
* Description : disable the certificate authenticate as client or server
* Parameters : level -- set for client or server
* 1: client,2:server,3:client and server
* Returns : result true or false
*******************************************************************************/
extern bool espconn_secure_ca_disable(uint8 level);
/******************************************************************************
* FunctionName : espconn_secure_cert_req_enable
* Description : enable the client certificate authenticate and set the flash sector
* as client or server
* Parameters : level -- set for client or server
* 1: client,2:server,3:client and server
* flash_sector -- flash sector for save certificate
* Returns : result true or false
*******************************************************************************/
extern bool espconn_secure_cert_req_enable(uint8 level, uint32 flash_sector );
/******************************************************************************
* FunctionName : espconn_secure_ca_disable
* Description : disable the client certificate authenticate as client or server
* Parameters : level -- set for client or server
* 1: client,2:server,3:client and server
* Returns : result true or false
*******************************************************************************/
extern bool espconn_secure_cert_req_disable(uint8 level);
/******************************************************************************
* FunctionName : espconn_secure_set_default_certificate
* Description : Load the certificates in memory depending on compile-time
* and user options.
* Parameters : certificate -- Load the certificate
* length -- Load the certificate length
* Returns : result true or false
*******************************************************************************/
extern bool espconn_secure_set_default_certificate(const uint8* certificate, uint16 length);
/******************************************************************************
* FunctionName : espconn_secure_set_default_private_key
* Description : Load the key in memory depending on compile-time
* and user options.
* Parameters : private_key -- Load the key
* length -- Load the key length
* Returns : result true or false
*******************************************************************************/
extern bool espconn_secure_set_default_private_key(const uint8* private_key, uint16 length);
/******************************************************************************
* FunctionName : espconn_secure_accept
* Description : The function given as the listen
* Parameters : espconn -- the espconn used to listen the connection
* Returns : result
*******************************************************************************/
extern sint8 espconn_secure_accept(struct espconn *espconn);
/******************************************************************************
* FunctionName : espconn_secure_accepts
* Description : delete the secure server host
* Parameters : espconn -- the espconn used to listen the connection
* Returns : result
*******************************************************************************/
extern sint8 espconn_secure_delete(struct espconn *espconn);
/****************************************************************************** /******************************************************************************
* FunctionName : espconn_igmp_join * FunctionName : espconn_igmp_join
...@@ -593,6 +785,22 @@ extern sint8 espconn_igmp_join(ip_addr_t *host_ip, ip_addr_t *multicast_ip); ...@@ -593,6 +785,22 @@ extern sint8 espconn_igmp_join(ip_addr_t *host_ip, ip_addr_t *multicast_ip);
*******************************************************************************/ *******************************************************************************/
extern sint8 espconn_igmp_leave(ip_addr_t *host_ip, ip_addr_t *multicast_ip); extern sint8 espconn_igmp_leave(ip_addr_t *host_ip, ip_addr_t *multicast_ip);
/******************************************************************************
* FunctionName : espconn_recv_hold
* Description : hold tcp receive
* Parameters : espconn -- espconn to hold
* Returns : none
*******************************************************************************/
extern sint8 espconn_recv_hold(struct espconn *pespconn);
/******************************************************************************
* FunctionName : espconn_recv_unhold
* Description : unhold tcp receive
* Parameters : espconn -- espconn to unhold
* Returns : none
*******************************************************************************/
extern sint8 espconn_recv_unhold(struct espconn *pespconn);
/****************************************************************************** /******************************************************************************
* FunctionName : espconn_mdns_init * FunctionName : espconn_mdns_init
* Description : register a device with mdns * Description : register a device with mdns
......
...@@ -13,6 +13,9 @@ ...@@ -13,6 +13,9 @@
#define espconn_keepalive_enable(pcb) ((pcb)->so_options |= SOF_KEEPALIVE) #define espconn_keepalive_enable(pcb) ((pcb)->so_options |= SOF_KEEPALIVE)
#define espconn_keepalive_disable(pcb) ((pcb)->so_options &= ~SOF_KEEPALIVE) #define espconn_keepalive_disable(pcb) ((pcb)->so_options &= ~SOF_KEEPALIVE)
#define espconn_manual_recv_disabled(espconn) (((espconn)->pcommon.espconn_opt & ESPCONN_MANUALRECV) != 0)
#define espconn_manual_recv_enabled(espconn) (((espconn)->pcommon.espconn_opt & ESPCONN_MANUALRECV) == 0)
/****************************************************************************** /******************************************************************************
* FunctionName : espconn_kill_oldest_pcb * FunctionName : espconn_kill_oldest_pcb
* Description : A oldest incoming connection has been killed. * Description : A oldest incoming connection has been killed.
......
/*
* time.h
*
* Created on: May 31, 2016
* Author: liuhan
*/
#ifndef TIME_H_
#define TIME_H_
#include "osapi.h"
#include "os_type.h"
#include "lwip/sntp.h"
struct timeval {
unsigned long tv_sec; /* seconds */
unsigned long tv_usec; /* and microseconds */
};
/***************************RTC TIME OPTION***************************************/
// daylight settings
// Base calculated with value obtained from NTP server (64 bits)
#define sntp_base (*((uint64_t*)RTC_STORE0))
// Timer value when base was obtained
#define TIM_REF_SET(value) WRITE_PERI_REG(RTC_STORE2, value)
#define TIM_REF_GET() READ_PERI_REG(RTC_STORE2)
// Setters and getters for CAL, TZ and DST.
#define RTC_CAL_SET(val) do {uint32 value = READ_PERI_REG(RTC_STORE3);\
value |= ((val) & 0x0000FFFF);\
WRITE_PERI_REG(RTC_STORE3, value);\
}while(0)
#define RTC_DST_SET(val) do {uint32 value = READ_PERI_REG(RTC_STORE3);\
value |= (((val)<<16) & 0x00010000);\
WRITE_PERI_REG(RTC_STORE3, value);\
}while(0)
#define RTC_TZ_SET(val) do {uint32 value = READ_PERI_REG(RTC_STORE3);\
value |= (((val)<<24) & 0xFF000000);\
WRITE_PERI_REG(RTC_STORE3, value);\
}while(0)
#define RTC_CAL_GET() (READ_PERI_REG(RTC_STORE3) & 0x0000FFFF)
#define RTC_DST_GET() ((READ_PERI_REG(RTC_STORE3) & 0x00010000)>>16)
#define RTC_TZ_GET() ((((int)READ_PERI_REG(RTC_STORE3)) & ((int)0xFF000000))>>24)
void system_update_rtc(time_t t, uint32_t us);
time_t sntp_get_rtc_time(sint32_t *us);
int gettimeofday(struct timeval* t, void* timezone);
void updateTime(uint32 ms);
bool configTime(int timezone, int daylightOffset, char *server1, char *server2, char *server3, bool enable);
time_t time(time_t *t);
unsigned long millis(void);
unsigned long micros(void);
#endif /* TIME_H_ */
...@@ -78,7 +78,7 @@ do{\ ...@@ -78,7 +78,7 @@ do{\
#define mem_malloc(s) ({const char *file = mem_debug_file; pvPortMalloc(s, file, __LINE__);}) #define mem_malloc(s) ({const char *file = mem_debug_file; pvPortMalloc(s, file, __LINE__);})
#endif #endif
#ifndef mem_calloc #ifndef mem_calloc
#define mem_calloc(s) ({const char *file = mem_debug_file; pvPortCalloc(s, file, __LINE__);}) #define mem_calloc(l, s) ({const char *file = mem_debug_file; pvPortCalloc(l, s, file, __LINE__);})
#endif #endif
#ifndef mem_realloc #ifndef mem_realloc
#define mem_realloc(p, s) ({const char *file = mem_debug_file; pvPortRealloc(p, s, file, __LINE__);}) #define mem_realloc(p, s) ({const char *file = mem_debug_file; pvPortRealloc(p, s, file, __LINE__);})
......
#ifndef LWIP_SNTP_H
#define LWIP_SNTP_H
#include "lwip/opt.h"
#include "lwip/ip_addr.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef long time_t;
/** The maximum number of SNTP servers that can be set */
#ifndef SNTP_MAX_SERVERS
#define SNTP_MAX_SERVERS 3
#endif
/** Set this to 1 to implement the callback function called by dhcp when
* NTP servers are received. */
#ifndef SNTP_GET_SERVERS_FROM_DHCP
#define SNTP_GET_SERVERS_FROM_DHCP 0//LWIP_DHCP_GET_NTP_SRV
#endif
/* Set this to 1 to support DNS names (or IP address strings) to set sntp servers */
#ifndef SNTP_SERVER_DNS
#define SNTP_SERVER_DNS 1
#endif
bool sntp_get_timetype(void);
void sntp_set_receive_time_size(void);
/** One server address/name can be defined as default if SNTP_SERVER_DNS == 1:
* #define SNTP_SERVER_ADDRESS "pool.ntp.org"
*/
uint32 sntp_get_current_timestamp();
char* sntp_get_real_time(long t);
void sntp_init(void);
void sntp_stop(void);
sint8 sntp_get_timezone(void);
bool sntp_set_timezone(sint8 timezone);
void sntp_setserver(u8_t idx, ip_addr_t *addr);
ip_addr_t sntp_getserver(u8_t idx);
#if SNTP_SERVER_DNS
void sntp_setservername(u8_t idx, char *server);
char *sntp_getservername(u8_t idx);
#endif /* SNTP_SERVER_DNS */
#if SNTP_GET_SERVERS_FROM_DHCP
void sntp_servermode_dhcp(int set_servers_from_dhcp);
#else /* SNTP_GET_SERVERS_FROM_DHCP */
#define sntp_servermode_dhcp(x)
#endif /* SNTP_GET_SERVERS_FROM_DHCP */
#ifdef __cplusplus
}
#endif
#endif /* LWIP_SNTP_H */
This diff is collapsed.
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
* \file aesni.h * \file aesni.h
* *
* \brief AES-NI for hardware AES acceleration on some Intel processors * \brief AES-NI for hardware AES acceleration on some Intel processors
* */
/*
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *
......
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
* *
* \brief The ARCFOUR stream cipher * \brief The ARCFOUR stream cipher
* *
* \warning ARC4 is considered a weak cipher and its use constitutes a
* security risk. We recommend considering stronger ciphers instead.
*/
/*
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *
...@@ -19,6 +23,7 @@ ...@@ -19,6 +23,7 @@
* limitations under the License. * limitations under the License.
* *
* This file is part of mbed TLS (https://tls.mbed.org) * This file is part of mbed TLS (https://tls.mbed.org)
*
*/ */
#ifndef MBEDTLS_ARC4_H #ifndef MBEDTLS_ARC4_H
#define MBEDTLS_ARC4_H #define MBEDTLS_ARC4_H
...@@ -31,6 +36,8 @@ ...@@ -31,6 +36,8 @@
#include <stddef.h> #include <stddef.h>
#define MBEDTLS_ERR_ARC4_HW_ACCEL_FAILED -0x0019 /**< ARC4 hardware accelerator failed. */
#if !defined(MBEDTLS_ARC4_ALT) #if !defined(MBEDTLS_ARC4_ALT)
// Regular implementation // Regular implementation
// //
...@@ -40,7 +47,11 @@ extern "C" { ...@@ -40,7 +47,11 @@ extern "C" {
#endif #endif
/** /**
* \brief ARC4 context structure * \brief ARC4 context structure
*
* \warning ARC4 is considered a weak cipher and its use constitutes a
* security risk. We recommend considering stronger ciphers instead.
*
*/ */
typedef struct typedef struct
{ {
...@@ -54,6 +65,11 @@ mbedtls_arc4_context; ...@@ -54,6 +65,11 @@ mbedtls_arc4_context;
* \brief Initialize ARC4 context * \brief Initialize ARC4 context
* *
* \param ctx ARC4 context to be initialized * \param ctx ARC4 context to be initialized
*
* \warning ARC4 is considered a weak cipher and its use constitutes a
* security risk. We recommend considering stronger ciphers
* instead.
*
*/ */
void mbedtls_arc4_init( mbedtls_arc4_context *ctx ); void mbedtls_arc4_init( mbedtls_arc4_context *ctx );
...@@ -61,6 +77,11 @@ void mbedtls_arc4_init( mbedtls_arc4_context *ctx ); ...@@ -61,6 +77,11 @@ void mbedtls_arc4_init( mbedtls_arc4_context *ctx );
* \brief Clear ARC4 context * \brief Clear ARC4 context
* *
* \param ctx ARC4 context to be cleared * \param ctx ARC4 context to be cleared
*
* \warning ARC4 is considered a weak cipher and its use constitutes a
* security risk. We recommend considering stronger ciphers
* instead.
*
*/ */
void mbedtls_arc4_free( mbedtls_arc4_context *ctx ); void mbedtls_arc4_free( mbedtls_arc4_context *ctx );
...@@ -70,6 +91,11 @@ void mbedtls_arc4_free( mbedtls_arc4_context *ctx ); ...@@ -70,6 +91,11 @@ void mbedtls_arc4_free( mbedtls_arc4_context *ctx );
* \param ctx ARC4 context to be setup * \param ctx ARC4 context to be setup
* \param key the secret key * \param key the secret key
* \param keylen length of the key, in bytes * \param keylen length of the key, in bytes
*
* \warning ARC4 is considered a weak cipher and its use constitutes a
* security risk. We recommend considering stronger ciphers
* instead.
*
*/ */
void mbedtls_arc4_setup( mbedtls_arc4_context *ctx, const unsigned char *key, void mbedtls_arc4_setup( mbedtls_arc4_context *ctx, const unsigned char *key,
unsigned int keylen ); unsigned int keylen );
...@@ -83,6 +109,11 @@ void mbedtls_arc4_setup( mbedtls_arc4_context *ctx, const unsigned char *key, ...@@ -83,6 +109,11 @@ void mbedtls_arc4_setup( mbedtls_arc4_context *ctx, const unsigned char *key,
* \param output buffer for the output data * \param output buffer for the output data
* *
* \return 0 if successful * \return 0 if successful
*
* \warning ARC4 is considered a weak cipher and its use constitutes a
* security risk. We recommend considering stronger ciphers
* instead.
*
*/ */
int mbedtls_arc4_crypt( mbedtls_arc4_context *ctx, size_t length, const unsigned char *input, int mbedtls_arc4_crypt( mbedtls_arc4_context *ctx, size_t length, const unsigned char *input,
unsigned char *output ); unsigned char *output );
...@@ -103,6 +134,11 @@ extern "C" { ...@@ -103,6 +134,11 @@ extern "C" {
* \brief Checkup routine * \brief Checkup routine
* *
* \return 0 if successful, or 1 if the test failed * \return 0 if successful, or 1 if the test failed
*
* \warning ARC4 is considered a weak cipher and its use constitutes a
* security risk. We recommend considering stronger ciphers
* instead.
*
*/ */
int mbedtls_arc4_self_test( int verbose ); int mbedtls_arc4_self_test( int verbose );
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
* \file asn1.h * \file asn1.h
* *
* \brief Generic ASN.1 parsing * \brief Generic ASN.1 parsing
* */
/*
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *
...@@ -59,7 +60,7 @@ ...@@ -59,7 +60,7 @@
/** /**
* \name DER constants * \name DER constants
* These constants comply with DER encoded the ANS1 type tags. * These constants comply with the DER encoded ASN.1 type tags.
* DER encoding uses hexadecimal representation. * DER encoding uses hexadecimal representation.
* An example DER sequence is:\n * An example DER sequence is:\n
* - 0x02 -- tag indicating INTEGER * - 0x02 -- tag indicating INTEGER
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
* \file asn1write.h * \file asn1write.h
* *
* \brief ASN.1 buffer writing functionality * \brief ASN.1 buffer writing functionality
* */
/*
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
* \file base64.h * \file base64.h
* *
* \brief RFC 1521 base64 encoding/decoding * \brief RFC 1521 base64 encoding/decoding
* */
/*
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *
......
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