Commit Graph

20871 Commits (549d24f2132f575514abc51bba94a050a738d614)

Author SHA1 Message Date
Oren Cohen 549d24f213 More fixes by Melinda 2018-11-28 14:52:40 +02:00
Oren Cohen 11567cdf30 set proper groups for spm and HAL 2018-11-28 12:17:37 +02:00
Oren Cohen 6ec5144e0c Melinda's remarks 2018-11-28 12:17:37 +02:00
Oren Cohen 3629e002ee Fix PSA-SPM Documentation 2018-11-28 12:17:36 +02:00
Martin Kojtal 52822cb8af
Merge pull request #8871 from c1728p9/mpu
MPU API (Reopened)
2018-11-28 10:28:32 +01: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 4758ddd2c6
Merge pull request #8738 from pan-/ble-extended-advertising
Ble extended advertising
2018-11-28 09:39:13 +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
Netanel Gonen 5f36447eb6 do not run crypto init SPM test if not SPM target 2018-11-27 15:29:14 +02:00
Netanel Gonen f1c5aeb70e add MBEDTLS_PSA_CRYPTO_C defined to K64F PSA target 2018-11-27 14:02:55 +02:00
Martin Kojtal 86915d9a7e
Merge pull request #8704 from RonEld/cryptocell_ccm_alt_fixes
Fix issues in Cryptocell 310 ccm_alt discovered by On Target Testing
2018-11-27 11:44:33 +01:00
Martin Kojtal a2368967c0 add MPU support for 3 targets
They should support MPU as they have all defined. Otherwise it fails to build
2018-11-27 10:24:53 +00:00
Mohammad AboMokh 819594477c Refactor trng_get_bytes() 2018-11-27 12:15:52 +02:00
Mohammad AboMokh b9ea334f1f Change __WEAK to MBED_WEAK 2018-11-27 12:15:26 +02:00
Alexander Zilberkant daeb19d167 Fix entropy_inject test compilation
Include to crypto.h file will fail on targets without TARGET_PSA support
Moving prerequisites check before include.
2018-11-27 11:57:01 +02:00
Alexander Zilberkant abf1ccc722 Disable crypto_init tests when Mbed Crypto is OFF 2018-11-27 11:57:00 +02:00
mohammad1603 6e862cf112 Fix psa_crypto_generator_init implementation to use the init define macro 2018-11-27 11:56:59 +02:00
mohammad1603 4cef73d2eb Update output_length in trng_get_bytes() provided by psa. 2018-11-27 11:56:58 +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
Danny Shavit e72d910754 Add a weak implementation for trng_get_bytes() 2018-11-27 11:56:49 +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
Netanel Gonen 4816266205 add comment to explain why (-1 * rc) is returned 2018-11-27 11:56:44 +02:00
Netanel Gonen 73cb013ac6 skip inject entropy test if they not supported 2018-11-27 11:56:43 +02:00
Netanel Gonen ae0fa609a9 remove psa_its_get_info from seed read function 2018-11-27 11:56:42 +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
Mohammad AboMokh fb88cb4cb5 Add missing guards 2018-11-27 11:56:38 +02:00
Mohammad AboMokh 73ebe1a247 Fix inject entropy tests
* Call greentea_case_teardown_handler() and greentea_case_setup_handler() instead of return STATUS_CONTINUE
* Introduce and use new macro MBEDTLS_PSA_INJECT_ENTROPY_MIN_SIZE
2018-11-27 11:56:37 +02:00
Mohammad AboMokh 0fde6af120 change MBEDTLS_RANDOM_SEED_ITS_UID define to be PSA_CRYPTO_ITS_RANDOM_SEED_UID 2018-11-27 11:56:36 +02:00
Mohammad AboMokh 72037747b1 Update auto generated SPM files 2018-11-27 11:56:35 +02:00
Mohammad AboMokh 1325084b1a Add tests to PSA entropy injection 2018-11-27 11:56:33 +02:00
Mohammad AboMokh 587fdbb447 Remove crypto init that was not called by the user 2018-11-27 11:56:32 +02:00
Mohammad AboMokh 7b2c924ac7 Adding defualt behaviour for platforms without TRNG.
If setting the MBEDTLS_PLATFORM_NV_SEED_ALT and MBEDTLS_ENTROPY_NV_SEED flags and not
setting MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO and MBEDTLS_PLATFORM_NV_SEED_READ_MACRO flags
mbed-os will add an entropy source to the relevent partition - SPE in case of daul core or
in case of single core V7 to the main partition.

The defualt behaviour will be to read or write the data from the ITS.
2018-11-27 11:56:31 +02:00
Mohammad AboMokh bd47a8c2b8 Add entropy inject to spm 2018-11-27 11:56:30 +02:00
Oren Cohen f4581faab0 Create a new partition for the crypto service
The following files initially were taken
from https://github.com/ARMmbed/psa-crypto-spm/releases/tag/spm-crypto-5.11
* crypto_platform_spe.h
* crypto_struct.h
* crypto_struct_ipc.h
* psa_crypto_spm.c
* crypto_spe.h
* crypto_partition_psa.json

The rest of the files were autimatically generated
by tools/spm/generate_psa_partition.py
2018-11-27 11:56:29 +02:00
Donatien Garnier 72f3680f1d Disable MPU on RTL8195A 2018-11-27 09:29:33 +00:00
Russ Butler 7cdfbee28b Fix asyle problems
Run astyle to fix CI failures.
2018-11-27 09:29:33 +00:00
Russ Butler 02b50b44ef Define MPU_ROM_END for all targets
Set a default value for MPU_ROM_END in target so this is defined for
all targets.
2018-11-27 09:29:33 +00:00
Russ Butler daf96c1c77 Remove MPU design doc
Remove the design document since it is out of date and up to date
content is in the final docs.
2018-11-27 09:29:32 +00:00
Russ Butler caa7b93921 Rename lock functions and classes
Invert the name of the lock functions and classes so you are not
locking a negative.
2018-11-27 09:29:32 +00:00
Russ Butler a7bf312106 Skip MPU fault tests for ARMv8-M
For enhanced security ARMv8-M firmware doesn't allow the hardfault
handler to be hooked by non-secure code. Because of this there is no
way to recover from the MPU fault tests. This PR disables those tests
until hardfault recovery is supported by secure firmware.
2018-11-27 09:29:32 +00:00