Alastair D'Silva
2617c5d55b
Don't use define checks on DEVICE_FOO macros (mbed code)
...
The DEVICE_FOO macros are always defined (either 0 or 1).
This patch replaces any instances of a define check on a DEVICE_FOO
macro with value test instead.
Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
2018-12-20 10:16:42 +11:00
Ron Eldor
a2531b5674
Fix build error on IAR
...
IAR fails to build when a variable is initialized with empty curly braces.
Added `{ { 0 } }` to fix that.
2018-09-02 10:48:31 +03:00
Ron Eldor
c1b6fdc5af
Rename parameter name
...
Rename `obsolete_ctx` to `unused_ctx` as it is simply unused.
2018-08-31 13:53:29 +03:00
Ron Eldor
666ebe392a
Change the terminate limit check
...
Check for counter to be `< 1` instead of `<= 0` before terminating.
2018-08-30 13:51:58 +03:00
Ron Eldor
1f5cee967d
Address concurrency and style issues
...
1. Use atomic operations to increase and decrease counter.
2. Style fixes.
Remove unused function declaration.
2018-08-30 11:18:23 +03:00
Ron Eldor
127b68fbbc
Make the platform context a global variable
...
Make the platform context a global variable,
adding the refernce counter to it.
2018-08-28 20:29:26 +03:00
Ron Eldor
c3b31bc500
Add Mbed TLS Platform module errors
...
1. Add error codes for platform setup \ teardown.
2. Reassign `reference_count` to 0 after terminating platform,
and remove condition for 0
2018-06-04 14:01:59 +03:00
Ron Eldor
ca94a49eff
Add reference counter for platform context
...
1. Move the `mbedtls_platform_context` to be platform code, in `features/mbedtls/platfrom/`.
2. Add static refernce counter, to setup and teardown the platform code only once.
3. Adjust Cryptocell porting accordingly.
2018-06-04 10:38:49 +03:00
Martin Kojtal
1b95c67dd2
mbedtls trng - remove MBEDTLS_ENTROPY_HARDWARE_ALT
...
MBEDTLS_ENTROPY_HARDWARE_ALT will be defined via config in mbedtls,
the mbed wrapper should use DEVICE_TRNG.
2016-09-27 09:16:28 +01:00
Martin Kojtal
1f8da7da34
mbedtls - move TRNG mbed impl into platform folder
2016-09-27 09:14:42 +01:00