mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-24 19:42:27 +03:00
Fix handshake status not being set if increase_bm_data_size fails
Also set warning level to -Wall https://github.com/esp8266/Arduino/issues/1708
This commit is contained in:
2
Makefile
2
Makefile
@ -40,7 +40,7 @@ LDFLAGS += -L$(XTENSA_LIBS)/lib \
|
||||
|
||||
CFLAGS+=-std=c99 -DESP8266
|
||||
|
||||
CFLAGS += -Os -g -O2 -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mno-text-section-literals -D__ets__ -DICACHE_FLASH
|
||||
CFLAGS += -Wall -Os -g -O2 -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mno-text-section-literals -D__ets__ -DICACHE_FLASH
|
||||
BIN_DIR := bin
|
||||
AXTLS_AR := $(BIN_DIR)/libaxtls.a
|
||||
|
||||
|
@ -1415,16 +1415,16 @@ int increase_bm_data_size(SSL *ssl)
|
||||
ssl->max_plain_length == RT_MAX_PLAIN_LENGTH) {
|
||||
return SSL_OK;
|
||||
}
|
||||
ssl->can_increase_data_size = false;
|
||||
certificate_free(ssl);
|
||||
free(ssl->bm_all_data);
|
||||
ssl->bm_data = 0;
|
||||
ssl->bm_all_data = malloc(RT_MAX_PLAIN_LENGTH + RT_EXTRA);
|
||||
if (!ssl->bm_all_data) {
|
||||
printf("failed to grow plain buffer\r\n");
|
||||
ssl->hs_status == SSL_ERROR_DEAD;
|
||||
ssl->hs_status = SSL_ERROR_DEAD;
|
||||
return SSL_ERROR_CONN_LOST;
|
||||
}
|
||||
ssl->can_increase_data_size = false;
|
||||
ssl->max_plain_length = RT_MAX_PLAIN_LENGTH;
|
||||
ssl->bm_data = ssl->bm_all_data + BM_RECORD_OFFSET;
|
||||
return SSL_OK;
|
||||
|
Reference in New Issue
Block a user