Home
last modified time | relevance | path

Searched refs:buflen (Results 1 – 25 of 35) sorted by relevance

12

/mbedtls-development/library/
A Dentropy_poll.c96 static int getrandom_wrapper( void *buf, size_t buflen, unsigned int flags ) in getrandom_wrapper() argument
101 memset( buf, 0, buflen ); in getrandom_wrapper()
104 return( syscall( SYS_getrandom, buf, buflen, flags ) ); in getrandom_wrapper()
116 static int getrandom_wrapper( void *buf, size_t buflen, unsigned int flags ) in getrandom_wrapper() argument
118 return getrandom( buf, buflen, flags ); in getrandom_wrapper()
138 static int sysctl_arnd_wrapper( unsigned char *buf, size_t buflen ) in sysctl_arnd_wrapper() argument
146 while( buflen > 0 ) in sysctl_arnd_wrapper()
148 len = buflen > 256 ? 256 : buflen; in sysctl_arnd_wrapper()
151 buflen -= len; in sysctl_arnd_wrapper()
A Dx509_csr.c86 const unsigned char *buf, size_t buflen ) in mbedtls_x509_csr_parse_der() argument
98 if( csr == NULL || buf == NULL || buflen == 0 ) in mbedtls_x509_csr_parse_der()
106 p = mbedtls_calloc( 1, len = buflen ); in mbedtls_x509_csr_parse_der()
111 memcpy( p, buf, buflen ); in mbedtls_x509_csr_parse_der()
257 int mbedtls_x509_csr_parse( mbedtls_x509_csr *csr, const unsigned char *buf, size_t buflen ) in mbedtls_x509_csr_parse() argument
268 if( csr == NULL || buf == NULL || buflen == 0 ) in mbedtls_x509_csr_parse()
273 if( buf[buflen - 1] == '\0' ) in mbedtls_x509_csr_parse()
293 ret = mbedtls_x509_csr_parse_der( csr, pem.buf, pem.buflen ); in mbedtls_x509_csr_parse()
301 return( mbedtls_x509_csr_parse_der( csr, buf, buflen ) ); in mbedtls_x509_csr_parse()
A Dx509_crl.c296 const unsigned char *buf, size_t buflen ) in mbedtls_x509_crl_parse_der() argument
337 if( buflen == 0 ) in mbedtls_x509_crl_parse_der()
340 p = mbedtls_calloc( 1, buflen ); in mbedtls_x509_crl_parse_der()
344 memcpy( p, buf, buflen ); in mbedtls_x509_crl_parse_der()
347 crl->raw.len = buflen; in mbedtls_x509_crl_parse_der()
349 end = p + buflen; in mbedtls_x509_crl_parse_der()
551 if( buflen == 0 || buf[buflen - 1] != '\0' ) in mbedtls_x509_crl_parse()
566 buflen -= use_len; in mbedtls_x509_crl_parse()
570 pem.buf, pem.buflen ) ) != 0 ) in mbedtls_x509_crl_parse()
586 while( is_pem && buflen > 1 ); in mbedtls_x509_crl_parse()
[all …]
A Dpem.c139 unsigned char *buf, size_t buflen, in pem_des_decrypt() argument
153 ret = mbedtls_des_crypt_cbc( &des_ctx, MBEDTLS_DES_DECRYPT, buflen, in pem_des_decrypt()
167 unsigned char *buf, size_t buflen, in pem_des3_decrypt() argument
181 ret = mbedtls_des3_crypt_cbc( &des3_ctx, MBEDTLS_DES_DECRYPT, buflen, in pem_des3_decrypt()
197 unsigned char *buf, size_t buflen, in pem_aes_decrypt() argument
211 ret = mbedtls_aes_crypt_cbc( &aes_ctx, MBEDTLS_AES_DECRYPT, buflen, in pem_aes_decrypt()
414 ctx->buflen = len; in mbedtls_pem_read_buffer()
423 mbedtls_platform_zeroize( ctx->buf, ctx->buflen ); in mbedtls_pem_free()
A Dmps_reader.c236 mbedtls_mps_size_t *buflen ) in mbedtls_mps_reader_get() argument
345 if( buflen != NULL ) in mbedtls_mps_reader_get()
346 *buflen = desired; in mbedtls_mps_reader_get()
373 if( buflen == NULL ) in mbedtls_mps_reader_get()
395 if( buflen != NULL ) in mbedtls_mps_reader_get()
396 *buflen = desired; in mbedtls_mps_reader_get()
A Dmps_reader.h296 mbedtls_mps_size_t buflen );
359 mbedtls_mps_size_t *buflen );
A Dbignum.c649 char *p_end = *p + buflen; in mpi_write_hlp()
653 if( length >= buflen ) in mpi_write_hlp()
711 if( buflen < n ) in mbedtls_mpi_write_string()
723 buflen--; in mbedtls_mpi_write_string()
953 for( i = 0; i < buflen; i++ ) in mbedtls_mpi_read_binary_le()
984 if( buflen != 0 ) in mbedtls_mpi_read_binary()
1012 if( stored_bytes < buflen ) in mbedtls_mpi_write_binary_le()
1018 bytes_to_copy = buflen; in mbedtls_mpi_write_binary_le()
1032 if( stored_bytes < buflen ) in mbedtls_mpi_write_binary_le()
1057 if( stored_bytes < buflen ) in mbedtls_mpi_write_binary()
[all …]
A Dssl_tls13_generic.c39 size_t *buflen ) in mbedtls_ssl_tls1_3_fetch_handshake_msg() argument
67 *buflen = ssl->in_hslen - 4; in mbedtls_ssl_tls1_3_fetch_handshake_msg()
996 size_t buflen; in mbedtls_ssl_tls13_process_finished_message() local
1005 &buf, &buflen ) ); in mbedtls_ssl_tls13_process_finished_message()
1006 MBEDTLS_SSL_PROC_CHK( ssl_tls13_parse_finished_message( ssl, buf, buf + buflen ) ); in mbedtls_ssl_tls13_process_finished_message()
1008 ssl, MBEDTLS_SSL_HS_FINISHED, buf, buflen ); in mbedtls_ssl_tls13_process_finished_message()
A Dx509_crt.c1087 size_t buflen, in x509_crt_parse_der_core() argument
1109 len = buflen; in x509_crt_parse_der_core()
1402 size_t buflen ) in mbedtls_x509_crt_parse_der_nocopy() argument
1409 size_t buflen, in mbedtls_x509_crt_parse_der_with_ext_cb() argument
1419 size_t buflen ) in mbedtls_x509_crt_parse_der() argument
1430 size_t buflen ) in mbedtls_x509_crt_parse() argument
1448 if( buflen != 0 && buf[buflen - 1] == '\0' && in mbedtls_x509_crt_parse()
1457 return mbedtls_x509_crt_parse_der( chain, buf, buflen ); in mbedtls_x509_crt_parse()
1467 while( buflen > 1 ) in mbedtls_x509_crt_parse()
1483 buflen -= use_len; in mbedtls_x509_crt_parse()
[all …]
A Decp.c724 unsigned char *buf, size_t buflen ) in mbedtls_ecp_point_write_binary() argument
742 if( buflen < *olen ) in mbedtls_ecp_point_write_binary()
756 if( buflen < 1 ) in mbedtls_ecp_point_write_binary()
769 if( buflen < *olen ) in mbedtls_ecp_point_write_binary()
780 if( buflen < *olen ) in mbedtls_ecp_point_write_binary()
3061 const unsigned char *buf, size_t buflen ) in mbedtls_ecp_read_key() argument
3081 if( buflen != ECP_CURVE25519_KEY_SIZE ) in mbedtls_ecp_read_key()
3105 if( buflen != ECP_CURVE448_KEY_SIZE ) in mbedtls_ecp_read_key()
3144 unsigned char *buf, size_t buflen ) in mbedtls_ecp_write_key() argument
3156 if( buflen < ECP_CURVE25519_KEY_SIZE ) in mbedtls_ecp_write_key()
[all …]
A Dpkparse.c1240 pem.buf, pem.buflen ) ) != 0 ) in mbedtls_pk_parse_key()
1271 pem.buf, pem.buflen, in mbedtls_pk_parse_key()
1299 pem.buf, pem.buflen, f_rng, p_rng ) ) != 0 ) in mbedtls_pk_parse_key()
1321 if( ( ret = pk_parse_key_pkcs8_encrypted_der( pk, pem.buf, pem.buflen, in mbedtls_pk_parse_key()
1461 if ( ( ret = pk_get_rsapubkey( &p, p + pem.buflen, mbedtls_pk_rsa( *ctx ) ) ) != 0 ) in mbedtls_pk_parse_public_key()
1490 ret = mbedtls_pk_parse_subpubkey( &p, p + pem.buflen, ctx ); in mbedtls_pk_parse_public_key()
A Dsha512.c535 int i, j, k, buflen, ret = 0; in mbedtls_sha512_self_test() local
568 memset( buf, 'a', buflen = 1000 ); in mbedtls_sha512_self_test()
572 ret = mbedtls_sha512_update( &ctx, buf, buflen ); in mbedtls_sha512_self_test()
A Dssl_tls13_keys.h204 unsigned char *dstbuf, size_t buflen );
/mbedtls-development/scripts/data_files/
A Derror.fmt85 void mbedtls_strerror( int ret, char *buf, size_t buflen )
92 if( buflen == 0 )
95 memset( buf, 0x00, buflen );
110 mbedtls_snprintf( buf, buflen, "%s", high_level_error_description );
132 if( buflen - len < 5 )
135 mbedtls_snprintf( buf + len, buflen - len, " : " );
138 buflen -= len + 3;
145 mbedtls_snprintf( buf, buflen, "UNKNOWN ERROR CODE (%04X)", (unsigned int) use_ret );
147 mbedtls_snprintf( buf, buflen, "%s", low_level_error_description );
155 void mbedtls_strerror( int ret, char *buf, size_t buflen )
[all …]
/mbedtls-development/programs/pkey/
A Ddh_server.c76 size_t n, buflen; in main() local
234 buflen = n + 2 + rsa.MBEDTLS_PRIVATE(len); in main()
235 buf2[0] = (unsigned char)( buflen >> 8 ); in main()
236 buf2[1] = (unsigned char)( buflen ); in main()
239 ( ret = mbedtls_net_send( &client_fd, buf, buflen ) ) != (int) buflen ) in main()
A Ddh_client.c76 size_t n, buflen; in main() local
165 n = buflen = ( buf[0] << 8 ) | buf[1]; in main()
166 if( buflen < 1 || buflen > sizeof( buf ) ) in main()
183 p = buf, end = buf + buflen; in main()
/mbedtls-development/tests/suites/
A Dtest_suite_shax.function26 size_t const buflen = sizeof( buf );
34 mbedtls_sha256( buf, buflen,
75 size_t const buflen = sizeof( buf );
83 mbedtls_sha512( buf, buflen,
A Dtest_suite_mpi.function226 size_t buflen;
234 buflen = mbedtls_mpi_size( &X );
235 if( buflen > (size_t) output_size )
236 buflen = (size_t) output_size;
243 buflen, input_A->len ) == 0 );
258 size_t buflen;
266 buflen = mbedtls_mpi_size( &X );
267 if( buflen > (size_t) output_size )
268 buflen = (size_t) output_size;
289 size_t buflen;
[all …]
/mbedtls-development/include/mbedtls/
A Dbignum.h441 char *buf, size_t buflen, size_t *olen );
499 size_t buflen );
514 const unsigned char *buf, size_t buflen );
532 size_t buflen );
550 unsigned char *buf, size_t buflen );
A Dx509_crl.h120 const unsigned char *buf, size_t buflen );
133 int mbedtls_x509_crl_parse( mbedtls_x509_crl *chain, const unsigned char *buf, size_t buflen );
A Dx509_csr.h95 const unsigned char *buf, size_t buflen );
109 int mbedtls_x509_csr_parse( mbedtls_x509_csr *csr, const unsigned char *buf, size_t buflen );
A Dx509_crt.h417 size_t buflen );
498 size_t buflen,
532 size_t buflen );
564 int mbedtls_x509_crt_parse( mbedtls_x509_crt *chain, const unsigned char *buf, size_t buflen );
A Decp.h753 unsigned char *buf, size_t buflen );
1236 const unsigned char *buf, size_t buflen );
1255 unsigned char *buf, size_t buflen );
A Derror.h178 void mbedtls_strerror( int errnum, char *buffer, size_t buflen );
A Dpem.h67 size_t MBEDTLS_PRIVATE(buflen); /*!< length of the buffer */

Completed in 40 milliseconds

12