Home
last modified time | relevance | path

Searched refs:buf_len (Results 1 – 17 of 17) sorted by relevance

/openthread-3.5.0/third_party/mbedtls/repo/library/
Dplatform.c283 int mbedtls_platform_std_nv_seed_read( unsigned char *buf, size_t buf_len ) in mbedtls_platform_std_nv_seed_read() argument
291 if( ( n = fread( buf, 1, buf_len, file ) ) != buf_len ) in mbedtls_platform_std_nv_seed_read()
294 mbedtls_platform_zeroize( buf, buf_len ); in mbedtls_platform_std_nv_seed_read()
302 int mbedtls_platform_std_nv_seed_write( unsigned char *buf, size_t buf_len ) in mbedtls_platform_std_nv_seed_write() argument
310 if( ( n = fwrite( buf, 1, buf_len, file ) ) != buf_len ) in mbedtls_platform_std_nv_seed_write()
326 static int platform_nv_seed_read_uninit( unsigned char *buf, size_t buf_len ) in platform_nv_seed_read_uninit() argument
329 ((void) buf_len); in platform_nv_seed_read_uninit()
340 static int platform_nv_seed_write_uninit( unsigned char *buf, size_t buf_len ) in platform_nv_seed_write_uninit() argument
343 ((void) buf_len); in platform_nv_seed_write_uninit()
350 int (*mbedtls_nv_seed_read)( unsigned char *buf, size_t buf_len ) =
[all …]
Dentropy.c559 static int mbedtls_entropy_source_self_test_gather( unsigned char *buf, size_t buf_len ) in mbedtls_entropy_source_self_test_gather() argument
564 size_t attempts = buf_len; in mbedtls_entropy_source_self_test_gather()
566 while( attempts > 0 && entropy_len < buf_len ) in mbedtls_entropy_source_self_test_gather()
569 buf_len - entropy_len, &olen ) ) != 0 ) in mbedtls_entropy_source_self_test_gather()
576 if( entropy_len < buf_len ) in mbedtls_entropy_source_self_test_gather()
586 size_t buf_len ) in mbedtls_entropy_source_self_test_check_bits() argument
592 for( i = 0; i < buf_len; i++ ) in mbedtls_entropy_source_self_test_check_bits()
Dpk_wrap.c973 size_t buf_len ) in pk_ecdsa_sig_asn1_from_psa() argument
978 unsigned char *p = sig + buf_len; in pk_ecdsa_sig_asn1_from_psa()
1014 size_t buf_len; in pk_opaque_sign_wrap()
1028 buf_len = MBEDTLS_ECDSA_MAX_SIG_LEN( psa_get_key_bits( &attributes ) ); in pk_opaque_sign_wrap()
1030 if( buf_len > MBEDTLS_PK_SIGNATURE_MAX_SIZE ) in pk_opaque_sign_wrap()
1035 sig, buf_len, sig_len ); in pk_opaque_sign_wrap()
1040 return( pk_ecdsa_sig_asn1_from_psa( sig, sig_len, buf_len ) ); in pk_opaque_sign_wrap()
Dpem.c435 unsigned char *buf, size_t buf_len, size_t *olen ) in mbedtls_pem_write_buffer() argument
444 if( use_len + add_len > buf_len ) in mbedtls_pem_write_buffer()
482 memset( buf + *olen, 0, buf_len - *olen ); in mbedtls_pem_write_buffer()
Dssl_msg.c628 || rec->buf_len < rec->data_offset in mbedtls_ssl_encrypt_buf()
629 || rec->buf_len - rec->data_offset < rec->data_len in mbedtls_ssl_encrypt_buf()
640 post_avail = rec->buf_len - ( rec->data_len + rec->data_offset ); in mbedtls_ssl_encrypt_buf()
719 post_avail = rec->buf_len - ( rec->data_len + rec->data_offset ); in mbedtls_ssl_encrypt_buf()
905 data, rec->buf_len - (data - rec->buf), /* dst */ in mbedtls_ssl_encrypt_buf()
1134 rec->buf_len < rec->data_offset || in mbedtls_ssl_decrypt_buf()
1135 rec->buf_len - rec->data_offset < rec->data_len ) in mbedtls_ssl_decrypt_buf()
1264 data, rec->buf_len - (data - rec->buf), &olen, /* dst */ in mbedtls_ssl_decrypt_buf()
2739 rec.buf_len = out_buf_len - ( ssl->out_iv - ssl->out_buf ); in mbedtls_ssl_write_record()
3248 unsigned char *obuf, size_t buf_len, size_t *olen ) in ssl_check_dtls_clihlo_cookie() argument
[all …]
Dctr_drbg.c138 size_t buf_len, use_len; in block_cipher_df() local
161 buf_len = MBEDTLS_CTR_DRBG_BLOCKSIZE + 8 + data_len + 1; in block_cipher_df()
179 use_len = buf_len; in block_cipher_df()
Dssl_tls.c5390 size_t buf_len, in ssl_session_save() argument
5413 if( used <= buf_len ) in ssl_session_save()
5427 if( used <= buf_len ) in ssl_session_save()
5446 if( used <= buf_len ) in ssl_session_save()
5476 if( used <= buf_len ) in ssl_session_save()
5492 if( used <= buf_len ) in ssl_session_save()
5504 if( used <= buf_len ) in ssl_session_save()
5519 if( used <= buf_len ) in ssl_session_save()
5542 if( used <= buf_len ) in ssl_session_save()
5549 if( used <= buf_len ) in ssl_session_save()
[all …]
Decp.c1011 const unsigned char **buf, size_t buf_len ) in mbedtls_ecp_tls_read_point() argument
1023 if( buf_len < 2 ) in mbedtls_ecp_tls_read_point()
1027 if( data_len < 1 || data_len > buf_len - 1 ) in mbedtls_ecp_tls_read_point()
/openthread-3.5.0/third_party/mbedtls/repo/include/mbedtls/
Dplatform.h332 int mbedtls_platform_std_nv_seed_read( unsigned char *buf, size_t buf_len );
333 int mbedtls_platform_std_nv_seed_write( unsigned char *buf, size_t buf_len );
337 extern int (*mbedtls_nv_seed_read)( unsigned char *buf, size_t buf_len );
338 extern int (*mbedtls_nv_seed_write)( unsigned char *buf, size_t buf_len );
350 int (*nv_seed_read_func)( unsigned char *buf, size_t buf_len ),
351 int (*nv_seed_write_func)( unsigned char *buf, size_t buf_len )
Dpem.h146 unsigned char *buf, size_t buf_len, size_t *olen );
Dssl.h2593 size_t buf_len,
4274 size_t buf_len,
Dssl_internal.h863 size_t buf_len; /* Buffer length */ member
/openthread-3.5.0/third_party/mbedtls/repo/tests/suites/
Dtest_suite_entropy.function71 int buffer_nv_seed_read( unsigned char *buf, size_t buf_len )
73 if( buf_len != MBEDTLS_ENTROPY_BLOCK_SIZE )
80 int buffer_nv_seed_write( unsigned char *buf, size_t buf_len )
82 if( buf_len != MBEDTLS_ENTROPY_BLOCK_SIZE )
92 static int write_nv_seed( unsigned char *buf, size_t buf_len )
96 if( buf_len != MBEDTLS_ENTROPY_BLOCK_SIZE )
111 int read_nv_seed( unsigned char *buf, size_t buf_len )
115 if( buf_len != MBEDTLS_ENTROPY_BLOCK_SIZE )
442 int (*original_mbedtls_nv_seed_read)( unsigned char *buf, size_t buf_len ) =
444 int (*original_mbedtls_nv_seed_write)( unsigned char *buf, size_t buf_len ) =
Dtest_suite_asn1write.function251 void mbedtls_asn1_write_len( int len, data_t * asn1, int buf_len,
262 p = buf + GUARD_LEN + buf_len;
272 TEST_ASSERT( buf[GUARD_LEN + buf_len + i] == GUARD_VAL );
277 TEST_ASSERT( p + asn1->len == buf + GUARD_LEN + buf_len );
282 ret = mbedtls_asn1_get_len( &p, buf + GUARD_LEN + buf_len, &read_len );
296 TEST_ASSERT( p == buf + GUARD_LEN + buf_len );
Dtest_suite_ssl.function340 \p buf_len.
343 size_t buf_len )
359 return ( message_length > buf_len ) ? buf_len : message_length;
375 size_t buf_len, size_t* msg_len )
383 return ( *msg_len > buf_len ) ? MBEDTLS_TEST_ERROR_MESSAGE_TRUNCATED : 0;
677 int mbedtls_mock_tcp_recv_msg( void *ctx, unsigned char *buf, size_t buf_len )
697 ret = mbedtls_test_message_queue_peek_info( queue, buf_len, &msg_len );
701 drop_len = msg_len - buf_len;
704 msg_len = buf_len;
723 mbedtls_test_message_queue_pop_info( queue, buf_len );
[all …]
/openthread-3.5.0/third_party/mbedtls/repo/programs/ssl/
Dssl_client2.c2729 size_t buf_len; in main() local
2733 ret = mbedtls_ssl_context_save( &ssl, NULL, 0, &buf_len ); in main()
2742 if( ( context_buf = mbedtls_calloc( 1, buf_len ) ) == NULL ) in main()
2749 context_buf_len = buf_len; in main()
2752 buf_len, &buf_len ) ) != 0 ) in main()
2771 mbedtls_base64_encode( NULL, 0, &b64_len, context_buf, buf_len ); in main()
2781 context_buf, buf_len ) ) != 0 ) in main()
2853 buf_len ) ) != 0 ) in main()
Dssl_server2.c3731 size_t buf_len; in main() local
3735 ret = mbedtls_ssl_context_save( &ssl, NULL, 0, &buf_len ); in main()
3744 if( ( context_buf = mbedtls_calloc( 1, buf_len ) ) == NULL ) in main()
3751 context_buf_len = buf_len; in main()
3754 buf_len, &buf_len ) ) != 0 ) in main()
3773 mbedtls_base64_encode( NULL, 0, &b64_len, context_buf, buf_len ); in main()
3783 context_buf, buf_len ) ) != 0 ) in main()
3876 buf_len ) ) != 0 ) in main()