Lines Matching refs:status

41 static int local_err_translation(psa_status_t status)  in local_err_translation()  argument
43 return psa_status_to_mbedtls(status, psa_to_ssl_errors, in local_err_translation()
47 #define PSA_TO_MBEDTLS_ERR(status) local_err_translation(status) argument
161 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; in mbedtls_ssl_tls13_hkdf_expand_label() local
193 status = psa_key_derivation_setup(&operation, PSA_ALG_HKDF_EXPAND(hash_alg)); in mbedtls_ssl_tls13_hkdf_expand_label()
195 if (status != PSA_SUCCESS) { in mbedtls_ssl_tls13_hkdf_expand_label()
199 status = psa_key_derivation_input_bytes(&operation, in mbedtls_ssl_tls13_hkdf_expand_label()
204 if (status != PSA_SUCCESS) { in mbedtls_ssl_tls13_hkdf_expand_label()
208 status = psa_key_derivation_input_bytes(&operation, in mbedtls_ssl_tls13_hkdf_expand_label()
213 if (status != PSA_SUCCESS) { in mbedtls_ssl_tls13_hkdf_expand_label()
217 status = psa_key_derivation_output_bytes(&operation, in mbedtls_ssl_tls13_hkdf_expand_label()
221 if (status != PSA_SUCCESS) { in mbedtls_ssl_tls13_hkdf_expand_label()
227 status = (status == PSA_SUCCESS ? abort_status : status); in mbedtls_ssl_tls13_hkdf_expand_label()
229 return PSA_TO_MBEDTLS_ERR(status); in mbedtls_ssl_tls13_hkdf_expand_label()
318 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; in mbedtls_ssl_tls13_derive_secret() local
320 status = psa_hash_compute(hash_alg, ctx, ctx_len, hashed_context, in mbedtls_ssl_tls13_derive_secret()
322 if (status != PSA_SUCCESS) { in mbedtls_ssl_tls13_derive_secret()
323 ret = PSA_TO_MBEDTLS_ERR(status); in mbedtls_ssl_tls13_derive_secret()
353 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; in mbedtls_ssl_tls13_evolve_secret() local
395 status = psa_key_derivation_setup(&operation, in mbedtls_ssl_tls13_evolve_secret()
398 if (status != PSA_SUCCESS) { in mbedtls_ssl_tls13_evolve_secret()
402 status = psa_key_derivation_input_bytes(&operation, in mbedtls_ssl_tls13_evolve_secret()
407 if (status != PSA_SUCCESS) { in mbedtls_ssl_tls13_evolve_secret()
411 status = psa_key_derivation_input_bytes(&operation, in mbedtls_ssl_tls13_evolve_secret()
415 if (status != PSA_SUCCESS) { in mbedtls_ssl_tls13_evolve_secret()
419 status = psa_key_derivation_output_bytes(&operation, in mbedtls_ssl_tls13_evolve_secret()
423 if (status != PSA_SUCCESS) { in mbedtls_ssl_tls13_evolve_secret()
429 status = (status == PSA_SUCCESS ? abort_status : status); in mbedtls_ssl_tls13_evolve_secret()
430 ret = (ret == 0 ? PSA_TO_MBEDTLS_ERR(status) : ret); in mbedtls_ssl_tls13_evolve_secret()
719 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; in ssl_tls13_calc_finished_core() local
762 status = psa_import_key(&attributes, finished_key, hash_len, &key); in ssl_tls13_calc_finished_core()
763 if (status != PSA_SUCCESS) { in ssl_tls13_calc_finished_core()
764 ret = PSA_TO_MBEDTLS_ERR(status); in ssl_tls13_calc_finished_core()
768 status = psa_mac_compute(key, alg, transcript, hash_len, in ssl_tls13_calc_finished_core()
770 ret = PSA_TO_MBEDTLS_ERR(status); in ssl_tls13_calc_finished_core()
774 status = psa_destroy_key(key); in ssl_tls13_calc_finished_core()
776 ret = PSA_TO_MBEDTLS_ERR(status); in ssl_tls13_calc_finished_core()
957 psa_status_t status = PSA_SUCCESS; in mbedtls_ssl_tls13_populate_transform() local
1062 if ((status = mbedtls_ssl_cipher_to_psa(ciphersuite_info->cipher, in mbedtls_ssl_tls13_populate_transform()
1068 1, "mbedtls_ssl_cipher_to_psa", PSA_TO_MBEDTLS_ERR(status)); in mbedtls_ssl_tls13_populate_transform()
1069 return PSA_TO_MBEDTLS_ERR(status); in mbedtls_ssl_tls13_populate_transform()
1079 if ((status = psa_import_key(&attributes, in mbedtls_ssl_tls13_populate_transform()
1084 1, "psa_import_key", PSA_TO_MBEDTLS_ERR(status)); in mbedtls_ssl_tls13_populate_transform()
1085 return PSA_TO_MBEDTLS_ERR(status); in mbedtls_ssl_tls13_populate_transform()
1090 if ((status = psa_import_key(&attributes, in mbedtls_ssl_tls13_populate_transform()
1095 1, "psa_import_key", PSA_TO_MBEDTLS_ERR(status)); in mbedtls_ssl_tls13_populate_transform()
1096 return PSA_TO_MBEDTLS_ERR(status); in mbedtls_ssl_tls13_populate_transform()
1113 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; in ssl_tls13_get_cipher_key_info() local
1121 status = mbedtls_ssl_cipher_to_psa(ciphersuite_info->cipher, taglen, in ssl_tls13_get_cipher_key_info()
1123 if (status != PSA_SUCCESS) { in ssl_tls13_get_cipher_key_info()
1124 return PSA_TO_MBEDTLS_ERR(status); in ssl_tls13_get_cipher_key_info()
1502 psa_status_t status = PSA_ERROR_GENERIC_ERROR; in ssl_tls13_key_schedule_stage_handshake() local
1505 status = psa_get_key_attributes(handshake->xxdh_psa_privkey, in ssl_tls13_key_schedule_stage_handshake()
1507 if (status != PSA_SUCCESS) { in ssl_tls13_key_schedule_stage_handshake()
1508 ret = PSA_TO_MBEDTLS_ERR(status); in ssl_tls13_key_schedule_stage_handshake()
1518 status = psa_raw_key_agreement( in ssl_tls13_key_schedule_stage_handshake()
1522 if (status != PSA_SUCCESS) { in ssl_tls13_key_schedule_stage_handshake()
1523 ret = PSA_TO_MBEDTLS_ERR(status); in ssl_tls13_key_schedule_stage_handshake()
1528 status = psa_destroy_key(handshake->xxdh_psa_privkey); in ssl_tls13_key_schedule_stage_handshake()
1529 if (status != PSA_SUCCESS) { in ssl_tls13_key_schedule_stage_handshake()
1530 ret = PSA_TO_MBEDTLS_ERR(status); in ssl_tls13_key_schedule_stage_handshake()
1858 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; in mbedtls_ssl_tls13_export_handshake_psk() local
1867 status = psa_get_key_attributes(ssl->handshake->psk_opaque, &key_attributes); in mbedtls_ssl_tls13_export_handshake_psk()
1868 if (status != PSA_SUCCESS) { in mbedtls_ssl_tls13_export_handshake_psk()
1869 return PSA_TO_MBEDTLS_ERR(status); in mbedtls_ssl_tls13_export_handshake_psk()
1878 status = psa_export_key(ssl->handshake->psk_opaque, in mbedtls_ssl_tls13_export_handshake_psk()
1880 if (status != PSA_SUCCESS) { in mbedtls_ssl_tls13_export_handshake_psk()
1883 return PSA_TO_MBEDTLS_ERR(status); in mbedtls_ssl_tls13_export_handshake_psk()