| /optee_os/lib/libmbedtls/mbedtls/library/ |
| H A D | platform.c | 293 int mbedtls_platform_std_nv_seed_read(unsigned char *buf, size_t buf_len) in mbedtls_platform_std_nv_seed_read() argument 305 if ((n = fread(buf, 1, buf_len, file)) != buf_len) { in mbedtls_platform_std_nv_seed_read() 307 mbedtls_platform_zeroize(buf, buf_len); in mbedtls_platform_std_nv_seed_read() 315 int mbedtls_platform_std_nv_seed_write(unsigned char *buf, size_t buf_len) in mbedtls_platform_std_nv_seed_write() argument 327 if ((n = fwrite(buf, 1, buf_len, file)) != buf_len) { in mbedtls_platform_std_nv_seed_write() 342 static int platform_nv_seed_read_uninit(unsigned char *buf, size_t buf_len) in platform_nv_seed_read_uninit() argument 345 ((void) buf_len); in platform_nv_seed_read_uninit() 356 static int platform_nv_seed_write_uninit(unsigned char *buf, size_t buf_len) in platform_nv_seed_write_uninit() argument 359 ((void) buf_len); in platform_nv_seed_write_uninit() 366 int (*mbedtls_nv_seed_read)(unsigned char *buf, size_t buf_len) = [all …]
|
| H A D | ssl_tls13_generic.c | 60 size_t *buf_len) in mbedtls_ssl_tls13_fetch_handshake_msg() argument 86 *buf_len = ssl->in_hslen - 4; in mbedtls_ssl_tls13_fetch_handshake_msg() 356 size_t buf_len; in mbedtls_ssl_tls13_process_certificate_verify() local 362 ssl, MBEDTLS_SSL_HS_CERTIFICATE_VERIFY, &buf, &buf_len)); in mbedtls_ssl_tls13_process_certificate_verify() 393 ssl, buf, buf + buf_len, in mbedtls_ssl_tls13_process_certificate_verify() 398 buf, buf_len)); in mbedtls_ssl_tls13_process_certificate_verify() 711 size_t buf_len; in mbedtls_ssl_tls13_process_certificate() local 715 &buf, &buf_len)); in mbedtls_ssl_tls13_process_certificate() 719 buf + buf_len)); in mbedtls_ssl_tls13_process_certificate() 724 ssl, MBEDTLS_SSL_HS_CERTIFICATE, buf, buf_len)); in mbedtls_ssl_tls13_process_certificate() [all …]
|
| H A D | entropy.c | 499 static int mbedtls_entropy_source_self_test_gather(unsigned char *buf, size_t buf_len) in mbedtls_entropy_source_self_test_gather() argument 504 size_t attempts = buf_len; in mbedtls_entropy_source_self_test_gather() 506 while (attempts > 0 && entropy_len < buf_len) { in mbedtls_entropy_source_self_test_gather() 508 buf_len - entropy_len, &olen)) != 0) { in mbedtls_entropy_source_self_test_gather() 516 if (entropy_len < buf_len) { in mbedtls_entropy_source_self_test_gather() 525 size_t buf_len) in mbedtls_entropy_source_self_test_check_bits() argument 531 for (i = 0; i < buf_len; i++) { in mbedtls_entropy_source_self_test_check_bits()
|
| H A D | ssl_tls13_server.c | 2422 size_t buf_len, msg_len; in ssl_tls13_write_server_hello() local 2429 ssl, MBEDTLS_SSL_HS_SERVER_HELLO, &buf, &buf_len)); in ssl_tls13_write_server_hello() 2432 buf + buf_len, in ssl_tls13_write_server_hello() 2440 ssl, buf_len, msg_len)); in ssl_tls13_write_server_hello() 2495 size_t buf_len, msg_len; in ssl_tls13_write_hello_retry_request() local 2503 &buf, &buf_len)); in ssl_tls13_write_hello_retry_request() 2506 buf + buf_len, in ssl_tls13_write_hello_retry_request() 2513 MBEDTLS_SSL_PROC_CHK(mbedtls_ssl_finish_handshake_msg(ssl, buf_len, in ssl_tls13_write_hello_retry_request() 2614 size_t buf_len, msg_len; in ssl_tls13_write_encrypted_extensions() local 2625 &buf, &buf_len)); in ssl_tls13_write_encrypted_extensions() [all …]
|
| H A D | ssl_tls13_client.c | 2001 size_t buf_len = 0; in ssl_tls13_process_server_hello() local 2007 ssl, MBEDTLS_SSL_HS_SERVER_HELLO, &buf, &buf_len)); in ssl_tls13_process_server_hello() 2009 ret = ssl_tls13_preprocess_server_hello(ssl, buf, buf + buf_len); in ssl_tls13_process_server_hello() 2022 buf + buf_len, in ssl_tls13_process_server_hello() 2029 ssl, MBEDTLS_SSL_HS_SERVER_HELLO, buf, buf_len)); in ssl_tls13_process_server_hello() 2194 size_t buf_len; in ssl_tls13_process_encrypted_extensions() local 2201 &buf, &buf_len)); in ssl_tls13_process_encrypted_extensions() 2205 ssl_tls13_parse_encrypted_extensions(ssl, buf, buf + buf_len)); in ssl_tls13_process_encrypted_extensions() 2268 buf, buf_len)); in ssl_tls13_process_encrypted_extensions() 2306 size_t buf_len; in ssl_tls13_write_end_of_early_data() local [all …]
|
| H A D | ssl_msg.c | 944 || rec->buf_len < rec->data_offset in mbedtls_ssl_encrypt_buf() 945 || rec->buf_len - rec->data_offset < rec->data_len in mbedtls_ssl_encrypt_buf() 957 post_avail = rec->buf_len - (rec->data_len + rec->data_offset); in mbedtls_ssl_encrypt_buf() 1029 post_avail = rec->buf_len - (rec->data_len + rec->data_offset); in mbedtls_ssl_encrypt_buf() 1203 data, rec->buf_len - (data - rec->buf), in mbedtls_ssl_encrypt_buf() 1216 … data, rec->buf_len - (size_t) (data - rec->buf), /* dst */ in mbedtls_ssl_encrypt_buf() 1514 rec->buf_len < rec->data_offset || in mbedtls_ssl_decrypt_buf() 1515 rec->buf_len - rec->data_offset < rec->data_len) { in mbedtls_ssl_decrypt_buf() 1630 data, rec->buf_len - (data - rec->buf), in mbedtls_ssl_decrypt_buf() 1644 data, rec->buf_len - (size_t) (data - rec->buf), &olen, /* dst */ in mbedtls_ssl_decrypt_buf() [all …]
|
| H A D | ssl_client.c | 919 size_t buf_len, msg_len, binders_len; in mbedtls_ssl_write_client_hello() local 927 &buf, &buf_len)); in mbedtls_ssl_write_client_hello() 930 buf + buf_len, in mbedtls_ssl_write_client_hello() 990 buf_len, in mbedtls_ssl_write_client_hello()
|
| H A D | pem.c | 503 unsigned char *buf, size_t buf_len, size_t *olen) in mbedtls_pem_write_buffer() argument 512 if (use_len + add_len > buf_len) { in mbedtls_pem_write_buffer() 548 memset(buf + *olen, 0, buf_len - *olen); in mbedtls_pem_write_buffer()
|
| H A D | ssl_tls.c | 3454 size_t buf_len) in ssl_tls12_session_save() argument 3474 if (used <= buf_len) { in ssl_tls12_session_save() 3490 if (used <= buf_len) { in ssl_tls12_session_save() 3515 if (used <= buf_len) { in ssl_tls12_session_save() 3528 if (used <= buf_len) { in ssl_tls12_session_save() 3537 if (used <= buf_len) { in ssl_tls12_session_save() 3553 if (used <= buf_len) { in ssl_tls12_session_save() 3572 if (used <= buf_len) { in ssl_tls12_session_save() 3586 if (used <= buf_len) { in ssl_tls12_session_save() 3594 if (used <= buf_len) { in ssl_tls12_session_save() [all …]
|
| H A D | ssl_tls13_keys.h | 116 unsigned char *buf, size_t buf_len);
|
| H A D | ctr_drbg.c | 183 size_t buf_len, use_len; in block_cipher_df() local 206 buf_len = MBEDTLS_CTR_DRBG_BLOCKSIZE + 8 + data_len + 1; in block_cipher_df() 233 use_len = buf_len; in block_cipher_df()
|
| H A D | ssl_misc.h | 1238 size_t buf_len; /* Buffer length */ member 1469 unsigned char **buf, size_t *buf_len); 1485 size_t buf_len, size_t msg_len); 2151 size_t *buf_len); 2810 size_t buf_len); 2887 unsigned char *obuf, size_t buf_len, size_t *olen);
|
| H A D | ssl_tls13_keys.c | 145 unsigned char *buf, size_t buf_len) in mbedtls_ssl_tls13_hkdf_expand_label() argument 166 if (buf_len > MBEDTLS_SSL_TLS1_3_KEY_SCHEDULE_MAX_EXPANSION_LEN) { in mbedtls_ssl_tls13_hkdf_expand_label() 175 ssl_tls13_hkdf_encode_label(buf_len, in mbedtls_ssl_tls13_hkdf_expand_label() 207 buf_len); in mbedtls_ssl_tls13_hkdf_expand_label()
|
| H A D | ssl_tls12_server.c | 3716 size_t buf_len = (size_t) (end - p); in ssl_parse_client_key_exchange() local 3725 if (buf_len < 2) { in ssl_parse_client_key_exchange() 3727 buf_len)); in ssl_parse_client_key_exchange() 3731 if (data_len < 1 || data_len > buf_len) { in ssl_parse_client_key_exchange() 3734 data_len, buf_len)); in ssl_parse_client_key_exchange()
|
| H A D | ecp.c | 850 const unsigned char **buf, size_t buf_len) in mbedtls_ecp_tls_read_point() argument 857 if (buf_len < 2) { in mbedtls_ecp_tls_read_point() 862 if (data_len < 1 || data_len > buf_len - 1) { in mbedtls_ecp_tls_read_point()
|
| /optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ |
| H A D | platform.h | 397 int mbedtls_platform_std_nv_seed_read(unsigned char *buf, size_t buf_len); 398 int mbedtls_platform_std_nv_seed_write(unsigned char *buf, size_t buf_len); 402 extern int (*mbedtls_nv_seed_read)(unsigned char *buf, size_t buf_len); 403 extern int (*mbedtls_nv_seed_write)(unsigned char *buf, size_t buf_len); 415 int (*nv_seed_read_func)(unsigned char *buf, size_t buf_len), 416 int (*nv_seed_write_func)(unsigned char *buf, size_t buf_len)
|
| H A D | pem.h | 153 unsigned char *buf, size_t buf_len, size_t *olen);
|
| H A D | ssl.h | 3430 size_t buf_len, 5636 size_t buf_len,
|
| /optee_os/core/drivers/crypto/hisilicon/ |
| H A D | sec_hash.c | 328 hash_ctx->buf_len = SMALL_BUF_SIZE; in hisi_sec_digest_do_update() 330 hash_ctx->buf_len = ROUNDUP(len, HISI_QM_ALIGN128); in hisi_sec_digest_do_update() 332 hash_ctx->buf_len = MAX_AUTH_LENGTH; in hisi_sec_digest_do_update() 335 hash_ctx->in = malloc(hash_ctx->buf_len); in hisi_sec_digest_do_update() 344 if (hash_ctx->in_len + len <= hash_ctx->buf_len) { in hisi_sec_digest_do_update() 349 left_size = hash_ctx->buf_len - hash_ctx->in_len; in hisi_sec_digest_do_update() 352 hash_ctx->in_len = hash_ctx->buf_len; in hisi_sec_digest_do_update() 463 out_hash_ctx->buf_len = in_hash_ctx->buf_len; in hisi_sec_digest_copy_state() 469 out_hash_ctx->in = malloc(out_hash_ctx->buf_len); in hisi_sec_digest_copy_state() 477 out_hash_ctx->buf_len); in hisi_sec_digest_copy_state()
|
| H A D | sec_hash.h | 36 size_t buf_len; member
|
| /optee_os/ta/pkcs11/src/ |
| H A D | attributes.c | 33 size_t buf_len = sizeof(struct obj_attrs) + (*head)->attrs_size; in add_attribute() local 39 rc = serialize(bstart, &buf_len, &data32, sizeof(uint32_t)); in add_attribute() 44 rc = serialize(bstart, &buf_len, &data32, sizeof(uint32_t)); in add_attribute() 48 rc = serialize(bstart, &buf_len, data, size); in add_attribute()
|
| /optee_os/core/drivers/crypto/se050/core/ |
| H A D | rsa.c | 242 size_t buf_len = src_len; in decrypt_es() local 258 buf = mempool_calloc(mempool_default, 1, buf_len); in decrypt_es() 264 st = sss_se05x_asymmetric_decrypt(&ctx, src, src_len, buf, &buf_len); in decrypt_es() 270 if (buf_len > *dst_len) { in decrypt_es() 271 *dst_len = buf_len; in decrypt_es() 276 *dst_len = buf_len; in decrypt_es() 277 memcpy(dst, buf, buf_len); in decrypt_es()
|