Lines Matching refs:status

53 	psa_status_t status;  in crp_get_pub_key()  local
60 status = al_psa_status( in crp_get_pub_key()
63 if (status != PSA_SUCCESS) { in crp_get_pub_key()
69 status = al_psa_status( in crp_get_pub_key()
72 if (status != PSA_SUCCESS) { in crp_get_pub_key()
81 status = al_psa_status( in crp_get_pub_key()
84 if (status != PSA_SUCCESS) { in crp_get_pub_key()
89 return status; in crp_get_pub_key()
92 return status; in crp_get_pub_key()
114 psa_status_t status = PSA_SUCCESS; in crp_imp_key_secp256r1() local
136 status = al_psa_status( in crp_imp_key_secp256r1()
139 if (status != PSA_SUCCESS) { in crp_imp_key_secp256r1()
145 status = al_psa_status( in crp_imp_key_secp256r1()
148 if (status != PSA_SUCCESS) { in crp_imp_key_secp256r1()
154 status = crp_get_pub_key(key_id, data_out, sizeof(data_out), &data_len); in crp_imp_key_secp256r1()
159 status = al_psa_status( in crp_imp_key_secp256r1()
162 if (status != PSA_SUCCESS) { in crp_imp_key_secp256r1()
168 status = al_psa_status( in crp_imp_key_secp256r1()
172 if (status != PSA_SUCCESS) { in crp_imp_key_secp256r1()
196 status = al_psa_status( in crp_imp_key_secp256r1()
199 if (status != PSA_SUCCESS) { in crp_imp_key_secp256r1()
205 return status; in crp_imp_key_secp256r1()
208 return status; in crp_imp_key_secp256r1()
226 psa_status_t status = PSA_SUCCESS; in crp_gen_key_secp256r1() local
248 status = al_psa_status( in crp_gen_key_secp256r1()
251 if (status != PSA_SUCCESS) { in crp_gen_key_secp256r1()
257 status = al_psa_status( in crp_gen_key_secp256r1()
260 if (status != PSA_SUCCESS) { in crp_gen_key_secp256r1()
266 status = crp_get_pub_key(key_id, data_out, sizeof(data_out), &data_len); in crp_gen_key_secp256r1()
271 status = al_psa_status( in crp_gen_key_secp256r1()
274 if (status != PSA_SUCCESS) { in crp_gen_key_secp256r1()
280 status = al_psa_status( in crp_gen_key_secp256r1()
284 if (status != PSA_SUCCESS) { in crp_gen_key_secp256r1()
302 status = al_psa_status( in crp_gen_key_secp256r1()
305 if (status != PSA_SUCCESS) { in crp_gen_key_secp256r1()
311 return status; in crp_gen_key_secp256r1()
314 return status; in crp_gen_key_secp256r1()
335 psa_status_t status; in crp_generate_csr() local
358 status = al_psa_status(psa_crypto_init(), __func__); in crp_generate_csr()
359 if (status != PSA_SUCCESS) { in crp_generate_csr()
396 status = al_psa_status( in crp_generate_csr()
402 if (status != PSA_SUCCESS) { in crp_generate_csr()
424 status = al_psa_status( in crp_generate_csr()
429 if (status != PSA_SUCCESS) { in crp_generate_csr()
435 status = al_psa_status( in crp_generate_csr()
438 if (status != PSA_SUCCESS) { in crp_generate_csr()
451 status = mbedtls_x509write_csr_set_subject_name(&req, "O=Linaro,CN=Device Certificate"); in crp_generate_csr()
452 if (status != 0) { in crp_generate_csr()
453 LOG_ERR("failed! mbedtls_x509write_csr_set_subject_name returned %d", status); in crp_generate_csr()
463 status = mbedtls_pk_setup_opaque(&pk_key_container, key_handle); in crp_generate_csr()
464 if (status != 0) { in crp_generate_csr()
465 LOG_ERR("failed! mbedtls_pk_setup_opaque returned -0x%04x", (unsigned int) -status); in crp_generate_csr()
477 status = mbedtls_x509write_csr_pem(&req, output_buf, sizeof(output_buf), in crp_generate_csr()
479 if (status < 0) { in crp_generate_csr()
481 (unsigned int) -status); in crp_generate_csr()
499 status = json_obj_encode_buf(csr_json_descr, ARRAY_SIZE(csr_json_descr), in crp_generate_csr()
502 if (status != 0) { in crp_generate_csr()
503 LOG_ERR("failed! json_obj_encode_buf returned 0x%04x", status); in crp_generate_csr()
516 status = al_psa_status( in crp_generate_csr()
519 if (status != PSA_SUCCESS) { in crp_generate_csr()
543 psa_status_t status; in crp_hash_payload() local
554 status = al_psa_status(psa_hash_setup(&hash_handle, alg), in crp_hash_payload()
556 if (status != PSA_SUCCESS) { in crp_hash_payload()
564 status = al_psa_status(psa_hash_update(&hash_handle, msg, msg_len), in crp_hash_payload()
566 if (status != PSA_SUCCESS) { in crp_hash_payload()
572 status = al_psa_status(psa_hash_finish(&hash_handle, in crp_hash_payload()
575 if (status != PSA_SUCCESS) { in crp_hash_payload()
583 return status; in crp_hash_payload()
587 return status; in crp_hash_payload()
605 psa_status_t status; in crp_sign_hash() local
612 status = al_psa_status( in crp_sign_hash()
615 if (status != PSA_SUCCESS) { in crp_sign_hash()
621 status = al_psa_status( in crp_sign_hash()
627 if (status != PSA_SUCCESS) { in crp_sign_hash()
641 status = al_psa_status( in crp_sign_hash()
644 if (status != PSA_SUCCESS) { in crp_sign_hash()
649 return status; in crp_sign_hash()
652 return status; in crp_sign_hash()
669 psa_status_t status; in crp_verify_sign() local
676 status = al_psa_status( in crp_verify_sign()
679 if (status != PSA_SUCCESS) { in crp_verify_sign()
685 status = al_psa_status( in crp_verify_sign()
691 if (status != PSA_SUCCESS) { in crp_verify_sign()
700 status = al_psa_status( in crp_verify_sign()
703 if (status != PSA_SUCCESS) { in crp_verify_sign()
708 return status; in crp_verify_sign()
711 return status; in crp_verify_sign()
721 psa_status_t status; in crp_dest_key() local
725 status = al_psa_status( in crp_dest_key()
728 if (status != PSA_SUCCESS) { in crp_dest_key()
734 status = al_psa_status( in crp_dest_key()
737 if (status != PSA_SUCCESS) { in crp_dest_key()
745 return status; in crp_dest_key()
748 return status; in crp_dest_key()
753 psa_status_t status; in crp_test() local
783 status = al_psa_status(psa_crypto_init(), __func__); in crp_test()
784 if (status != PSA_SUCCESS) { in crp_test()
828 status = crp_imp_key_secp256r1(1, in crp_test()
833 status = crp_gen_key_secp256r1(1, in crp_test()
839 status = crp_hash_payload(msg, strlen(msg), in crp_test()
843 status = crp_sign_hash(1, in crp_test()
848 status = crp_verify_sign(1, hash, hash_len, sig, sig_len); in crp_test()
851 status = crp_dest_key(1); in crp_test()
859 psa_status_t status; in crp_test_rng() local
867 status = al_psa_status(psa_generate_random(outbuf, 256), __func__); in crp_test_rng()