mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-05 19:35:48 +03:00
Start subsystem IDs at 1 instead of 0
Catch potential invalid calls to init. Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
@@ -93,8 +93,10 @@ static int key_type_is_raw_bytes(psa_key_type_t type)
|
|||||||
#define RNG_INITIALIZED 1
|
#define RNG_INITIALIZED 1
|
||||||
#define RNG_SEEDED 2
|
#define RNG_SEEDED 2
|
||||||
|
|
||||||
|
/* IDs for PSA crypto subsystems. Starts at 1 to catch potential uninitialized
|
||||||
|
* variables as arguments. */
|
||||||
typedef enum {
|
typedef enum {
|
||||||
PSA_CRYPTO_SUBSYSTEM_DRIVER_WRAPPERS = 0,
|
PSA_CRYPTO_SUBSYSTEM_DRIVER_WRAPPERS = 1,
|
||||||
PSA_CRYPTO_SUBSYSTEM_KEY_SLOTS,
|
PSA_CRYPTO_SUBSYSTEM_KEY_SLOTS,
|
||||||
PSA_CRYPTO_SUBSYSTEM_RNG,
|
PSA_CRYPTO_SUBSYSTEM_RNG,
|
||||||
PSA_CRYPTO_SUBSYSTEM_TRANSACTION,
|
PSA_CRYPTO_SUBSYSTEM_TRANSACTION,
|
||||||
|
Reference in New Issue
Block a user