Lines Matching refs:status

315     psa_status_t status;  in mbedtls_pk_can_do_ext()  local
317 status = psa_get_key_attributes(ctx->priv_id, &attributes); in mbedtls_pk_can_do_ext()
318 if (status != PSA_SUCCESS) { in mbedtls_pk_can_do_ext()
522 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; in mbedtls_pk_get_psa_attributes() local
523 status = psa_get_key_attributes(pk->priv_id, &old_attributes); in mbedtls_pk_get_psa_attributes()
524 if (status != PSA_SUCCESS) { in mbedtls_pk_get_psa_attributes()
594 psa_status_t status = psa_export_key(old_key_id, in export_import_into_psa() local
597 if (status != PSA_SUCCESS) { in export_import_into_psa()
598 return status; in export_import_into_psa()
600 status = psa_import_key(attributes, key_buffer, key_length, new_key_id); in export_import_into_psa()
602 return status; in export_import_into_psa()
611 psa_status_t status = psa_copy_key(old_key_id, attributes, new_key_id); in copy_into_psa() local
612 if (status == PSA_ERROR_NOT_PERMITTED /*missing COPY usage*/ || in copy_into_psa()
613 status == PSA_ERROR_INVALID_ARGUMENT /*incompatible policy*/) { in copy_into_psa()
626 status = psa_get_key_attributes(old_key_id, &old_attributes); in copy_into_psa()
627 if (status != PSA_SUCCESS) { in copy_into_psa()
635 status = export_import_into_psa(old_key_id, attributes, new_key_id); in copy_into_psa()
637 return PSA_PK_TO_MBEDTLS_ERR(status); in copy_into_psa()
808 psa_status_t status = in import_public_into_psa() local
810 if (status != PSA_SUCCESS) { in import_public_into_psa()
818 status = psa_export_public_key(pk->priv_id, in import_public_into_psa()
821 if (status != PSA_SUCCESS) { in import_public_into_psa()
822 return PSA_PK_TO_MBEDTLS_ERR(status); in import_public_into_psa()
864 psa_status_t status; in copy_from_psa() local
877 status = psa_get_key_attributes(key_id, &key_attr); in copy_from_psa()
878 if (status != PSA_SUCCESS) { in copy_from_psa()
883 status = psa_export_public_key(key_id, exp_key, sizeof(exp_key), &exp_key_len); in copy_from_psa()
885 status = psa_export_key(key_id, exp_key, sizeof(exp_key), &exp_key_len); in copy_from_psa()
887 if (status != PSA_SUCCESS) { in copy_from_psa()
888 ret = PSA_PK_TO_MBEDTLS_ERR(status); in copy_from_psa()
1153 psa_status_t status = PSA_ERROR_DATA_CORRUPT; in mbedtls_pk_verify_ext() local
1171 status = psa_import_key(&attributes, in mbedtls_pk_verify_ext()
1174 if (status != PSA_SUCCESS) { in mbedtls_pk_verify_ext()
1176 return PSA_PK_TO_MBEDTLS_ERR(status); in mbedtls_pk_verify_ext()
1186 status = psa_verify_hash(key_id, psa_sig_alg, hash, in mbedtls_pk_verify_ext()
1190 if (status == PSA_SUCCESS && sig_len > mbedtls_pk_get_len(ctx)) { in mbedtls_pk_verify_ext()
1194 if (status == PSA_SUCCESS) { in mbedtls_pk_verify_ext()
1195 status = destruction_status; in mbedtls_pk_verify_ext()
1198 return PSA_PK_RSA_TO_MBEDTLS_ERR(status); in mbedtls_pk_verify_ext()
1326 psa_status_t status; in mbedtls_pk_sign_ext() local
1331 status = psa_sign_hash(ctx->priv_id, PSA_ALG_RSA_PSS(psa_md_alg), in mbedtls_pk_sign_ext()
1334 if (status == PSA_ERROR_NOT_PERMITTED) { in mbedtls_pk_sign_ext()
1335 status = psa_sign_hash(ctx->priv_id, PSA_ALG_RSA_PSS_ANY_SALT(psa_md_alg), in mbedtls_pk_sign_ext()
1339 return PSA_PK_RSA_TO_MBEDTLS_ERR(status); in mbedtls_pk_sign_ext()