commit | 90d8c7a728053bac46bf8552d35dc67904cf54ac | [log] [tgz] |
---|---|---|
author | itayzafrir <itay.zafrir@arm.com> | Wed Sep 12 11:44:52 2018 +0300 |
committer | itayzafrir <itay.zafrir@arm.com> | Sun Sep 16 12:15:47 2018 +0300 |
tree | 0bb0eeb9b327150a6034bf207c93ee1c29678c81 | |
parent | 0adf0fc31c2ed664f7536e15c8c7ef4e99e1b5a5 [diff] [blame] |
Ensure the module is initialized in key based functions
diff --git a/library/psa_crypto.c b/library/psa_crypto.c index 01dbf3c..8aa3145 100644 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c
@@ -347,6 +347,8 @@ static psa_status_t psa_get_key_slot( psa_key_slot_t key, key_slot_t **p_slot ) { + GUARD_MODULE_INITIALIZED; + /* 0 is not a valid slot number under any circumstance. This * implementation provides slots number 1 to N where N is the * number of available slots. */