Skip to content

Commit b6e5a0a

Browse files
authored
Merge pull request #11524 from ARMmbed/release-candidate
Release candidate 3 for Mbed OS 5.14
2 parents f60e9a8 + 23e61c0 commit b6e5a0a

File tree

67 files changed

+2880
-2070
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+2880
-2070
lines changed

features/cellular/framework/device/CellularStateMachine.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,12 @@ bool CellularStateMachine::open_sim()
165165
bool sim_ready = state == CellularDevice::SimStateReady;
166166

167167
if (sim_ready) {
168+
#ifdef MBED_CONF_CELLULAR_CLEAR_ON_CONNECT
169+
if (_cellularDevice.clear() != NSAPI_ERROR_OK) {
170+
tr_warning("CellularDevice clear failed");
171+
return false;
172+
}
173+
#endif
168174
_cb_data.error = _network.set_registration(_plmn);
169175
tr_debug("STM: set_registration: %d, plmn: %s", _cb_data.error, _plmn ? _plmn : "NULL");
170176
if (_cb_data.error) {
@@ -395,7 +401,6 @@ void CellularStateMachine::state_sim_pin()
395401
retry_state_or_fail();
396402
return;
397403
}
398-
399404
if (_network.is_active_context()) { // check if context was already activated
400405
tr_debug("Active context found.");
401406
_status |= ACTIVE_PDP_CONTEXT;

features/cellular/framework/targets/UBLOX/AT/UBLOX_AT.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ nsapi_error_t UBLOX_AT::init()
117117
}
118118
#endif
119119

120-
return err;
120+
return _at->unlock_return_error();
121121
}
122122

123123
nsapi_error_t UBLOX_AT::config_authentication_parameters()

features/frameworks/mbed-coap/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Change Log
22

3+
## [v5.1.1](https://github.com/ARMmbed/mbed-coap/releases/tag/v5.1.1)
4+
5+
- Delay the random initialization of message id to a later phase and not during init() so there is enough time
6+
for system to complete the rest of the initialization.
7+
8+
-[Full Changelog](https://github.com/ARMmbed/mbed-coap/compare/v5.1.0...v5.1.1)
9+
10+
311
## [v5.1.0](https://github.com/ARMmbed/mbed-coap/releases/tag/v5.1.0)
412

513
- Introduce SN_COAP_REDUCE_BLOCKWISE_HEAP_FOOTPRINT configuration flag.

features/frameworks/mbed-coap/source/sn_coap_protocol.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,7 @@ struct coap_s *sn_coap_protocol_init(void *(*used_malloc_func_ptr)(uint16_t), vo
179179

180180
#endif /* ENABLE_RESENDINGS */
181181

182-
/* Randomize global message ID */
183-
randLIB_seed_random();
184-
message_id = randLIB_get_16bit();
185-
if (message_id == 0) {
186-
message_id = 1;
187-
}
188-
182+
message_id = 0;
189183
return handle;
190184
}
191185

@@ -2523,6 +2517,11 @@ static bool compare_address_and_port(const sn_nsdl_addr_s* left, const sn_nsdl_a
25232517

25242518
static uint16_t get_new_message_id(void)
25252519
{
2520+
if (message_id == 0) {
2521+
/* Randomize global message ID */
2522+
randLIB_seed_random();
2523+
message_id = randLIB_get_16bit();
2524+
}
25262525
message_id++;
25272526
if (message_id == 0) {
25282527
message_id = 1;

features/mbedtls/VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
mbedtls-2.19.0
1+
mbedtls-2.19.1

features/mbedtls/importer/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#
2828

2929
# Set the mbed TLS release to import (this can/should be edited before import)
30-
MBED_TLS_RELEASE ?= mbedtls-2.19.0
30+
MBED_TLS_RELEASE ?= mbedtls-2.19.1
3131
MBED_TLS_REPO_URL ?= [email protected]:ARMmbed/mbedtls-restricted.git
3232

3333
# Translate between mbed TLS namespace and mbed namespace

features/mbedtls/inc/mbedtls/check_config.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,14 @@
305305
#error "MBEDTLS_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
306306
#endif
307307

308+
#if defined(MBEDTLS_MEMORY_BACKTRACE) && !defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C)
309+
#error "MBEDTLS_MEMORY_BACKTRACE defined, but not all prerequesites"
310+
#endif
311+
312+
#if defined(MBEDTLS_MEMORY_DEBUG) && !defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C)
313+
#error "MBEDTLS_MEMORY_DEBUG defined, but not all prerequesites"
314+
#endif
315+
308316
#if defined(MBEDTLS_PADLOCK_C) && !defined(MBEDTLS_HAVE_ASM)
309317
#error "MBEDTLS_PADLOCK_C defined, but not all prerequisites"
310318
#endif

features/mbedtls/inc/mbedtls/ssl.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,8 @@ struct mbedtls_ssl_config
970970
* tls_prf and random bytes. Should replace f_export_keys */
971971
int (*f_export_keys_ext)( void *, const unsigned char *,
972972
const unsigned char *, size_t, size_t, size_t,
973-
unsigned char[32], unsigned char[32], mbedtls_tls_prf_types );
973+
const unsigned char[32], const unsigned char[32],
974+
mbedtls_tls_prf_types );
974975
void *p_export_keys; /*!< context for key export callback */
975976
#endif
976977

@@ -1925,8 +1926,8 @@ typedef int mbedtls_ssl_export_keys_ext_t( void *p_expkey,
19251926
size_t maclen,
19261927
size_t keylen,
19271928
size_t ivlen,
1928-
unsigned char client_random[32],
1929-
unsigned char server_random[32],
1929+
const unsigned char client_random[32],
1930+
const unsigned char server_random[32],
19301931
mbedtls_tls_prf_types tls_prf_type );
19311932
#endif /* MBEDTLS_SSL_EXPORT_KEYS */
19321933

features/mbedtls/src/ssl_tls.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1427,9 +1427,8 @@ static int ssl_populate_transform( mbedtls_ssl_transform *transform,
14271427
master, keyblk,
14281428
mac_key_len, keylen,
14291429
iv_copy_len,
1430-
/* work around bug in exporter type */
1431-
(unsigned char *) randbytes + 32,
1432-
(unsigned char *) randbytes,
1430+
randbytes + 32,
1431+
randbytes,
14331432
tls_prf_get_type( tls_prf ) );
14341433
}
14351434
#endif

features/nanostack/sal-stack-nanostack/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ override CFLAGS += -I$(EVENTLOOP_DIR)/nanostack-event-loop
3737
override CFLAGS += -I$(NSDL_DIR)/nsdl-c
3838
override CFLAGS += -I$(COAP_DIR)
3939
override CFLAGS += -I$(COAP_SERVICE_LIB)/coap-service
40-
override CFLAGS += -I$(MBEDTLS_DIR)/include
40+
override CFLAGS += -I$(MBEDTLS_DIR)/include -I$(MBEDTLS_DIR)/crypto/include
4141
override CFLAGS += $(addprefix -I,$(INCLUDE_DIRS))
4242
override CFLAGS += $(addprefix -D,$(FLAGS))
4343

@@ -153,7 +153,7 @@ mbed-release-build-$(1): $(1)-$(2)-$(3)-build
153153
.PHONY: $(1)-$(2)-build
154154
$(1)-$(2)-$(3)-build: export-headers
155155
@echo Build $(2) on $(1) for $(3)
156-
make CC=$(CC_$(1)) CONFIG=$(2) CPU=$(3) APPEND_LIB_NAME=1 CFLAGS="-DNS_USE_EXTERNAL_MBED_TLS -I../mbedtls/include/"
156+
make CC=$(CC_$(1)) CONFIG=$(2) CPU=$(3) APPEND_LIB_NAME=1 CFLAGS="-DNS_USE_EXTERNAL_MBED_TLS -I../mbedtls/include/ -I../crypto/include/"
157157

158158
# Generate target directory name
159159
# Like: FEATURE_NANOSTACK/FEATURE_LOWPAN_ROUTER/TOOLCHAIN_ARM/TARGET_CORTEX_M0P

0 commit comments

Comments
 (0)