File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1559,8 +1559,11 @@ static psa_status_t psa_start_key_creation(
1559
1559
slot -> attr = attributes -> core ;
1560
1560
1561
1561
/* Erase external-only flags from the internal copy. To access
1562
- * external-only flags, query `attributes`. */
1563
- slot -> attr .flags |= ~MBEDTLS_PSA_KA_MASK_EXTERNAL_ONLY ;
1562
+ * external-only flags, query `attributes`. Thanks to the check
1563
+ * in psa_validate_key_attributes(), this leaves the dual-use
1564
+ * flags and any internal flag that psa_internal_allocate_key_slot()
1565
+ * may have set. */
1566
+ slot -> attr .flags &= ~MBEDTLS_PSA_KA_MASK_EXTERNAL_ONLY ;
1564
1567
1565
1568
#if defined(MBEDTLS_PSA_CRYPTO_SE_C )
1566
1569
/* For a key in a secure element, we need to do three things:
You can’t perform that action at this time.
0 commit comments