Commit Graph

25558 Commits (eda75fd02a27d0d26bbed4953abb19ed778a5a8c)

Author SHA1 Message Date
Jaeden Amero bf676c1264 psa: Avoid re-definition of MBEDTLS_PSA_CRYPTO_C
Mbed TLS now enables PSA APIs by default on all targets. It's not
necessary to explicitly enable MBEDTLS_PSA_CRYPTO_C, as that can be
gotten from the Mbed TLS config.h.

However, many PSA targets depend on `-DMBEDTLS_PSA_CRYPTO_C` being
defined by the Mbed OS json configuration system and are not yet
properly including the Mbed TLS configuration; for these PSA targets,
warnings may remain until this issue is fixed.

Avoiding re-definition will eliminate warnings like the following, when
building mbed-os-example-blinky:

    Compile [ 14.5%]: pal_client_api_empty_intf.c
    [Warning] pal_client_api_intf.h@35,0: "PSA_SUCCESS" redefined
    Compile [ 14.6%]: pal_client_api_intf.c
    Compile [ 14.7%]: DeviceKey.cpp
    Compile [ 14.9%]: pal_internal_trusted_storage_intf.c
    [Warning] pal_internal_trusted_storage_intf.c@45,9: 'psa_its_set' is deprecated: PS specific types should not be used [-Wdeprecated-declarations]
    Compile [ 15.3%]: val_attestation.c
    [Warning] client.h@40,0: "PSA_VERSION_NONE" redefined
    <..>
    Compile [ 33.3%]: asn1parse.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 33.5%]: aes.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 33.6%]: asn1write.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 33.7%]: psa_crypto.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 33.8%]: blowfish.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 33.9%]: camellia.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 34.0%]: base64.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 34.2%]: ccm.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 34.3%]: chacha20.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 34.4%]: chachapoly.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 34.5%]: cipher_wrap.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 34.6%]: cmac.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 34.7%]: cipher.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 34.9%]: bignum.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 35.0%]: des.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 35.1%]: dhm.c
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 35.2%]: ctr_drbg.c
    <..>
    Compile [ 70.9%]: EthernetInterface.cpp
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 71.0%]: InternetSocket.cpp
    Compile [ 71.1%]: L3IPInterface.cpp
    [Warning] config.h@2838,0: "MBEDTLS_PSA_CRYPTO_C" redefined
    Compile [ 71.2%]: NetworkInterface.cpp
2019-06-12 16:21:13 +01:00
Jaeden Amero 23d66c1c25 mbedtls: PSA entropy is compatible with other entropy
When using Mbed Crypto's PSA Entropy Injection feature on Mbed OS, it is
not required to opt out of having entropy sources added to your entropy
contexts by default (via MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES).

As integrated in Mbed OS, MBEDTLS_PSA_INJECT_ENTROPY is compatible with
actual entropy sources. PSA entropy injection is implemented using the
standard Mbed TLS NV Seed feature, and is as compatible with other
entropy sources as the standard Mbed TLS NV Seed feature which does
support entropy mixing.
2019-06-12 16:15:57 +01:00
Jaeden Amero c0b4343f26 mbedtls: Update to Mbed TLS 2.18.0-rc3 2019-06-12 16:15:57 +01:00
Jaeden Amero 0689c589fc mbedtls: Update to Mbed Crypto 1.1.0d2 2019-06-12 16:15:57 +01:00
desmond.chen 0ebc05385f Fix nrf52 enabled uart count and enable uart0/1 2019-06-12 16:15:57 +01:00
Kevin Bracey 1b124e03ca ns_list: avoid UINT_FAST8_MAX
Prevent compilation issues when someone has included <stdint.h> before
a header file that needs to include <ns_list.h>.

Some toolchains like ARM C 5 will not provide UINT_FAST8_MAX in C++
unless __STDC_LIMIT_MACROS is defined, and if this was not defined the
first time <stdint.h> was included, it's too late.

We can get the maximum value for our unsigned list offset by casting -1
to it, thanks to modulo arithmetic.
2019-06-12 16:15:57 +01:00
Kevin Bracey 3a2bd249c6 Fix ARMC5 compilation
Minor tweaks to fix ARM C 5 compatibility.

Pushing "ns_list.h" include to first makes sure "ns_types.h" is included
first, meaning it gets to define `__STDC_LIMIT_MACROS` before the first
include of <stdint.h>, which ensures that UINT8_MAX etc are defined.
2019-06-12 16:15:57 +01:00
paul-szczepanek-arm 3b66065a10 exculde test 2019-06-12 16:15:57 +01:00
Lingkai Dong 0607340748 NORDIC_CORDIC pal_crypto: check if cryptocell310 is enabled
The config "cryptocell310-acceleration" is set by MCU_NRF52840
but individual targets may have crytocell310 feature disabled.
2019-06-12 16:15:57 +01:00
Lingkai Dong ad91527023 critical_section tests: do not check APP interrupts on NRF52
APP interrupts are masked on SoftDevice BLE stack only, but we
have switched to Cordio stack on NRF52 targets.
2019-06-12 16:15:57 +01:00
Lingkai Dong 29446548f5 Default to Cordio BLE stack for NRF52* targets
The BLE stack from SoftDevice is not actively maintained and
has issues when used with Nordic SDK v15.
2019-06-12 16:15:57 +01:00
adbridge 14ed96e72c Re-enable complilation for wifi and nanostack examples 2019-06-12 16:15:57 +01:00
Jaeden Amero 465944b396 mbed-crypto: Update to Mbed Crypto 1.1.0d1 2019-06-12 16:15:57 +01:00
Martin Kojtal cd8e315ba5
Merge pull request #10763 from ARMmbed/release-candidate
Release candidate for mbed-os-5.13.0-rc2
2019-06-05 21:01:28 +01:00
Vincent Coubard 452c60bea7 Cordio: Fix default COC parameters.
The stack doesn't cope with zero COC client or channel on IAR.
2019-06-05 13:08:10 +01:00
Vincent Coubard 2e8d123d2d BLE - tune Cordio LL default parameters to reduce the memory required. 2019-06-05 13:08:10 +01:00
Vincent Coubard 79c0d3af80 BLE - Fix Cordio LL extended advertising size. 2019-06-05 13:08:10 +01:00
Vincent Coubard 8cd222c5db BLE - Set rx ACL buffer size to the minimum viable in cordio conf. 2019-06-05 13:08:10 +01:00
Vincent Coubard f0ad9b32c1 Disable l2cap connection oriented channels in Cordio default conf. 2019-06-05 13:08:10 +01:00
Kevin Bracey 8fe4c20c35 ARMC6: Suppress "register deprecated" warning
Lots of target code, STM in particular, uses the `register` keyword, so
it'll take a little while to clean up. In the interim, some builds are
producing a lot of warnings. Suppress the warning for now, as `register`
remains legal C++14 and C11, despite C++14 deprecating it.

C++17 removes `register`, so code will need to be cleaned before any
further C++ version update.
2019-06-05 13:08:10 +01:00
Hennadiy Kytsun 6084069ec2 Cypress: Fix issue #10613 2019-06-05 13:08:10 +01:00
Jaeden Amero fa80293193 mbed-crypto: Automatically enable entropy injection
Automatically enable entropy injection when the NV Seed feature is
requested on PSA targets. Add a warning note describing the state of the
current implementation of the entropy injection API.

Fixes #10720
2019-06-05 13:08:10 +01:00
Alexander Zilberkant 3851a80485 Update requirement for manifest-tool
Set to version 1.5.2
2019-06-05 13:08:10 +01:00
adbridge b597221a2c "Update secure binaries for ARM_MUSCA_A1_S (ARMC6)" 2019-05-29 20:56:07 +01:00
adbridge 9098ea170e "Update secure binaries for LPC55S69_S (ARMC6)" 2019-05-29 20:48:28 +01:00
adbridge 39f09971d0 "Update secure binaries for CY8CKIT_062_WIFI_BT_M0_PSA (GCC_ARM)" 2019-05-29 20:40:05 +01:00
adbridge b5cb1bb69f Update Mbed version block 2019-05-29 20:12:24 +01:00
Martin Kojtal 9cc1caa031
Merge pull request #10596 from kjbracey-arm/sem_acquire
Introduce Semaphore::acquire methods
2019-05-29 06:22:30 +01:00
Martin Kojtal cc491812a8
Merge pull request #10427 from kjbracey-arm/new_standards
Set compilers to C++14 and C11
2019-05-28 20:34:00 +01:00
Martin Kojtal 8fc2a3c92a
Merge pull request #10675 from 0xc0170/update-mbedtls-2.18.0-rc1
Update mbedtls 2.18.0 rc1
2019-05-28 20:24:18 +01:00
Kevin Bracey 2fbbd9d2ca Introduce Semaphore::acquire methods
Deprecate wait() in favour of acquire(), try_acquire(),
try_acquire_for() and try_acquire_until().

Brings Semaphore more into line with CMSIS-RTOS 2 (which uses "acquire"),
itself (as it has "release"), and other classes having "try", "try for"
and "try until".

Also steps away from vague "wait" term - the primary operation here is
to acquire the semaphore, and this will of course sleep.
2019-05-28 17:02:06 +03:00
k-stachowiak 948d4379d8 Update Mbed TLS feature to 2.18.0-rc2 2019-05-28 11:00:16 +01:00
Martin Kojtal 19e762298f
Merge pull request #10666 from ARMmbed/feature-nrf52-sdk15
Nordic SDK v15 Update
2019-05-28 09:48:44 +01:00
Martin Kojtal 303d0f0c0c SPE: fix inject entropy macro
Use new TLS macro
2019-05-27 11:50:09 +01:00
Martin Kojtal eebc1b9e40 Revert "Check mbed-crypto-example with fork"
This reverts commit ff18a64e00.
Use the official repository
2019-05-27 08:02:55 +01:00
paul-szczepanek-arm 9bf2d0ae55 cryptocell acceleration as an option 2019-05-27 06:16:49 +01:00
paul-szczepanek-arm 4d236665a2 ifdef 52840 crypto 2019-05-27 06:16:49 +01:00
paul-szczepanek-arm 41e02279d3 config fixed for LL hci 2019-05-27 06:16:49 +01:00
paul-szczepanek-arm c050faf268 fix typo 2019-05-27 06:16:49 +01:00
paul-szczepanek-arm 16bb7e5f04 fix merge conflixt 2019-05-27 06:16:49 +01:00
paul-szczepanek-arm c9f8ca46ff config now applies to MCU_840 instead of only DK 2019-05-27 06:16:49 +01:00
paul-szczepanek-arm ac66a0040c moved config to target nordic 2019-05-27 06:16:49 +01:00
paul-szczepanek-arm 0d1ca866ea license updated 2019-05-27 06:16:49 +01:00
paul-szczepanek-arm 6b705c881f remove usage of gpio and leds from nordic cordio LL as it interferes with normal function 2019-05-27 06:16:49 +01:00
paul-szczepanek-arm e43aa12a5d removed stray comma 2019-05-27 06:16:49 +01:00
paul-szczepanek-arm 1bbadde9c0 configs in mbed json 2019-05-27 06:16:49 +01:00
paul-szczepanek-arm a6f639ba27 zero copy HCI as a config option 2019-05-27 06:16:49 +01:00
paul-szczepanek-arm 87f5e1f057 review comments addressed 2019-05-27 06:16:49 +01:00
paul-szczepanek-arm 7894a9321d fix releaseing the WSF msg too early 2019-05-27 06:16:49 +01:00
paul-szczepanek-arm 88d000e18e update LL runtime config to new version 2019-05-27 06:16:49 +01:00