Commit Graph

20871 Commits (549d24f2132f575514abc51bba94a050a738d614)

Author SHA1 Message Date
Vincent Coubard 93b6ecfa7e BLE: initialize properly deprecated and non deprecated flags. 2018-11-26 15:23:24 +00:00
deepikabhavnani b6e381b701 MBED_NO_GLOBAL_USING_DIRECTIVE is added to remove auto-addition of namespace
Macro guard `MBED_NO_GLOBAL_USING_DIRECTIVE` is added around namespace, to avoid
polluting users namespace.
2018-11-26 09:23:16 -06:00
Vincent Coubard 3aa91ecbba BLE: return phy_set_t in ConnectionParameters::getPhySet 2018-11-26 15:22:50 +00:00
Vincent Coubard a915748cbe BLE: Fallback to legacy connect when required. 2018-11-26 14:13:07 +00:00
Vincent Coubard 190b9bc125 BLE: Fix address type in ::ble::Gap::connect 2018-11-26 14:13:07 +00:00
Ron Eldor 5e0223f78f Add the platform generic errors
Replace the module specific errors with the `MBEDTLS_ERR_PLATFORM_XXX`
errors.
2018-11-26 15:33:17 +02:00
Ron Eldor 5ed3a64527 Return MBEDTLS_ERR_CCM_BAD_INPUT on invalid key
Return `MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE` only for valid key lengths,
that are not supported by Cryptocell 310. For other key sizes, return
`MBEDTLS_ERR_CCM_BAD_INPUT`
2018-11-26 15:33:16 +02:00
Ron Eldor 1b34927e83 Style fixes
1. Change camelcase variables to Mbed OS style.
2. Remove functions declarations from the `_alt` header, since they
are now added from the module header regardless whether an alternative
implementation exists.
3. Remove the `extern "c"` declaration from the `_alt` headers.
4. Remove whitespaces before opening parenthesis.
5. Fix alignment of function parameters.
6. Fix indentations.
7. Limit lines to 80 characters.
2018-11-26 15:32:46 +02:00
Ron Eldor d487c80d76 Additional fix for ccm_alt from On Target Testings
An additional fix for ccm_alt, when the message length is too big.
Check for specific error returned from CC310, and return
`MBEDTLS_ERR_CCM_BAD_INPUT`.
2018-11-26 15:02:19 +02:00
Ron Eldor 53c02d7457 Zeroize output buffer, upon authentication faliure.
Clear output buffer upon failure.
2018-11-26 15:01:02 +02:00
Ron Eldor 1aaff0e389 Return `MBEDTLS_ERR_CCM_AUTH_FAILED` where needed.
On authentication decryption, when the driver returns the relevant error,
return `MBEDTLS_ERR_CCM_AUTH_FAILED`.
2018-11-26 15:01:01 +02:00
Ron Eldor 4e7e0548d5 Fix memory overflow
Fix memory overflow, by adding a local buffer of type
`CRYS_AESCCM_Mac_Res_t `for the tag result, and copy to the input
parameter `tag`.
2018-11-26 14:59:59 +02:00
Ron Eldor 93e0f6493d Use mbedtls_platform_zeroize
Rplace calls to `mbedtls_zeroize()` to `mbedtls_platform_zeroize()`.
2018-11-26 14:57:43 +02:00
Ron Eldor 8cc8481a71 Add unsupported functions for CCM*.
Implement the CCM* functions, by returning `MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE`
2018-11-26 14:57:43 +02:00
paul-szczepanek-arm c9e8501b22 make PHY case consistent 2018-11-26 12:30:57 +00:00
Vincent Coubard d3d93e1ef9 BLE: Improve ble::Gap documentation. 2018-11-26 11:51:00 +00:00
paul-szczepanek-arm bee115c39e replace magic numbers 2018-11-26 11:31:03 +00:00
paul-szczepanek-arm f3a64feaf1 replace magic numbers 2018-11-26 11:26:26 +00:00
paul-szczepanek-arm a03aaa2342 simplify and explain swapping 2018-11-26 11:26:13 +00:00
paul-szczepanek-arm e0e186c831 replace consts with a private enum 2018-11-26 11:21:37 +00:00
paul-szczepanek-arm 528deb168f fix wrong variable being swapped 2018-11-26 11:16:23 +00:00
paul-szczepanek-arm 208b1bd3e9 fix size calculation for UUID data payload 2018-11-26 11:10:39 +00:00
Martin Kojtal fdca1e3578
Merge pull request #8730 from kfnta/its_kvstore_single_core
Add a new PSA Internal Trusted Storage APIs
2018-11-26 11:54:08 +01:00
Vincent Coubard 8cbc53617f BLE: Add a simple builder for AdvertisingData. 2018-11-26 10:24:35 +00:00
Vincent Coubard d4a66ae034 BLE: Add an AdvertisingDataParser 2018-11-26 10:24:35 +00:00
Vincent Coubard 09ba26ce4b BLE: Move advertising data types in their own file. 2018-11-26 10:24:35 +00:00
Vincent Coubard be7cc41da4 BLE: doxygen fixes. 2018-11-26 10:24:35 +00:00
Vincent Coubard 0407ee8c81 BLE: move privacy configuration type in ble namespace. 2018-11-26 10:24:35 +00:00
Vincent Coubard dff8f25d49 BLE: Improve Duration documentation. 2018-11-26 10:24:35 +00:00
Vincent Coubard 78d4a9b6c8 BLE: Cleanup enum duplicates in gap/Types.h 2018-11-26 10:24:35 +00:00
Vincent Coubard 884d870b68 BLE: Improve gap/Types.h documentation. 2018-11-26 10:24:35 +00:00
Vincent Coubard 9621b26cab BLE: Reorganize ble::gap documentation group. 2018-11-26 10:24:35 +00:00
Vincent Coubard 27011fd954 BLE: Document ble::ScanParameters. 2018-11-26 10:24:35 +00:00
Vincent Coubard 11b1e91592 BLE: Rework ScanParameters construction. 2018-11-26 10:24:35 +00:00
Vincent Coubard 3119f9488c BLE: Construct a phy_set_t from a phy_t. 2018-11-26 10:24:35 +00:00
Vincent Coubard e130bec6a0 BLE: rework ScanParameters::phy_configuration_t 2018-11-26 10:24:35 +00:00
Vincent Coubard 4db8ddfb90 BLE: fix name of functions in ble::ScanParameters. 2018-11-26 10:24:35 +00:00
Vincent Coubard 936f1c550a BLE: Update ble::Gap documentation. 2018-11-26 10:24:35 +00:00
Vincent Coubard 6b8b1d0b7a BLE: remove minimize fragmentation parameter in Gap. 2018-11-26 10:24:35 +00:00
Vincent Coubard 4058f0908a BLE: Extract computation of minimumSupervisionTimeout. 2018-11-26 10:24:35 +00:00
Vincent Coubard 6cb7645846 BLE: Improve NULL check in ble::AdvertisingDataBuilder implementation. 2018-11-26 10:24:35 +00:00
Vincent Coubard 643fad0162 BLE: Improve code by explaining or textually defining constants 2018-11-26 10:24:35 +00:00
Vincent Coubard 6c09b6c465 BLE: Expose representation type in ble::Duration. 2018-11-26 10:24:35 +00:00
Vincent Coubard ce2460a92a BLE: expose representation type and pointer to the inner storage in SafeEnum. 2018-11-26 10:24:35 +00:00
Vincent Coubard eda3bfb0e3 BLE: Explain magic constant in ble::Gap implementation. 2018-11-26 10:24:35 +00:00
Vincent Coubard 30c6432b5d BLE: Address code formating issue in CordioPalGap implementation. 2018-11-26 10:24:35 +00:00
Vincent Coubard 76416b2f47 BLE: Improve implementation readability of ble::advertising_event_t 2018-11-26 10:24:35 +00:00
Vincent Coubard 27dd08431e BLE: remove ble::pal::extended_advertising_report_event_type_t as it is not used. 2018-11-26 10:24:35 +00:00
Vincent Coubard d32354a7a6 BLE: Fix compiler warning about unused variable. 2018-11-26 10:24:35 +00:00
Vincent Coubard 2a08549b8d BLE: rename ble::Forever into ble::Value. 2018-11-26 10:24:35 +00:00