From 38a622b68ba4734b5b7c5c4da3b6c193c5d7dee4 Mon Sep 17 00:00:00 2001 From: mohammad1603 Date: Tue, 17 Apr 2018 03:27:53 -0700 Subject: [PATCH] Function psa_get_key_policy() now return policy value for empty slots Function psa_get_key_policy() now return policy value for empty slots --- library/psa_crypto.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/library/psa_crypto.c b/library/psa_crypto.c index c516e38af..a25362224 100644 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c @@ -1346,8 +1346,6 @@ psa_status_t psa_get_key_policy(psa_key_slot_t key, return( PSA_ERROR_INVALID_ARGUMENT ); slot = &global_data.key_slots[key]; - if( slot->type == PSA_KEY_TYPE_NONE ) - return( PSA_ERROR_EMPTY_SLOT ); *policy = slot->policy;