Home
last modified time | relevance | path

Searched refs:msg_len (Results 1 – 9 of 9) sorted by relevance

/net-tools-3.6.0/mbedtls-2.4.0/tests/suites/
Dtest_suite_ccm.function38 void ccm_lengths( int msg_len, int iv_len, int add_len, int tag_len, int res )
61 TEST_ASSERT( mbedtls_ccm_encrypt_and_tag( &ctx, msg_len, iv, iv_len, add, add_len,
64 decrypt_ret = mbedtls_ccm_auth_decrypt( &ctx, msg_len, iv, iv_len, add, add_len,
89 size_t key_len, msg_len, iv_len, add_len, tag_len, result_len;
100 msg_len = unhexify( msg, msg_hex );
104 tag_len = result_len - msg_len;
109 TEST_ASSERT( mbedtls_ccm_encrypt_and_tag( &ctx, msg_len, iv, iv_len, add, add_len,
110 msg, msg, msg + msg_len, tag_len ) == 0 );
135 size_t key_len, msg_len, iv_len, add_len, result_len;
148 msg_len = unhexify( msg, msg_hex );
[all …]
Dtest_suite_pkcs1_v21.function22 size_t msg_len;
39 msg_len = unhexify( message_str, message_hex_string );
41 …ls_rsa_pkcs1_encrypt( &ctx, &rnd_buffer_rand, &info, MBEDTLS_RSA_PUBLIC, msg_len, message_str, out…
125 size_t msg_len;
156 msg_len = unhexify( message_str, message_hex_string );
159 …TEST_ASSERT( mbedtls_md( mbedtls_md_info_from_type( digest ), message_str, msg_len, hash_result ) …
185 size_t msg_len;
199 msg_len = unhexify( message_str, message_hex_string );
203 …TEST_ASSERT( mbedtls_md( mbedtls_md_info_from_type( digest ), message_str, msg_len, hash_result ) …
227 size_t msg_len, hash_len;
[all …]
Dtest_suite_pkcs1_v15.function22 size_t msg_len;
39 msg_len = unhexify( message_str, message_hex_string );
41 …ls_rsa_pkcs1_encrypt( &ctx, &rnd_buffer_rand, &info, MBEDTLS_RSA_PUBLIC, msg_len, message_str, out…
125 size_t msg_len;
156 msg_len = unhexify( message_str, message_hex_string );
159 …TEST_ASSERT( mbedtls_md( mbedtls_md_info_from_type( digest ), message_str, msg_len, hash_result ) …
185 size_t msg_len;
199 msg_len = unhexify( message_str, message_hex_string );
203 …TEST_ASSERT( mbedtls_md( mbedtls_md_info_from_type( digest ), message_str, msg_len, hash_result ) …
Dtest_suite_pk.function126 int msg_len;
141 msg_len = unhexify( message_str, message_hex_string );
145 …TEST_ASSERT( mbedtls_md( mbedtls_md_info_from_type( digest ), message_str, msg_len, hash_result ) …
169 int msg_len;
185 msg_len = unhexify( message_str, message_hex_string );
191 message_str, msg_len, hash_result ) == 0 );
196 memcpy( hash_result, message_str, msg_len );
197 hash_len = msg_len;
288 size_t msg_len, olen, res_len;
298 msg_len = unhexify( message, message_hex );
[all …]
Dtest_suite_rsa.function30 int msg_len;
59 msg_len = unhexify( message_str, message_hex_string );
62 …TEST_ASSERT( mbedtls_md( mbedtls_md_info_from_type( digest ), message_str, msg_len, hash_result ) …
87 int msg_len;
100 msg_len = unhexify( message_str, message_hex_string );
104 …TEST_ASSERT( mbedtls_md( mbedtls_md_info_from_type( digest ), message_str, msg_len, hash_result ) …
247 size_t msg_len;
263 msg_len = unhexify( message_str, message_hex_string );
265 …sa_pkcs1_encrypt( &ctx, &rnd_pseudo_rand, &rnd_info, MBEDTLS_RSA_PUBLIC, msg_len, message_str, out…
288 size_t msg_len;
[all …]
/net-tools-3.6.0/mbedtls-2.4.0/library/
Dccm.c386 static const size_t msg_len[NB_TESTS] = { 4, 16, 24 }; variable
422 ret = mbedtls_ccm_encrypt_and_tag( &ctx, msg_len[i], in mbedtls_ccm_self_test()
425 out + msg_len[i], tag_len[i] ); in mbedtls_ccm_self_test()
428 memcmp( out, res[i], msg_len[i] + tag_len[i] ) != 0 ) in mbedtls_ccm_self_test()
436 ret = mbedtls_ccm_auth_decrypt( &ctx, msg_len[i], in mbedtls_ccm_self_test()
439 res[i] + msg_len[i], tag_len[i] ); in mbedtls_ccm_self_test()
442 memcmp( out, msg, msg_len[i] ) != 0 ) in mbedtls_ccm_self_test()
Dssl_srv.c1075 size_t msg_len, ciph_len, sess_len, comp_len, ext_len; local
1190 msg_len = ( ssl->in_len[0] << 8 ) | ssl->in_len[1];
1196 msg_len = ssl->in_hslen;
1201 if( msg_len > MBEDTLS_SSL_MAX_CONTENT_LEN )
1207 if( ( ret = mbedtls_ssl_fetch_input( ssl, mbedtls_ssl_hdr_len( ssl ) + msg_len ) ) != 0 )
1216 ssl->next_record_offset = msg_len + mbedtls_ssl_hdr_len( ssl );
1224 MBEDTLS_SSL_DEBUG_BUF( 4, "record contents", buf, msg_len );
1226 ssl->handshake->update_checksum( ssl, buf, msg_len );
1236 if( msg_len < mbedtls_ssl_hs_hdr_len( ssl ) )
1255 msg_len != mbedtls_ssl_hs_hdr_len( ssl ) + ( ( buf[2] << 8 ) | buf[3] ) )
[all …]
Dssl_tls.c2929 size_t msg_len = ssl->in_hslen - 12; /* Without headers */ in ssl_reassemble_dtls_handshake() local
2945 msg_len ) ); in ssl_reassemble_dtls_handshake()
2954 alloc_len = 12 + msg_len + msg_len / 8 + ( msg_len % 8 != 0 ); in ssl_reassemble_dtls_handshake()
2981 bitmask = msg + msg_len; in ssl_reassemble_dtls_handshake()
2993 if( frag_off + frag_len > msg_len ) in ssl_reassemble_dtls_handshake()
2996 frag_off, frag_len, msg_len ) ); in ssl_reassemble_dtls_handshake()
3017 if( ssl_bitmask_check( bitmask, msg_len ) != 0 ) in ssl_reassemble_dtls_handshake()
/net-tools-3.6.0/libcoap/src/
Dnet.c854 size_t msg_len; in coap_handle_message() local
861 coap_packet_get_memmapped(packet, &msg, &msg_len); in coap_handle_message()
863 if (msg_len < sizeof(coap_hdr_t)) { in coap_handle_message()
885 node->pdu = coap_pdu_init(0, 0, 0, msg_len); in coap_handle_message()
891 if (!coap_pdu_parse(msg, msg_len, node->pdu)) { in coap_handle_message()