Home
last modified time | relevance | path

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

12

/net-tools-3.7.0/mbedtls-2.4.0/library/
Derror.c153 void mbedtls_strerror( int ret, char *buf, size_t buflen ) in mbedtls_strerror() argument
158 if( buflen == 0 ) in mbedtls_strerror()
161 memset( buf, 0x00, buflen ); in mbedtls_strerror()
175 mbedtls_snprintf( buf, buflen, "CIPHER - The selected feature is not available" ); in mbedtls_strerror()
177 mbedtls_snprintf( buf, buflen, "CIPHER - Bad input parameters to function" ); in mbedtls_strerror()
179 mbedtls_snprintf( buf, buflen, "CIPHER - Failed to allocate memory" ); in mbedtls_strerror()
181 … mbedtls_snprintf( buf, buflen, "CIPHER - Input data contains invalid padding and is rejected" ); in mbedtls_strerror()
183 mbedtls_snprintf( buf, buflen, "CIPHER - Decryption of block requires a full block" ); in mbedtls_strerror()
185 mbedtls_snprintf( buf, buflen, "CIPHER - Authentication failed (for AEAD modes)" ); in mbedtls_strerror()
187 … mbedtls_snprintf( buf, buflen, "CIPHER - The context is invalid, eg because it was free()ed" ); in mbedtls_strerror()
[all …]
Dx509_csr.c95 const unsigned char *buf, size_t buflen ) in mbedtls_x509_csr_parse_der() argument
107 if( csr == NULL || buf == NULL || buflen == 0 ) in mbedtls_x509_csr_parse_der()
115 p = mbedtls_calloc( 1, len = buflen ); in mbedtls_x509_csr_parse_der()
120 memcpy( p, buf, buflen ); in mbedtls_x509_csr_parse_der()
266 int mbedtls_x509_csr_parse( mbedtls_x509_csr *csr, const unsigned char *buf, size_t buflen ) in mbedtls_x509_csr_parse() argument
277 if( csr == NULL || buf == NULL || buflen == 0 ) in mbedtls_x509_csr_parse()
284 if( buf[buflen - 1] != '\0' ) in mbedtls_x509_csr_parse()
297 if( ( ret = mbedtls_x509_csr_parse_der( csr, pem.buf, pem.buflen ) ) != 0 ) in mbedtls_x509_csr_parse()
310 return( mbedtls_x509_csr_parse_der( csr, buf, buflen ) ); in mbedtls_x509_csr_parse()
Dx509_crl.c256 const unsigned char *buf, size_t buflen ) in mbedtls_x509_crl_parse_der() argument
297 if( ( p = mbedtls_calloc( 1, buflen ) ) == NULL ) in mbedtls_x509_crl_parse_der()
300 memcpy( p, buf, buflen ); in mbedtls_x509_crl_parse_der()
303 crl->raw.len = buflen; in mbedtls_x509_crl_parse_der()
305 end = p + buflen; in mbedtls_x509_crl_parse_der()
490 int mbedtls_x509_crl_parse( mbedtls_x509_crl *chain, const unsigned char *buf, size_t buflen ) in mbedtls_x509_crl_parse() argument
507 if( buflen == 0 || buf[buflen - 1] != '\0' ) in mbedtls_x509_crl_parse()
522 buflen -= use_len; in mbedtls_x509_crl_parse()
526 pem.buf, pem.buflen ) ) != 0 ) in mbedtls_x509_crl_parse()
541 while( is_pem && buflen > 1 ); in mbedtls_x509_crl_parse()
[all …]
Dpem.c138 unsigned char *buf, size_t buflen, in pem_des_decrypt() argument
149 mbedtls_des_crypt_cbc( &des_ctx, MBEDTLS_DES_DECRYPT, buflen, in pem_des_decrypt()
160 unsigned char *buf, size_t buflen, in pem_des3_decrypt() argument
171 mbedtls_des3_crypt_cbc( &des3_ctx, MBEDTLS_DES_DECRYPT, buflen, in pem_des3_decrypt()
184 unsigned char *buf, size_t buflen, in pem_aes_decrypt() argument
195 mbedtls_aes_crypt_cbc( &aes_ctx, MBEDTLS_AES_DECRYPT, buflen, in pem_aes_decrypt()
381 ctx->buflen = len; in mbedtls_pem_read_buffer()
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()
105 return( syscall( SYS_getrandom, buf, buflen, flags ) ); in getrandom_wrapper()
Dx509_crt.c663 size_t buflen ) in x509_crt_parse_der_core() argument
682 len = buflen; in x509_crt_parse_der_core()
920 size_t buflen ) in mbedtls_x509_crt_parse_der() argument
952 if( ( ret = x509_crt_parse_der_core( crt, buf, buflen ) ) != 0 ) in mbedtls_x509_crt_parse_der()
970 int mbedtls_x509_crt_parse( mbedtls_x509_crt *chain, const unsigned char *buf, size_t buflen ) in mbedtls_x509_crt_parse() argument
988 if( buflen != 0 && buf[buflen - 1] == '\0' && in mbedtls_x509_crt_parse()
995 return mbedtls_x509_crt_parse_der( chain, buf, buflen ); in mbedtls_x509_crt_parse()
997 return mbedtls_x509_crt_parse_der( chain, buf, buflen ); in mbedtls_x509_crt_parse()
1007 while( buflen > 1 ) in mbedtls_x509_crt_parse()
1023 buflen -= use_len; in mbedtls_x509_crt_parse()
[all …]
/net-tools-3.7.0/libcoap/tests/
Dtest_wellknown.c31 size_t buflen, offset, ofs; in t_wellknown1() local
49 buflen = sizeof(buf); in t_wellknown1()
51 result = coap_print_link(r, buf, &buflen, &ofs); in t_wellknown1()
54 CU_ASSERT(buflen == sizeof(teststr)); in t_wellknown1()
60 buflen = sizeof(buf); in t_wellknown1()
61 result = coap_print_link(r, buf, &buflen, &ofs); in t_wellknown1()
64 CU_ASSERT(buflen == sizeof(teststr)); in t_wellknown1()
67 buflen = sizeof(buf); in t_wellknown1()
68 ofs = buflen; in t_wellknown1()
69 result = coap_print_link(r, buf, &buflen, &ofs); in t_wellknown1()
[all …]
Dtest_uri.c147 size_t buflen = sizeof(buf); in t_parse_uri7() local
173 result = coap_split_path(uri.path.s, uri.path.length, buf, &buflen); in t_parse_uri7()
175 CU_ASSERT(buflen == sizeof(checkbuf)); in t_parse_uri7()
176 CU_ASSERT_NSTRING_EQUAL(buf, checkbuf, buflen); in t_parse_uri7()
240 size_t buflen = sizeof(buf); in t_parse_uri11() local
266 result = coap_split_path(uri.path.s, uri.path.length, buf, &buflen); in t_parse_uri11()
268 CU_ASSERT(buflen == sizeof(checkbuf)); in t_parse_uri11()
269 CU_ASSERT_NSTRING_EQUAL(buf, checkbuf, buflen); in t_parse_uri11()
281 size_t buflen = sizeof(buf); in t_parse_uri12() local
303 result = coap_split_path(uri.path.s, uri.path.length, buf, &buflen); in t_parse_uri12()
[all …]
/net-tools-3.7.0/mbedtls-2.4.0/scripts/data_files/
Derror.fmt46 void mbedtls_strerror( int ret, char *buf, size_t buflen )
51 if( buflen == 0 )
54 memset( buf, 0x00, buflen );
70 mbedtls_snprintf( buf, buflen, "UNKNOWN ERROR CODE (%04X)", use_ret );
85 if( buflen - len < 5 )
88 mbedtls_snprintf( buf + len, buflen - len, " : " );
91 buflen -= len + 3;
103 mbedtls_snprintf( buf, buflen, "UNKNOWN ERROR CODE (%04X)", use_ret );
113 void mbedtls_strerror( int ret, char *buf, size_t buflen )
117 if( buflen > 0 )
/net-tools-3.7.0/libcoap/src/
Duri.c265 unsigned char *buf, size_t buflen) { in make_decoded_option() argument
269 if (!buflen) { in make_decoded_option()
279 written = coap_opt_setheader(buf, buflen, 0, res); in make_decoded_option()
281 assert(written <= buflen); in make_decoded_option()
287 buflen -= written; in make_decoded_option()
289 if (buflen < (size_t)res) { in make_decoded_option()
375 unsigned char *buf, size_t *buflen) { in coap_split_path() argument
376 struct cnt_str tmp = { { *buflen, buf }, 0 }; in coap_split_path()
380 *buflen = *buflen - tmp.buf.length; in coap_split_path()
387 unsigned char *buf, size_t *buflen) { in coap_split_query() argument
[all …]
Ddebug.c122 unsigned char *result, unsigned int buflen, int encode_always ) { in print_readable() argument
127 if (buflen == 0) { /* there is nothing we can do here but return */ in print_readable()
133 if (cnt+1 < buflen) { /* keep one byte for terminating zero */ in print_readable()
140 if (cnt+4 < buflen) { /* keep one byte for terminating zero */ in print_readable()
331 unsigned char *result, unsigned int buflen) { in print_content_format() argument
352 return snprintf((char *)result, buflen, "%s", formats[i].name); in print_content_format()
357 return snprintf((char *)result, buflen, "%d", format_type); in print_content_format()
/net-tools-3.7.0/tinydtls-0.8.2/examples/contiki/
Ddtls-client.c69 static size_t buflen = 0; variable
92 res = dtls_write(ctx, dst, (uint8 *)buf, buflen); in try_send()
94 memmove(buf, buf + res, buflen - res); in try_send()
95 buflen -= res; in try_send()
320 register size_t len = min(strlen(data), sizeof(buf) - buflen); in PROCESS_THREAD()
321 memcpy(buf + buflen, data, len); in PROCESS_THREAD()
322 buflen += len; in PROCESS_THREAD()
323 if (buflen < sizeof(buf) - 1) in PROCESS_THREAD()
324 buf[buflen++] = '\n'; /* serial event does not contain LF */ in PROCESS_THREAD()
327 if (buflen) { in PROCESS_THREAD()
/net-tools-3.7.0/mbedtls-2.4.0/programs/pkey/
Ddh_server.c75 size_t n, buflen; in main() local
218 buflen = n + 2 + rsa.len; in main()
219 buf2[0] = (unsigned char)( buflen >> 8 ); in main()
220 buf2[1] = (unsigned char)( buflen ); in main()
223 ( ret = mbedtls_net_send( &client_fd, buf, buflen ) ) != (int) buflen ) in main()
Ddh_client.c75 size_t n, buflen; in main() local
166 n = buflen = ( buf[0] << 8 ) | buf[1]; in main()
167 if( buflen < 1 || buflen > sizeof( buf ) ) in main()
184 p = buf, end = buf + buflen; in main()
/net-tools-3.7.0/libcoap/include/coap/
Duri.h99 size_t *buflen);
119 size_t *buflen);
/net-tools-3.7.0/
Decho-server.c134 static int receive(int fd, unsigned char *buf, int buflen, in receive() argument
140 ret = recvfrom(fd, buf, buflen, 0, addr, addrlen); in receive()
146 ret = read(fd, buf, buflen); in receive()
159 static int reply(int fd, unsigned char *buf, int buflen, in reply() argument
165 ret = sendto(fd, buf, buflen, 0, addr, addrlen); in reply()
173 ret = write(fd, buf + sent, buflen - sent); in reply()
178 } while (sent < buflen); in reply()
189 unsigned char *buf, int buflen, int proto, in udp_receive_and_reply() argument
197 ret = receive(fd_recv, buf, buflen, in udp_receive_and_reply()
218 unsigned char *buf, int buflen, int proto) in tcp_receive_and_reply() argument
[all …]
/net-tools-3.7.0/mbedtls-2.4.0/include/mbedtls/
Dx509_crl.h109 const unsigned char *buf, size_t buflen );
122 int mbedtls_x509_crl_parse( mbedtls_x509_crl *chain, const unsigned char *buf, size_t buflen );
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 );
Derror.h101 void mbedtls_strerror( int errnum, char *buffer, size_t buflen );
Dbignum.h339 char *buf, size_t buflen, size_t *olen );
380 int mbedtls_mpi_read_binary( mbedtls_mpi *X, const unsigned char *buf, size_t buflen );
394 int mbedtls_mpi_write_binary( const mbedtls_mpi *X, unsigned char *buf, size_t buflen );
Dpem.h56 size_t buflen; /*!< length of the buffer */ member
Dx509_crt.h174 size_t buflen );
191 int mbedtls_x509_crt_parse( mbedtls_x509_crt *chain, const unsigned char *buf, size_t buflen );
/net-tools-3.7.0/libcoap/examples/contiki/
Dcoap-observer.c150 size_t buflen; in PROCESS_THREAD() local
153 buflen = BUFSIZE; in PROCESS_THREAD()
155 res = coap_split_path(uri.path.s, uri.path.length, buf, &buflen); in PROCESS_THREAD()
/net-tools-3.7.0/tinydtls-0.8.2/
Dcrypto.c188 unsigned char *buf, size_t buflen) { in dtls_p_hash() argument
211 while (len + dlen < buflen) { in dtls_p_hash()
239 memcpy(buf, tmp, buflen - len); in dtls_p_hash()
245 return buflen; in dtls_p_hash()
253 unsigned char *buf, size_t buflen) { in dtls_prf() argument
256 memset(buf, 0, buflen); in dtls_prf()
262 buf, buflen); in dtls_prf()
/net-tools-3.7.0/mbedtls-2.4.0/tests/suites/
Dtest_suite_mpi.function84 size_t buflen;
93 buflen = mbedtls_mpi_size( &X );
94 if( buflen > (size_t) output_size )
95 buflen = (size_t) output_size;
97 TEST_ASSERT( mbedtls_mpi_write_binary( &X, buf, buflen ) == result );
100 hexify( str, buf, buflen );
117 size_t buflen;
134 buflen = mbedtls_mpi_size( &X );
135 TEST_ASSERT( mbedtls_mpi_write_binary( &X, buf, buflen ) == 0 );
137 hexify( str, buf, buflen );

12