Commit Graph

173 Commits (c8c68381d6a39dc65c76fc88a65cf1526ec257a1)

Author SHA1 Message Date
Russ Butler c8c68381d6 Fix ESP8266 recv_udp timeout with flow control
UDP packets are always received as OOB data. Without checking for
new OOB data with a call to "_process_oob" then recv_udp never blocks.
If a UDP packet is not available then NSAPI_ERROR_WOULD_BLOCK is
returned. This causes mbed-os's DNS handling to always fail when
flow control is enabled.

This patch fixes recv_udp by always calling "_process_oob" regardless
of if flow control is enabled. This ensures that recv_udp follows the
timeout parameter and waits for new data to arrive.
2018-12-27 22:25:55 -06:00
Michal Paszta 1931c2cd27 Fix compilation warnings (apart from nanostack) 2018-12-27 22:25:55 -06:00
Mikhail Maltsev d0bef03aed Fix C++11 build with Arm Compiler 6
Currently there are two issues which prevent building Mbed OS with
-std=gnu++11 when using Arm Compiler 6:
* NanostackRfPhys2lp.cpp contains a narrowing conversion in a braced
  initializer list
* ns_types.h includes <stdalign.h> which Arm Compiler 6 currently
  does not provide

This patch fixes both issues. The first one is fixed by changing the
underlying type of the corresponding enumeration when the code is
compiled as C++11. The second issue is worked around by avoiding the
use of <stdalign.h> header for Arm Compiler versions prior to 6.12.
2018-12-27 22:25:55 -06:00
Michal Paszta 56363775f2 ESP8266 send returns WOULD_BLOCK error when busy 2018-12-11 16:14:50 -06:00
Veijo Pesonen c22ac0c279 Fixes namespace collision 2018-12-11 16:14:50 -06:00
Veijo Pesonen 7210b97c59 powers down the modem on disconnect 2018-12-11 16:14:50 -06:00
Veijo Pesonen 5799daef72 Fixes connect, and network-status logic 2018-12-11 16:14:50 -06:00
Veijo Pesonen fc548ec367 Fixes AT command timeout values from reset&connect 2018-12-11 16:14:50 -06:00
Veijo Pesonen c10d276928 Adds support for controlling HW reset of the modem from the driver
While connecting will run HW reset for the modem if reset wire is attached to a know pin.
2018-12-11 16:14:50 -06:00
Deepika ce08039c30 Add Serial + EventQueue dependency to ESP8266 2018-12-11 16:14:50 -06:00
Deepika 771b69e405 Components if using RTOS modules should be enabled only when RTOS is present
Build failures were observed when rtos is ignored with .mbedignored.
Components dependent on RTOS should be guarded with MBED_CONF_RTOS_PRESENT
2018-12-11 16:14:50 -06:00
Deepika 0b38cb85f8 Fix header files used in esp8266
"ns_types.h" results in build failure when networking feature is ignored with
.mbedignored. ESP8266 component should be enabled only when NSAPI is present.
2018-12-11 16:14:50 -06:00
Deepika ea96ee9534 Fix header files used in 802.15.4_RF
"ns_types.h" is not used, but included. Results in build failure when networking
feature is ignored with .mbedignored

"mbed_trace.h" not used.
2018-12-11 16:14:49 -06:00
Oren Cohen 74f5322a1d Fix includes 2018-12-11 16:14:45 -06:00
Oren Cohen fee5e42f95 Fix PSA crypto partiotion and tests
* Styling
* Correct error codes on failing connection
* Add panics where needed
* correct skip defines
* Fix psa_spm_init_refence_counter bug
2018-12-11 16:14:45 -06:00
Veijo Pesonen 891d756a1a Reports NSAPI_STATUS_CONNECTING when trying to reconnect 2018-12-11 16:14:45 -06:00
Michal Paszta a10e299bd9 ESP8266 disconnect returns ERROR_NO_CONNECTION 2018-12-11 16:14:45 -06:00
Veijo Pesonen 1108d8d96c Truncates TCP stream and NACKs UDP datagram when sending too much data
ESP8266 maximum packet size when sending is 2048 bytes.
2018-12-11 16:14:45 -06:00
Veijo Pesonen 54136e72dc Fixes return value check when calling ATCmdParser::read() 2018-12-11 16:14:45 -06:00
Veijo Pesonen ca7fef2da0 Dropping duplicate "using namespace mbed;" 2018-12-11 16:14:45 -06:00
Veijo Pesonen 7d878f4d88 Truncates data to be send to modem to 2048 bytes 2018-12-11 16:14:45 -06:00
Veijo Pesonen 63c219a1c3 Drops std:: because string.h is included 2018-12-11 16:14:45 -06:00
Oren Cohen 3b4750ba3e Run SPM code generator 2018-12-11 16:14:44 -06:00
Oren Cohen 094fedfec9 Add SPM code generation test to Travis-CI 2018-12-11 16:14:44 -06:00
Alexander Zilberkant 9256d6f0d9 Better PID handling
PSA PID is of int32_t type - use native type during the whole flow for better readability.
Convert PID to unsigned for calculations only.
Add dedicated inline function for logic shift right.
2018-12-05 11:09:50 +00:00
Alexander Zilberkant ef353c0ae5 Replace PID and UID order in file name
PID should come first to create - to prevent timing attacks. Each partition can only request its own files. Thus starting lookup from the PID makes more sence.
2018-12-05 11:09:50 +00:00
Alexander Zilberkant 0c5fb613bc Optimize error handling 2018-12-05 11:09:50 +00:00
Alexander Zilberkant 41adc4ed69 Fix PSA internal storage misconfiguration
Use internal TDBStore instance instead of default one
2018-12-05 11:09:50 +00:00
Martin Kojtal 16a73d1dd9 spm spe: remove space 2018-12-05 11:09:50 +00:00
Mel W b675f5dc70 Grammatical and capitalization changes 2018-12-05 11:09:50 +00:00
Oren Cohen 2b9c41d5bb More fixes by Melinda 2018-12-05 11:09:50 +00:00
Oren Cohen c660d362a7 Melinda's remarks 2018-12-05 11:09:50 +00:00
Oren Cohen 0ba9623e56 Fix PSA-SPM Documentation 2018-12-05 11:09:50 +00:00
Jaeden Amero a107404cb2 psa: storage: Fix PSA_PS_ERROR_OFFSET typo
Correct typo of PSA_PS_ERROR_OFFSET to PSA_ITS_ERROR_OFFSET.
2018-12-05 11:09:50 +00:00
Martin Kojtal e62abd8aee
Merge pull request #8804 from mohammad1603/inject_entropy_spm
PSA Crypto SPM
2018-11-28 09:40:31 +01:00
Martin Kojtal e69aa15aea
Merge pull request #8744 from kfnta/psa_spm_base
PSA Secure partition manager and services
2018-11-27 15:26:38 +01:00
mohammad1603 6e862cf112 Fix psa_crypto_generator_init implementation to use the init define macro 2018-11-27 11:56:59 +02:00
mohammad1603 88f4f48fac Astyle fixes for the source
Used running: astyle -n --options=.astylerc
2018-11-27 11:56:57 +02:00
Mohammad AboMokh 5c2cf07780 Revert file permission change 2018-11-27 11:56:56 +02:00
Mohammad AboMokh 1d4b6a4e89 Return invalid argument error in case of zero or negative handle for generators 2018-11-27 11:56:55 +02:00
Mohammad AboMokh 79d957ac7b Change PSA_MAX_NONCE_SIZE to PSA_AEAD_MAX_NONCE_SIZE 2018-11-27 11:56:54 +02:00
Mohammad AboMokh ba47b450aa Remove unnecessary define 2018-11-27 11:56:54 +02:00
Mohammad AboMokh 7776fea903 Remove unneeded includes 2018-11-27 11:56:53 +02:00
Netanel Gonen 352bac3b26 Crypto SPM - fix - PART1
Fail fast on invalid handles before calling to SPM
2018-11-27 11:56:52 +02:00
Netanel Gonen bab6116f31 compilation fix 2018-11-27 11:56:51 +02:00
Mohammad AboMokh a4c498e02a Integrate psa_key_agreement() with SPM code 2018-11-27 11:56:50 +02:00
Netanel Gonen 59c3c9fff7 crypto init with multiple client guard & tests 2018-11-27 11:56:48 +02:00
Netanel Gonen 7f49fd2b09 Fix memory leak if user does not calls abort. call abort when connection is closed 2018-11-27 11:56:46 +02:00
Netanel Gonen 58f92c3266 remove execute permissions from file 2018-11-27 11:56:45 +02:00
Mohammad AboMokh 54cd8bf51f Change behavior realted to MBEDTLS_ENTROPY_NV_SEED and MBEDTLS_PSA_HAS_ITS_IO flags
* mbedtls_psa_inject_entropy() MUST be always available for client side.
* Partition will return PSA_ERROR_NOT_SUPPPORTED in case where MBEDTLS_ENTROPY_NV_SEED or MBEDTLS_PSA_HAS_ITS_IO flags are not defined
2018-11-27 11:56:40 +02:00