Commit Graph

202 Commits (c53d2f119800b87a4e9997ac0b55f575689bef8b)

Author SHA1 Message Date
Ron Eldor dadb621a97 Change size embedded in the temp_ram_page_data
The size stated in the struct header was 0xB0, however
the actual size(including the header) is 0xAC. Changed the
len value in the header, to avoid memory corruption.
Raised in #12171
2019-12-29 17:28:56 +02:00
Vikas Katariya f4a1945911 Add PSA auto-generated files to components
To support online compiler build for PSA targets, some files are
auto-generated (LPC55S69_NS and ARM_MUSCA_A1_NS) by the script
from offline build system. Since these files are identical for these
V8-M targets it would be good to check them in to support online
compiler as they are COMPONENT_SPE and services related.

In folder: components/TARGET_PSA/
  --TARGET_MBED_SPM
    --COMPONENT_SPE
      psa_setup.c
  --TARGET_TFM
    --COMPONENT_SPE
      --inc
	tfm_partition_defs.inc
        tfm_partition_list.inc
        tfm_service_list.inc
        tfm_spm_signal_defs.h
  --services
    --inc
      autogen_sid.h
      mbed_spm_partitions.h

Signed-off-by: Vikas Katariya <Vikas.Katariya@arm.com>
2019-11-08 14:57:06 +00:00
Martin Kojtal 567479792c
Merge pull request #11392 from hugueskamba/hk-remove-minor-warnings
Remove minor build warnings
2019-09-05 09:59:39 +02:00
Hugues Kamba 9f44c2c4d2 Sync with TF upstream code as much as possible to remove warning 2019-09-03 13:47:06 +01:00
Jaeden Amero 43af68d630 attestation: Don't create attestation key twice
If psa_attestation_inject_key() is called twice, exit with a non-fatal
error status without attempting to create another attestation key. The
key already exists and doesn't need to be added again.
2019-09-02 17:10:59 +01:00
Jaeden Amero 3d1b8363db Use PSA Crypto API 1.0b3
The PSA Crypto API has moved on from 1.0b2 to 1.0b3, bringing along with
it some breaking changes. Update Mbed OS to use the 1.0b3 API.
2019-09-02 17:10:59 +01:00
Hugues Kamba e65a0c0a99 Remove minor build warnings 2019-09-02 15:04:58 +01:00
Jaeden Amero 3e53118727 crypto: Add IPC for psa_copy_key() 2019-08-29 14:55:21 +01:00
Jaeden Amero 4eb4b32910 psa: Update crypto service for PSA Crypto 1.0b3 2019-08-29 14:55:21 +01:00
Jaeden Amero 0758d23f00 crypto: Make service parameter names match API
Make the service implementation use the same names as the API as
declared in the crypto.h header. This improves readability and
maintainability of the service.
2019-08-23 17:16:10 +01:00
Jaeden Amero b0c83501a4 crypto: Make IPC declaration order follow crypto.h
Order the IPC functions in the same order as the functions are listed in
crypto.h for improved readability.
2019-08-23 17:16:10 +01:00
Jaeden Amero dafbf27340 crypto: Fix "refence count" typo
Rename the reference count variable to something shorter and avoid using
the mispelling "refence".
2019-08-23 17:16:10 +01:00
Jaeden Amero 97447677ba crypto: Remove duplicate PSA_CRYPTO_INIT
PSA_CRYPTO_INIT is defined as a service identifier. We don't need to
redefine it as a secure function. There is only one function under this
service identifier, so no secure function definitions are necessary to
differentiate between.
2019-08-23 17:16:10 +01:00
Jaeden Amero dda4c47a4b crypto: Match styles of crypto struct headers
Make crypto_struct_ipc.h (for use with PSA Crypto clients) match style
with the file it is based on, crypto_struct.h (from Mbed Crypto). This
helps to keep the file diff minimal so it's easy to see the meaningful
(non-style) changes.
2019-08-23 17:16:10 +01:00
Hugues Kamba 27e4ca18cf Fix inclusion of test related directories by build tool 2019-08-09 10:20:48 +01:00
David Saada fb3559d841 PSA storage: Conform to "PSA 1.0.0" spec release
- Add the no confidentiality & no replay protection flags
- Add actual size parameter in PS/ITS get APIs
- Change a few size parameters from uint32_t to size_t
2019-07-14 18:50:47 +03:00
Martin Kojtal 85c477c1dc
Merge pull request #10609 from kjbracey-arm/us_ticker_optimise
wait_us optimization
2019-06-28 14:29:00 +01:00
Kevin Bracey c5b9779858 Remote "static" from MBED_FORCEINLINE
Static keyword causes problems when trying to use force-inlined
functions from normal inlined functions. This is not legal:

    static inline void forced() { }

    inline void normal() { forced(); }

You cannot reference internal-linkage things from external-linkage
inline functions.

Removal of the static implies that in C there would need to be a
non-inline definition in case anyone calls it non-inlined, but if the
force attribute is doing its job, that should not happen.

Only significant in-tree user of the MBED_FORCEINLINE macro is
the atomic operations - making this change permits atomic operations
from non-static inline functions.
2019-06-27 16:12:30 +03:00
Devaraj Ranganna cb8f2c07a1 1. Include MBEDTLS_CONFIG_FILE before evaluating MBEDTLS_PSA_CRYPTO_C
2. Remove macro MBEDTLS_PSA_CRYPTO_C from PSA targets

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2019-06-24 14:33:04 +01:00
David Saada dcd2c292af PSA protected storage: Add encrypt & RB protect flags by default to set. 2019-06-03 16:32:55 +03:00
Martin Kojtal 303d0f0c0c SPE: fix inject entropy macro
Use new TLS macro
2019-05-27 11:50:09 +01:00
Alexander Zilberkant 117e3e82b6 Update PSA includes to autogenerated files 2019-04-30 14:41:09 +03:00
Alexander Zilberkant ab01bea46d Delete autogenerated files 2019-04-30 14:10:23 +03:00
Oren Cohen f51eb6215a Fix warnings on PSA secure builds 2019-04-17 10:37:51 +03:00
itayzafrir 2b81588664 Add message context cleanup helper function 2019-03-28 12:53:11 +02:00
itayzafrir a446ee63c7 Rename internal function destroy_hash_clone to clear_hash_clone 2019-03-27 16:13:46 +02:00
itayzafrir b26890e62d Do not allocate zero sized buffers - generators 2019-03-27 15:43:19 +02:00
itayzafrir 749b1e30bb Do not allocate zero sized buffers - rng 2019-03-27 15:43:18 +02:00
itayzafrir abd9c661ce Do not allocate zero sized buffers - entropy 2019-03-27 15:43:18 +02:00
itayzafrir 19b83812d4 Do not allocate zero sized buffers - keys 2019-03-27 15:43:17 +02:00
itayzafrir f3294ef338 Do not allocate zero sized buffers - cipher 2019-03-27 15:43:16 +02:00
itayzafrir 19952d990c Do not allocate zero sized buffers - aead 2019-03-27 15:43:15 +02:00
itayzafrir 18feb26ca7 Do not allocate zero sized buffers - asymmetric 2019-03-27 15:43:14 +02:00
itayzafrir 979ca1ee55 Do not allocate zero sized buffers - hash 2019-03-27 15:43:12 +02:00
itayzafrir 7b35e763dd Do not allocate zero sized buffers - mac 2019-03-27 14:29:19 +02:00
itayzafrir 8044f6d038 Fix crypto service abort functionality - generators 2019-03-26 15:32:49 +02:00
itayzafrir 545e669c88 Fix crypto service abort functionality - mac 2019-03-26 15:32:49 +02:00
itayzafrir da999c6946 Fix crypto service abort functionality - hash 2019-03-26 15:32:49 +02:00
itayzafrir 1b26e0d5f2 Fix crypto service abort functionality - cipher
Also refactor cipher setup function to one common function.
2019-03-26 15:32:49 +02:00
Nir Sonnenschein ca62922c9f
Merge pull request #10036 from itayzafrir/crypto-ipc-refactor
Refactor Crypto Service Proxy
2019-03-26 15:20:49 +02:00
itayzafrir 95b0a18ac5 Remove uneeded TODO comment from the code 2019-03-18 10:28:21 +02:00
itayzafrir c97b90ade1 Unify code style
- Use designated initializers for IPC structs
- Unify variables declaration and initialization
2019-03-12 14:31:30 +02:00
itayzafrir 9bc8bcf0d2 Unify sections titles/comments & fix typo in comment 2019-03-12 11:35:35 +02:00
itayzafrir 5c48d58389 Set handle to PSA_NULL_HANDLE when closing IPC connection 2019-03-12 11:35:34 +02:00
itayzafrir bf05154461 Use PSA_NULL_HANDLE when testing for invalid handles 2019-03-12 10:53:13 +02:00
itayzafrir caafc34695 Use psa prefix for crypto.h include 2019-03-12 10:51:31 +02:00
itayzafrir 7a15865e8b Refactor crypto service proxy 2019-03-11 16:21:34 +02:00
Alexander Zilberkant 661613c998 Rename psa_system_reset to mbed_psa_system_reset
add noreturn attributes
update lifecycle service to use psa/error.h
fix doxygen
2019-03-11 10:43:19 +02:00
Oren Cohen d0021b5de7 Fix error codes for psa_attestation_inject_key 2019-03-10 10:53:38 +02:00
Ryan Morse 20c2734e7b Fixed issue with wrong floating point literal 2019-03-07 08:40:20 -08:00