Skip to content

Commit 360de14

Browse files
Fix code using psa_key_id_t that should be using psa_key_handle_t (#529)
1 parent 1a2b719 commit 360de14

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

connectivity/mbedtls/include/mbedtls/cipher_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ typedef enum
134134
typedef struct
135135
{
136136
psa_algorithm_t alg;
137-
psa_key_id_t slot;
137+
psa_key_handle_t slot;
138138
mbedtls_cipher_psa_key_ownership slot_state;
139139
} mbedtls_cipher_context_psa;
140140
#endif /* MBEDTLS_USE_PSA_CRYPTO */

connectivity/mbedtls/include/mbedtls/pk.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ int mbedtls_pk_load_file( const char *path, unsigned char **buf, size_t *n );
869869
* \return An Mbed TLS error code otherwise.
870870
*/
871871
int mbedtls_pk_wrap_as_opaque( mbedtls_pk_context *pk,
872-
psa_key_id_t *key,
872+
psa_key_handle_t *key,
873873
psa_algorithm_t hash_alg );
874874
#endif /* MBEDTLS_USE_PSA_CRYPTO */
875875

connectivity/mbedtls/include/mbedtls/ssl_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ struct mbedtls_ssl_handshake_params
448448
#if defined(MBEDTLS_USE_PSA_CRYPTO)
449449
psa_key_type_t ecdh_psa_type;
450450
uint16_t ecdh_bits;
451-
psa_key_id_t ecdh_psa_privkey;
451+
psa_key_handle_t ecdh_psa_privkey;
452452
unsigned char ecdh_psa_peerkey[MBEDTLS_PSA_MAX_EC_PUBKEY_LENGTH];
453453
size_t ecdh_psa_peerkey_len;
454454
#endif /* MBEDTLS_USE_PSA_CRYPTO */

connectivity/mbedtls/source/pk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ mbedtls_pk_type_t mbedtls_pk_get_type( const mbedtls_pk_context *ctx )
588588
* Currently only works for EC private keys.
589589
*/
590590
int mbedtls_pk_wrap_as_opaque( mbedtls_pk_context *pk,
591-
psa_key_id_t *key,
591+
psa_key_handle_t *key,
592592
psa_algorithm_t hash_alg )
593593
{
594594
#if !defined(MBEDTLS_ECP_C)

connectivity/mbedtls/source/pk_wrap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ static int ecdsa_verify_wrap( void *ctx_arg, mbedtls_md_type_t md_alg,
543543
mbedtls_ecdsa_context *ctx = ctx_arg;
544544
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
545545
psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
546-
psa_key_id_t key_id = 0;
546+
psa_key_handle_t key_id = 0;
547547
psa_status_t status;
548548
mbedtls_pk_context key;
549549
int key_len;

connectivity/mbedtls/source/ssl_tls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ static int tls_prf_generic( mbedtls_md_type_t md_type,
506506
{
507507
psa_status_t status;
508508
psa_algorithm_t alg;
509-
psa_key_id_t master_key = MBEDTLS_SVC_KEY_ID_INIT;
509+
psa_key_handle_t master_key = MBEDTLS_SVC_KEY_ID_INIT;
510510
psa_key_derivation_operation_t derivation =
511511
PSA_KEY_DERIVATION_OPERATION_INIT;
512512

0 commit comments

Comments
 (0)