Home
last modified time | relevance | path

Searched refs:ret (Results 1 – 25 of 317) sorted by relevance

12345678910>>...13

/optee_os/lib/libmbedtls/mbedtls/library/
H A Dpkparse.c111 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in pk_group_from_specified() local
119 if ((ret = mbedtls_asn1_get_int(&p, end, &ver)) != 0) { in pk_group_from_specified()
120 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_PK_KEY_INVALID_FORMAT, ret); in pk_group_from_specified()
133 if ((ret = mbedtls_asn1_get_tag(&p, end, &len, in pk_group_from_specified()
135 return ret; in pk_group_from_specified()
148 if ((ret = mbedtls_asn1_get_tag(&p, end_field, &len, MBEDTLS_ASN1_OID)) != 0) { in pk_group_from_specified()
149 return ret; in pk_group_from_specified()
160 if ((ret = mbedtls_asn1_get_mpi(&p, end_field, &grp->P)) != 0) { in pk_group_from_specified()
161 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_PK_KEY_INVALID_FORMAT, ret); in pk_group_from_specified()
180 if ((ret = mbedtls_asn1_get_tag(&p, end, &len, in pk_group_from_specified()
[all …]
H A Dpkcs7.c43 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in pkcs7_get_next_content_len() local
45 ret = mbedtls_asn1_get_tag(p, end, len, MBEDTLS_ASN1_CONSTRUCTED in pkcs7_get_next_content_len()
47 if (ret != 0) { in pkcs7_get_next_content_len()
48 ret = MBEDTLS_ERROR_ADD(MBEDTLS_ERR_PKCS7_INVALID_CONTENT_INFO, ret); in pkcs7_get_next_content_len()
50 ret = MBEDTLS_ERROR_ADD(MBEDTLS_ERR_PKCS7_INVALID_CONTENT_INFO, in pkcs7_get_next_content_len()
54 return ret; in pkcs7_get_next_content_len()
63 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in pkcs7_get_version() local
65 ret = mbedtls_asn1_get_int(p, end, ver); in pkcs7_get_version()
66 if (ret != 0) { in pkcs7_get_version()
67 ret = MBEDTLS_ERROR_ADD(MBEDTLS_ERR_PKCS7_INVALID_VERSION, ret); in pkcs7_get_version()
[all …]
H A Dx509_csr.c47 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in x509_csr_get_version() local
49 if ((ret = mbedtls_asn1_get_int(p, end, ver)) != 0) { in x509_csr_get_version()
50 if (ret == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG) { in x509_csr_get_version()
55 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_X509_INVALID_VERSION, ret); in x509_csr_get_version()
69 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in x509_csr_parse_extensions() local
79 if ((ret = mbedtls_asn1_get_tag(p, end, &len, in x509_csr_parse_extensions()
81 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_X509_INVALID_EXTENSIONS, ret); in x509_csr_parse_extensions()
87 if ((ret = mbedtls_asn1_get_tag(p, end_ext_data, &extn_oid.len, in x509_csr_parse_extensions()
89 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_X509_INVALID_EXTENSIONS, ret); in x509_csr_parse_extensions()
97 if ((ret = mbedtls_asn1_get_bool(p, end_ext_data, &is_critical)) != 0 && in x509_csr_parse_extensions()
[all …]
H A Dentropy.c90 int idx, ret = 0; in mbedtls_entropy_add_source() local
93 if ((ret = mbedtls_mutex_lock(&ctx->mutex)) != 0) { in mbedtls_entropy_add_source()
94 return ret; in mbedtls_entropy_add_source()
100 ret = MBEDTLS_ERR_ENTROPY_MAX_SOURCES; in mbedtls_entropy_add_source()
118 return ret; in mbedtls_entropy_add_source()
131 int ret = 0; in entropy_update() local
134 if ((ret = mbedtls_md(mbedtls_md_info_from_type(MBEDTLS_ENTROPY_MD), in entropy_update()
151 ret = mbedtls_md_setup(&ctx->accumulator, in entropy_update()
153 if (ret != 0) { in entropy_update()
156 ret = mbedtls_md_starts(&ctx->accumulator); in entropy_update()
[all …]
H A Dchachapoly.c97 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_chachapoly_setkey() local
99 ret = mbedtls_chacha20_setkey(&ctx->chacha20_ctx, key); in mbedtls_chachapoly_setkey()
101 return ret; in mbedtls_chachapoly_setkey()
108 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_chachapoly_starts() local
112 ret = mbedtls_chacha20_starts(&ctx->chacha20_ctx, nonce, 0U); in mbedtls_chachapoly_starts()
113 if (ret != 0) { in mbedtls_chachapoly_starts()
123 ret = mbedtls_chacha20_update(&ctx->chacha20_ctx, sizeof(poly1305_key), in mbedtls_chachapoly_starts()
125 if (ret != 0) { in mbedtls_chachapoly_starts()
129 ret = mbedtls_poly1305_starts(&ctx->poly1305_ctx, poly1305_key); in mbedtls_chachapoly_starts()
131 if (ret == 0) { in mbedtls_chachapoly_starts()
[all …]
H A Dssl_tls13_keys.c227 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in ssl_tls13_make_traffic_key() local
229 ret = mbedtls_ssl_tls13_hkdf_expand_label( in ssl_tls13_make_traffic_key()
235 if (ret != 0) { in ssl_tls13_make_traffic_key()
236 return ret; in ssl_tls13_make_traffic_key()
239 ret = mbedtls_ssl_tls13_hkdf_expand_label( in ssl_tls13_make_traffic_key()
245 return ret; in ssl_tls13_make_traffic_key()
271 int ret = 0; in mbedtls_ssl_tls13_make_traffic_keys() local
273 ret = ssl_tls13_make_traffic_key( in mbedtls_ssl_tls13_make_traffic_keys()
277 if (ret != 0) { in mbedtls_ssl_tls13_make_traffic_keys()
278 return ret; in mbedtls_ssl_tls13_make_traffic_keys()
[all …]
H A Dx509_crl.c55 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in x509_crl_get_version() local
57 if ((ret = mbedtls_asn1_get_int(p, end, ver)) != 0) { in x509_crl_get_version()
58 if (ret == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG) { in x509_crl_get_version()
63 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_X509_INVALID_VERSION, ret); in x509_crl_get_version()
80 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in x509_get_crl_ext() local
90 if ((ret = mbedtls_x509_get_ext(p, end, ext, 0)) != 0) { in x509_get_crl_ext()
91 return ret; in x509_get_crl_ext()
108 if ((ret = mbedtls_asn1_get_tag(p, end, &len, in x509_get_crl_ext()
110 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_X509_INVALID_EXTENSIONS, ret); in x509_get_crl_ext()
116 if ((ret = mbedtls_asn1_get_tag(p, end_ext_data, &len, in x509_get_crl_ext()
[all …]
H A Dssl_tls13_server.c190 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in ssl_tls13_offered_psks_check_identity_match_ticket() local
219 ret = ssl->conf->f_ticket_parse(ssl->conf->p_ticket, in ssl_tls13_offered_psks_check_identity_match_ticket()
222 switch (ret) { in ssl_tls13_offered_psks_check_identity_match_ticket()
224 ret = SSL_TLS1_3_PSK_IDENTITY_MATCH; in ssl_tls13_offered_psks_check_identity_match_ticket()
229 ret = SSL_TLS1_3_PSK_IDENTITY_MATCH_BUT_PSK_NOT_USABLE; in ssl_tls13_offered_psks_check_identity_match_ticket()
234 ret = SSL_TLS1_3_PSK_IDENTITY_DOES_NOT_MATCH; in ssl_tls13_offered_psks_check_identity_match_ticket()
238 MBEDTLS_SSL_DEBUG_RET(1, "ticket_parse", ret); in ssl_tls13_offered_psks_check_identity_match_ticket()
239 ret = SSL_TLS1_3_PSK_IDENTITY_DOES_NOT_MATCH; in ssl_tls13_offered_psks_check_identity_match_ticket()
245 if (ret != SSL_TLS1_3_PSK_IDENTITY_MATCH) { in ssl_tls13_offered_psks_check_identity_match_ticket()
253 ret = SSL_TLS1_3_PSK_IDENTITY_MATCH_BUT_PSK_NOT_USABLE; in ssl_tls13_offered_psks_check_identity_match_ticket()
[all …]
H A Ddhm.c45 int ret, n; in dhm_read_bignum() local
58 if ((ret = mbedtls_mpi_read_binary(X, *p, n)) != 0) { in dhm_read_bignum()
59 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_DHM_READ_PARAMS_FAILED, ret); in dhm_read_bignum()
82 int ret = 0; in dhm_check_range() local
90 ret = MBEDTLS_ERR_DHM_BAD_INPUT_DATA; in dhm_check_range()
95 return ret; in dhm_check_range()
150 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_dhm_read_params() local
152 if ((ret = dhm_read_bignum(&ctx->P, p, end)) != 0 || in mbedtls_dhm_read_params()
153 (ret = dhm_read_bignum(&ctx->G, p, end)) != 0 || in mbedtls_dhm_read_params()
154 (ret = dhm_read_bignum(&ctx->GY, p, end)) != 0) { in mbedtls_dhm_read_params()
[all …]
H A Dssl_tls13_client.c186 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in ssl_tls13_reset_key_share() local
192 ret = PSA_TO_MBEDTLS_ERR(status); in ssl_tls13_reset_key_share()
193 MBEDTLS_SSL_DEBUG_RET(1, "psa_destroy_key", ret); in ssl_tls13_reset_key_share()
194 return ret; in ssl_tls13_reset_key_share()
216 int ret = MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE; in ssl_tls13_get_default_group_id() local
247 return ret; in ssl_tls13_get_default_group_id()
273 int ret = MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE; in ssl_tls13_write_key_share_ext() local
318 ret = mbedtls_ssl_tls13_generate_and_write_xxdh_key_exchange( in ssl_tls13_write_key_share_ext()
321 if (ret != 0) { in ssl_tls13_write_key_share_ext()
323 return ret; in ssl_tls13_write_key_share_ext()
[all …]
H A Dx509.c48 if ((ret = (code)) != 0) { \
49 return ret; \
56 return ret; \
66 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_x509_get_serial() local
81 if ((ret = mbedtls_asn1_get_len(p, end, &serial->len)) != 0) { in mbedtls_x509_get_serial()
82 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_X509_INVALID_SERIAL, ret); in mbedtls_x509_get_serial()
100 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_x509_get_alg_null() local
102 if ((ret = mbedtls_asn1_get_alg_null(p, end, alg)) != 0) { in mbedtls_x509_get_alg_null()
103 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_X509_INVALID_ALG, ret); in mbedtls_x509_get_alg_null()
115 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_x509_get_alg() local
[all …]
H A Dcmac.c99 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in cmac_generate_subkeys() local
108 if ((ret = mbedtls_cipher_update(ctx, L, block_size, L, &olen)) != 0) { in cmac_generate_subkeys()
115 if ((ret = cmac_multiply_by_u(K1, L, block_size)) != 0) { in cmac_generate_subkeys()
119 if ((ret = cmac_multiply_by_u(K2, K1, block_size)) != 0) { in cmac_generate_subkeys()
126 return ret; in cmac_generate_subkeys()
211 int ret = 0; in mbedtls_cipher_cmac_update() local
237 if ((ret = mbedtls_cipher_update(ctx, state, block_size, state, in mbedtls_cipher_cmac_update()
255 if ((ret = mbedtls_cipher_update(ctx, state, block_size, state, in mbedtls_cipher_cmac_update()
273 return ret; in mbedtls_cipher_cmac_update()
284 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_cipher_cmac_finish() local
[all …]
H A Dhmac_drbg.c51 int ret = MBEDTLS_ERR_MD_BAD_INPUT_DATA; in mbedtls_hmac_drbg_update() local
55 if ((ret = mbedtls_md_hmac_reset(&ctx->md_ctx)) != 0) { in mbedtls_hmac_drbg_update()
58 if ((ret = mbedtls_md_hmac_update(&ctx->md_ctx, in mbedtls_hmac_drbg_update()
62 if ((ret = mbedtls_md_hmac_update(&ctx->md_ctx, in mbedtls_hmac_drbg_update()
67 if ((ret = mbedtls_md_hmac_update(&ctx->md_ctx, in mbedtls_hmac_drbg_update()
72 if ((ret = mbedtls_md_hmac_finish(&ctx->md_ctx, K)) != 0) { in mbedtls_hmac_drbg_update()
77 if ((ret = mbedtls_md_hmac_starts(&ctx->md_ctx, K, md_len)) != 0) { in mbedtls_hmac_drbg_update()
80 if ((ret = mbedtls_md_hmac_update(&ctx->md_ctx, in mbedtls_hmac_drbg_update()
84 if ((ret = mbedtls_md_hmac_finish(&ctx->md_ctx, ctx->V)) != 0) { in mbedtls_hmac_drbg_update()
91 return ret; in mbedtls_hmac_drbg_update()
[all …]
H A Dpkcs5.c44 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in pkcs5_parse_pbkdf2_params() local
62 if ((ret = mbedtls_asn1_get_tag(&p, end, &salt->len, in pkcs5_parse_pbkdf2_params()
64 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_PKCS5_INVALID_FORMAT, ret); in pkcs5_parse_pbkdf2_params()
70 if ((ret = mbedtls_asn1_get_int(&p, end, iterations)) != 0) { in pkcs5_parse_pbkdf2_params()
71 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_PKCS5_INVALID_FORMAT, ret); in pkcs5_parse_pbkdf2_params()
78 if ((ret = mbedtls_asn1_get_int(&p, end, keylen)) != 0) { in pkcs5_parse_pbkdf2_params()
79 if (ret != MBEDTLS_ERR_ASN1_UNEXPECTED_TAG) { in pkcs5_parse_pbkdf2_params()
80 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_PKCS5_INVALID_FORMAT, ret); in pkcs5_parse_pbkdf2_params()
88 if ((ret = mbedtls_asn1_get_alg_null(&p, end, &prf_alg_oid)) != 0) { in pkcs5_parse_pbkdf2_params()
89 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_PKCS5_INVALID_FORMAT, ret); in pkcs5_parse_pbkdf2_params()
[all …]
/optee_os/core/arch/arm/plat-k3/drivers/
H A Dti_sci.c97 TEE_Result ret = 0; in ti_sci_do_xfer() local
105 ret = ti_sci_transport_send(txmsg); in ti_sci_do_xfer()
106 if (ret) { in ti_sci_do_xfer()
107 EMSG("Message sending failed (%d)", ret); in ti_sci_do_xfer()
117 ret = ti_sci_transport_recv(rxmsg); in ti_sci_do_xfer()
118 if (ret) { in ti_sci_do_xfer()
119 EMSG("Message receive failed (%d)", ret); in ti_sci_do_xfer()
132 ret = TEE_ERROR_BUSY; in ti_sci_do_xfer()
138 ret = TEE_ERROR_ACCESS_DENIED; in ti_sci_do_xfer()
147 return ret; in ti_sci_do_xfer()
[all …]
/optee_os/core/drivers/
H A Dzynqmp_csu_aes.c70 TEE_Result ret = TEE_SUCCESS; in aes_transfer_enc() local
77 ret = zynqmp_csudma_prepare(); in aes_transfer_enc()
78 if (ret) { in aes_transfer_enc()
80 return ret; in aes_transfer_enc()
84 ret = zynqmp_csudma_transfer(ZYNQMP_CSUDMA_DST_CHANNEL, dst, dst_len, in aes_transfer_enc()
86 if (ret) { in aes_transfer_enc()
93 ret = zynqmp_csudma_transfer(ZYNQMP_CSUDMA_SRC_CHANNEL, in aes_transfer_enc()
96 if (ret) { in aes_transfer_enc()
101 ret = zynqmp_csudma_sync(ZYNQMP_CSUDMA_SRC_CHANNEL); in aes_transfer_enc()
102 if (ret) { in aes_transfer_enc()
[all …]
H A Dstm32mp15_huk.c24 TEE_Result ret = TEE_ERROR_GENERIC; in stm32mp15_read_uid() local
30 ret = stm32_bsec_find_otp_in_nvmem_layout("uid_otp", &otp_idx, &offset, in stm32mp15_read_uid()
32 if (ret) in stm32mp15_read_uid()
33 return ret; in stm32mp15_read_uid()
93 TEE_Result ret = TEE_ERROR_GENERIC; in aes_gcm_encrypt_uid() local
102 ret = stm32mp15_read_uid(uid); in aes_gcm_encrypt_uid()
103 if (ret) in aes_gcm_encrypt_uid()
106 ret = crypto_authenc_alloc_ctx(&ctx, TEE_ALG_AES_GCM); in aes_gcm_encrypt_uid()
107 if (ret) in aes_gcm_encrypt_uid()
110 ret = crypto_authenc_init(ctx, TEE_MODE_ENCRYPT, key, key_len, nonce, in aes_gcm_encrypt_uid()
[all …]
H A Dversal_sha3_384.c24 TEE_Result ret = TEE_SUCCESS; in input_plaintext() local
28 while (src_len && !ret) { in input_plaintext()
35 ret = versal_crypto_request(VERSAL_SHA3_UPDATE, &arg, NULL); in input_plaintext()
36 if (ret) in input_plaintext()
44 return ret; in input_plaintext()
51 TEE_Result ret = TEE_SUCCESS; in get_ciphertext() local
56 ret = versal_crypto_request(VERSAL_SHA3_UPDATE, &arg, NULL); in get_ciphertext()
57 if (!ret) in get_ciphertext()
64 return ret; in get_ciphertext()
70 TEE_Result ret = TEE_ERROR_BAD_PARAMETERS; in versal_sha3_384() local
[all …]
/optee_os/core/lib/libfdt/
H A Dfdt_overlay.c63 int path_len = 0, ret; in overlay_get_target() local
75 ret = fdt_path_offset(fdt, path); in overlay_get_target()
77 ret = path_len; in overlay_get_target()
79 ret = fdt_node_offset_by_phandle(fdt, phandle); in overlay_get_target()
88 if (ret < 0 && path_len == -FDT_ERR_NOTFOUND) in overlay_get_target()
89 ret = -FDT_ERR_BADOVERLAY; in overlay_get_target()
92 if (ret < 0) in overlay_get_target()
93 return ret; in overlay_get_target()
99 return ret; in overlay_get_target()
160 int ret; in overlay_adjust_node_phandles() local
[all …]
/optee_os/core/drivers/crypto/crypto_api/acipher/
H A Drsamgf.c16 TEE_Result ret = TEE_ERROR_GENERIC; in drvcrypt_rsa_mgf1() local
38 ret = crypto_hash_alloc_ctx(&ctx, mgf_data->hash_algo); in drvcrypt_rsa_mgf1()
39 if (ret != TEE_SUCCESS) in drvcrypt_rsa_mgf1()
52 ret = crypto_hash_init(ctx); in drvcrypt_rsa_mgf1()
53 if (ret != TEE_SUCCESS) in drvcrypt_rsa_mgf1()
56 ret = crypto_hash_update(ctx, mgf_data->seed.data, in drvcrypt_rsa_mgf1()
58 if (ret != TEE_SUCCESS) in drvcrypt_rsa_mgf1()
61 ret = crypto_hash_update(ctx, (uint8_t *)&swapcount, in drvcrypt_rsa_mgf1()
63 if (ret != TEE_SUCCESS) in drvcrypt_rsa_mgf1()
66 ret = crypto_hash_final(ctx, cur_mask, mgf_data->digest_size); in drvcrypt_rsa_mgf1()
[all …]
H A Drsa.c20 TEE_Result ret = TEE_ERROR_NOT_IMPLEMENTED; in crypto_acipher_alloc_rsa_keypair() local
32 ret = rsa->alloc_keypair(key, size_bits); in crypto_acipher_alloc_rsa_keypair()
35 ret); in crypto_acipher_alloc_rsa_keypair()
36 return ret; in crypto_acipher_alloc_rsa_keypair()
42 TEE_Result ret = TEE_ERROR_NOT_IMPLEMENTED; in crypto_acipher_alloc_rsa_public_key() local
53 ret = rsa->alloc_publickey(key, size_bits); in crypto_acipher_alloc_rsa_public_key()
56 size_bits, ret); in crypto_acipher_alloc_rsa_public_key()
57 return ret; in crypto_acipher_alloc_rsa_public_key()
88 TEE_Result ret = TEE_ERROR_NOT_IMPLEMENTED; in crypto_acipher_gen_rsa_key() local
99 ret = rsa->gen_keypair(key, size_bits); in crypto_acipher_gen_rsa_key()
[all …]
/optee_os/core/arch/riscv/kernel/
H A Dsbi.c17 struct sbiret ret = { }; in sbi_probe_extension() local
19 ret = sbi_ecall(SBI_EXT_BASE, SBI_EXT_BASE_PROBE_EXT, extid); in sbi_probe_extension()
20 if (!ret.error) in sbi_probe_extension()
21 return ret.value; in sbi_probe_extension()
43 struct sbiret ret = { }; in sbi_dbcn_write_byte() local
45 ret = sbi_ecall(SBI_EXT_DBCN, SBI_EXT_DBCN_CONSOLE_WRITE_BYTE, ch); in sbi_dbcn_write_byte()
46 return ret.error; in sbi_dbcn_write_byte()
60 struct sbiret ret = { }; in sbi_hsm_hart_start() local
62 ret = sbi_ecall(SBI_EXT_HSM, SBI_EXT_HSM_HART_START, hartid, start_addr, in sbi_hsm_hart_start()
65 return ret.error; in sbi_hsm_hart_start()
[all …]
/optee_os/core/drivers/crypto/hisilicon/
H A Dhpre_rsa.c80 enum hisi_drv_status ret = HISI_QM_DRVCRYPT_NO_ERR; in hpre_rsa_do_task() local
90 ret = hisi_qp_send(rsa_qp, msg); in hpre_rsa_do_task()
91 if (ret) { in hpre_rsa_do_task()
92 EMSG("Fail to send task, ret=%x"PRIx32, ret); in hpre_rsa_do_task()
97 ret = hisi_qp_recv_sync(rsa_qp, msg); in hpre_rsa_do_task()
98 if (ret) { in hpre_rsa_do_task()
99 EMSG("Recv task error, ret=%x"PRIx32, ret); in hpre_rsa_do_task()
213 enum hisi_drv_status ret = HISI_QM_DRVCRYPT_NO_ERR; in hpre_rsa_encrypt_bn2bin() local
223 ret = hpre_bin_from_crypto_bin(msg->pubkey, msg->pubkey, in hpre_rsa_encrypt_bn2bin()
225 if (ret) { in hpre_rsa_encrypt_bn2bin()
[all …]
H A Dhpre_ecc.c389 enum hisi_drv_status ret = HISI_QM_DRVCRYPT_NO_ERR; in hpre_ecc_curve_to_hpre_bin() local
391 ret = hpre_bin_from_crypto_bin(p, p, key_bytes, curve_bytes); in hpre_ecc_curve_to_hpre_bin()
392 if (ret) { in hpre_ecc_curve_to_hpre_bin()
394 return ret; in hpre_ecc_curve_to_hpre_bin()
397 ret = hpre_bin_from_crypto_bin(a, a, key_bytes, curve_bytes); in hpre_ecc_curve_to_hpre_bin()
398 if (ret) { in hpre_ecc_curve_to_hpre_bin()
400 return ret; in hpre_ecc_curve_to_hpre_bin()
403 ret = hpre_bin_from_crypto_bin(b, b, key_bytes, curve_bytes); in hpre_ecc_curve_to_hpre_bin()
404 if (ret) { in hpre_ecc_curve_to_hpre_bin()
406 return ret; in hpre_ecc_curve_to_hpre_bin()
[all …]
H A Dhpre_montgomery.c126 TEE_Result ret = TEE_SUCCESS; in gen_random_privkey() local
133 ret = hw_get_random_bytes(priv, key_size); in gen_random_privkey()
134 if (ret) { in gen_random_privkey()
139 return ret; in gen_random_privkey()
187 int ret = 0; in hpre_montgomery_params_pretreatment() local
216 ret = memcmp(u + offset, p + offset, dsize); in hpre_montgomery_params_pretreatment()
217 if (ret >= 0) { in hpre_montgomery_params_pretreatment()
234 enum hisi_drv_status ret = HISI_QM_DRVCRYPT_NO_ERR; in hpre_montgomery_params_fill() local
245 ret = hpre_bin_from_crypto_bin(p, p, msg->key_bytes, msg->curve_bytes); in hpre_montgomery_params_fill()
246 if (ret) { in hpre_montgomery_params_fill()
[all …]

12345678910>>...13