File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1469,10 +1469,6 @@ static psa_status_t psa_start_key_creation(
1469
1469
return ( status );
1470
1470
}
1471
1471
1472
- status = psa_check_key_slot_policy ( slot );
1473
- if ( status != PSA_SUCCESS )
1474
- return ( status );
1475
-
1476
1472
/* Refuse to create overly large keys.
1477
1473
* Note that this doesn't trigger on import if the attributes don't
1478
1474
* explicitly specify a size (so psa_get_key_bits returns 0), so
@@ -1487,6 +1483,10 @@ static psa_status_t psa_start_key_creation(
1487
1483
1488
1484
slot -> attr = attributes -> core ;
1489
1485
1486
+ status = psa_check_key_slot_policy ( slot );
1487
+ if ( status != PSA_SUCCESS )
1488
+ return ( status );
1489
+
1490
1490
#if defined(MBEDTLS_PSA_CRYPTO_SE_C )
1491
1491
/* For a key in a secure element, we need to do three things:
1492
1492
* create the key file in internal storage, create the
Original file line number Diff line number Diff line change @@ -52,6 +52,9 @@ invalid_handle:1
52
52
PSA invalid handle (largest plausible handle)
53
53
invalid_handle:-1
54
54
55
+ PSA import: bad usage flag
56
+ import_with_policy:PSA_KEY_TYPE_RAW_DATA:0x40000000:0:PSA_ERROR_INVALID_ARGUMENT
57
+
55
58
PSA import: invalid type (0)
56
59
import_with_policy:PSA_KEY_TYPE_NONE:0:0:PSA_ERROR_NOT_SUPPORTED
57
60
You can’t perform that action at this time.
0 commit comments