Home
last modified time | relevance | path

Searched refs:NULL (Results 1 – 25 of 295) sorted by relevance

12345678910>>...12

/openthread-3.6.0/third_party/mbedtls/repo/tests/suites/
Dtest_suite_cipher.null.data1 NULL Encrypt and decrypt 0 bytes
3 enc_dec_buf:MBEDTLS_CIPHER_NULL:"NULL":0:0:-1
5 NULL Encrypt and decrypt 1 bytes
7 enc_dec_buf:MBEDTLS_CIPHER_NULL:"NULL":0:1:-1
9 NULL Encrypt and decrypt 2 bytes
11 enc_dec_buf:MBEDTLS_CIPHER_NULL:"NULL":0:2:-1
13 NULL Encrypt and decrypt 7 bytes
15 enc_dec_buf:MBEDTLS_CIPHER_NULL:"NULL":0:7:-1
17 NULL Encrypt and decrypt 8 bytes
19 enc_dec_buf:MBEDTLS_CIPHER_NULL:"NULL":0:8:-1
[all …]
Dtest_suite_rsa.function31 TEST_INVALID_PARAM( mbedtls_rsa_init( NULL, valid_padding, 0 ) );
33 TEST_VALID_PARAM( mbedtls_rsa_free( NULL ) );
35 /* No more variants because only the first argument must be non-NULL. */
37 mbedtls_rsa_import( NULL, NULL, NULL,
38 NULL, NULL, NULL ) );
40 mbedtls_rsa_import_raw( NULL,
41 NULL, 0,
42 NULL, 0,
43 NULL, 0,
44 NULL, 0,
[all …]
Dtest_suite_shax.function10 TEST_VALID_PARAM( mbedtls_sha1_free( NULL ) );
21 TEST_INVALID_PARAM( mbedtls_sha1_init( NULL ) );
23 TEST_INVALID_PARAM( mbedtls_sha1_clone( NULL, &ctx ) );
24 TEST_INVALID_PARAM( mbedtls_sha1_clone( &ctx, NULL ) );
27 mbedtls_sha1_starts_ret( NULL ) );
30 mbedtls_sha1_update_ret( NULL, buf, buflen ) );
32 mbedtls_sha1_update_ret( &ctx, NULL, buflen ) );
35 mbedtls_sha1_finish_ret( NULL, buf ) );
37 mbedtls_sha1_finish_ret( &ctx, NULL ) );
40 mbedtls_internal_sha1_process( NULL, buf ) );
[all …]
Dtest_suite_asn1write.function49 data->output = NULL;
63 generic_write_data_t data = { NULL, NULL, NULL, NULL, 0 };
83 generic_write_data_t data = { NULL, NULL, NULL, NULL, 0 };
103 generic_write_data_t data = { NULL, NULL, NULL, NULL, 0 };
124 generic_write_data_t data = { NULL, NULL, NULL, NULL, 0 };
144 generic_write_data_t data = { NULL, NULL, NULL, NULL, 0 };
171 generic_write_data_t data = { NULL, NULL, NULL, NULL, 0 };
225 generic_write_data_t data = { NULL, NULL, NULL, NULL, 0 };
305 generic_write_data_t data = { NULL, NULL, NULL, NULL, 0 };
333 { {0x06, 0, NULL}, {0, 0, NULL}, NULL, 0 },
[all …]
Dtest_suite_pk.function40 mbedtls_test_rnd_std_rand, NULL,
56 mbedtls_test_rnd_std_rand, NULL );
68 mbedtls_test_rnd_std_rand, NULL, mode,
79 mbedtls_test_rnd_std_rand, NULL, mode,
170 NULL, NULL )
174 NULL, NULL )
210 void *options = NULL;
214 TEST_VALID_PARAM( mbedtls_pk_free( NULL ) );
217 TEST_VALID_PARAM( mbedtls_pk_restart_free( NULL ) );
220 TEST_ASSERT( mbedtls_pk_setup( &pk, NULL ) ==
[all …]
Dtest_suite_memory_buffer_alloc.function15 if( p == NULL )
39 unsigned char *ptr_a = NULL, *ptr_b = NULL, *ptr_c = NULL, *ptr_d = NULL,
40 *ptr_e = NULL, *ptr_f = NULL;
92 ptr_a = NULL;
101 ptr_b = NULL;
110 ptr_c = NULL;
119 ptr_d = NULL;
147 if( ptr_a != NULL )
150 ptr_a = NULL;
154 if( ptr_b != NULL )
[all …]
Dtest_suite_ecdsa.function23 TEST_INVALID_PARAM( mbedtls_ecdsa_init( NULL ) );
24 TEST_VALID_PARAM( mbedtls_ecdsa_free( NULL ) );
27 TEST_INVALID_PARAM( mbedtls_ecdsa_restart_init( NULL ) );
28 TEST_VALID_PARAM( mbedtls_ecdsa_restart_free( NULL ) );
32 mbedtls_ecdsa_sign( NULL, &m, &m, &m,
35 NULL ) );
37 mbedtls_ecdsa_sign( &grp, NULL, &m, &m,
40 NULL ) );
42 mbedtls_ecdsa_sign( &grp, &m, NULL, &m,
45 NULL ) );
[all …]
Dtest_suite_ecdh.function49 TEST_VALID_PARAM( mbedtls_ecdh_free( NULL ) );
63 const unsigned char *buf_null = NULL;
68 TEST_INVALID_PARAM( mbedtls_ecdh_init( NULL ) );
71 TEST_INVALID_PARAM( mbedtls_ecdh_enable_restart( NULL ) );
75 mbedtls_ecdh_gen_public( NULL, &m, &P,
77 NULL ) );
79 mbedtls_ecdh_gen_public( &grp, NULL, &P,
81 NULL ) );
83 mbedtls_ecdh_gen_public( &grp, &m, NULL,
85 NULL ) );
[all …]
Dtest_suite_ecp.function29 TEST_VALID_PARAM( mbedtls_ecp_group_free( NULL ) );
30 TEST_VALID_PARAM( mbedtls_ecp_keypair_free( NULL ) );
31 TEST_VALID_PARAM( mbedtls_ecp_point_free( NULL ) );
34 TEST_VALID_PARAM( mbedtls_ecp_restart_free( NULL ) );
54 const unsigned char *null_buf = NULL;
60 TEST_INVALID_PARAM( mbedtls_ecp_point_init( NULL ) );
61 TEST_INVALID_PARAM( mbedtls_ecp_keypair_init( NULL ) );
62 TEST_INVALID_PARAM( mbedtls_ecp_group_init( NULL ) );
65 TEST_INVALID_PARAM( mbedtls_ecp_restart_init( NULL ) );
66 TEST_INVALID_PARAM( mbedtls_ecp_check_budget( NULL, &restart_ctx, 42 ) );
[all …]
Dtest_suite_dhm.function78 unsigned char *buf_null = NULL;
83 TEST_INVALID_PARAM( mbedtls_dhm_init( NULL ) );
84 TEST_VALID_PARAM( mbedtls_dhm_free( NULL ) );
87 mbedtls_dhm_read_params( NULL,
93 mbedtls_dhm_read_params( &ctx, NULL, buf ) );
97 NULL ) );
100 mbedtls_dhm_make_params( NULL, buflen,
103 NULL ) );
106 NULL, &len,
108 NULL ) );
[all …]
Dtest_suite_md.function31 TEST_ASSERT( info != NULL );
51 TEST_ASSERT( mbedtls_md_get_size( NULL ) == 0 );
52 TEST_ASSERT( mbedtls_md_get_type( NULL ) == MBEDTLS_MD_NONE );
53 TEST_ASSERT( mbedtls_md_get_name( NULL ) == NULL );
55 TEST_ASSERT( mbedtls_md_info_from_string( NULL ) == NULL );
57 TEST_ASSERT( mbedtls_md_setup( &ctx, NULL, 0 ) == MBEDTLS_ERR_MD_BAD_INPUT_DATA );
58 TEST_ASSERT( mbedtls_md_setup( NULL, info, 0 ) == MBEDTLS_ERR_MD_BAD_INPUT_DATA );
60 TEST_ASSERT( mbedtls_md_starts( NULL ) == MBEDTLS_ERR_MD_BAD_INPUT_DATA );
63 TEST_ASSERT( mbedtls_md_update( NULL, buf, 1 ) == MBEDTLS_ERR_MD_BAD_INPUT_DATA );
66 TEST_ASSERT( mbedtls_md_finish( NULL, buf ) == MBEDTLS_ERR_MD_BAD_INPUT_DATA );
[all …]
/openthread-3.6.0/third_party/mbedtls/repo/library/
Dpk.c57 PK_VALIDATE( ctx != NULL ); in mbedtls_pk_init()
59 ctx->pk_info = NULL; in mbedtls_pk_init()
60 ctx->pk_ctx = NULL; in mbedtls_pk_init()
68 if( ctx == NULL ) in mbedtls_pk_free()
71 if ( ctx->pk_info != NULL ) in mbedtls_pk_free()
83 PK_VALIDATE( ctx != NULL ); in mbedtls_pk_restart_init()
84 ctx->pk_info = NULL; in mbedtls_pk_restart_init()
85 ctx->rs_ctx = NULL; in mbedtls_pk_restart_init()
93 if( ctx == NULL || ctx->pk_info == NULL || in mbedtls_pk_restart_free()
94 ctx->pk_info->rs_free_func == NULL ) in mbedtls_pk_restart_free()
[all …]
Dcipher_wrap.c93 if( ctx != NULL ) in gcm_ctx_alloc()
112 if( ctx != NULL ) in ccm_ctx_alloc()
214 if( aes == NULL ) in aes_ctx_alloc()
215 return( NULL ); in aes_ctx_alloc()
244 NULL,
247 NULL,
447 if( xts_ctx != NULL ) in xts_aes_ctx_alloc()
457 if( xts_ctx == NULL ) in xts_aes_ctx_free()
466 NULL,
468 NULL,
[all …]
Decdsa.c85 if( ctx == NULL ) in ecdsa_restart_ver_free()
127 if( ctx == NULL ) in ecdsa_restart_sig_free()
161 if( ctx == NULL ) in ecdsa_restart_det_free()
170 #define ECDSA_RS_ECP ( rs_ctx == NULL ? NULL : &rs_ctx->ecp )
179 if( rs_ctx != NULL && rs_ctx->ecp.depth++ == 0 ) \
184 rs_ctx != NULL && rs_ctx->SUB == NULL ) \
187 if( rs_ctx->SUB == NULL ) \
197 if( rs_ctx != NULL && rs_ctx->SUB != NULL && \
202 rs_ctx->SUB = NULL; \
205 if( rs_ctx != NULL ) \
[all …]
Doid.c55 if( p == NULL || oid == NULL ) return( NULL ); \
56 while( cur->asn1 != NULL ) { \
64 return( NULL ); \
75 if( data == NULL ) return( MBEDTLS_ERR_OID_NOT_FOUND ); \
88 if( data == NULL ) return( MBEDTLS_ERR_OID_NOT_FOUND ); \
103 if( data == NULL ) return( MBEDTLS_ERR_OID_NOT_FOUND ); \
117 while( cur->descriptor.asn1 != NULL ) { \
138 while( cur->descriptor.asn1 != NULL ) { \
236 { NULL, 0, NULL, NULL },
237 NULL,
[all …]
Dpkwrite.c82 if ( ( ret = mbedtls_rsa_export( rsa, NULL, NULL, NULL, NULL, &T ) ) != 0 || in pk_write_rsa_pubkey()
88 if ( ( ret = mbedtls_rsa_export( rsa, &T, NULL, NULL, NULL, NULL ) ) != 0 || in pk_write_rsa_pubkey()
182 PK_VALIDATE_RET( p != NULL ); in mbedtls_pk_write_pubkey()
183 PK_VALIDATE_RET( *p != NULL ); in mbedtls_pk_write_pubkey()
184 PK_VALIDATE_RET( start != NULL ); in mbedtls_pk_write_pubkey()
185 PK_VALIDATE_RET( key != NULL ); in mbedtls_pk_write_pubkey()
233 PK_VALIDATE_RET( key != NULL ); in mbedtls_pk_write_pubkey_der()
236 PK_VALIDATE_RET( buf != NULL ); in mbedtls_pk_write_pubkey_der()
319 PK_VALIDATE_RET( key != NULL ); in mbedtls_pk_write_key_der()
322 PK_VALIDATE_RET( buf != NULL ); in mbedtls_pk_write_key_der()
[all …]
Drsa.c83 RSA_VALIDATE_RET( ctx != NULL ); in mbedtls_rsa_import()
85 if( ( N != NULL && ( ret = mbedtls_mpi_copy( &ctx->N, N ) ) != 0 ) || in mbedtls_rsa_import()
86 ( P != NULL && ( ret = mbedtls_mpi_copy( &ctx->P, P ) ) != 0 ) || in mbedtls_rsa_import()
87 ( Q != NULL && ( ret = mbedtls_mpi_copy( &ctx->Q, Q ) ) != 0 ) || in mbedtls_rsa_import()
88 ( D != NULL && ( ret = mbedtls_mpi_copy( &ctx->D, D ) ) != 0 ) || in mbedtls_rsa_import()
89 ( E != NULL && ( ret = mbedtls_mpi_copy( &ctx->E, E ) ) != 0 ) ) in mbedtls_rsa_import()
94 if( N != NULL ) in mbedtls_rsa_import()
108 RSA_VALIDATE_RET( ctx != NULL ); in mbedtls_rsa_import_raw()
110 if( N != NULL ) in mbedtls_rsa_import_raw()
116 if( P != NULL ) in mbedtls_rsa_import_raw()
[all …]
Drsa_internal.c88 if( P == NULL || Q == NULL || P->p != NULL || Q->p != NULL ) in mbedtls_rsa_deduce_primes()
162 MBEDTLS_MPI_CHK( mbedtls_mpi_div_mpi( Q, NULL, N, P ) ); in mbedtls_rsa_deduce_primes()
205 if( D == NULL || mbedtls_mpi_cmp_int( D, 0 ) != 0 ) in mbedtls_rsa_deduce_private_exponent()
227 MBEDTLS_MPI_CHK( mbedtls_mpi_div_mpi( &K, NULL, &K, D ) ); in mbedtls_rsa_deduce_private_exponent()
254 if( DP != NULL ) in mbedtls_rsa_validate_crt()
256 if( P == NULL ) in mbedtls_rsa_validate_crt()
274 if( DQ != NULL ) in mbedtls_rsa_validate_crt()
276 if( Q == NULL ) in mbedtls_rsa_validate_crt()
294 if( QP != NULL ) in mbedtls_rsa_validate_crt()
296 if( P == NULL || Q == NULL ) in mbedtls_rsa_validate_crt()
[all …]
Dmemory_buffer_alloc.c111 while( cur != NULL ) in debug_chain()
120 while( cur != NULL ) in debug_chain()
154 if( hdr->prev != NULL && hdr->prev == hdr->next ) in verify_header()
162 if( hdr->prev_free != NULL && hdr->prev_free == hdr->next_free ) in verify_header()
177 if( prv == NULL || verify_header( prv ) != 0 ) in verify_chain()
186 if( heap.first->prev != NULL ) in verify_chain()
197 while( cur != NULL ) in verify_chain()
235 if( heap.buf == NULL || heap.first == NULL ) in buffer_alloc_calloc()
236 return( NULL ); in buffer_alloc_calloc()
241 return( NULL ); in buffer_alloc_calloc()
[all …]
Dcipher.c106 for( def = mbedtls_cipher_definitions; def->info != NULL; def++ ) in mbedtls_cipher_info_from_type()
110 return( NULL ); in mbedtls_cipher_info_from_type()
118 if( NULL == cipher_name ) in mbedtls_cipher_info_from_string()
119 return( NULL ); in mbedtls_cipher_info_from_string()
121 for( def = mbedtls_cipher_definitions; def->info != NULL; def++ ) in mbedtls_cipher_info_from_string()
125 return( NULL ); in mbedtls_cipher_info_from_string()
135 for( def = mbedtls_cipher_definitions; def->info != NULL; def++ ) in mbedtls_cipher_info_from_values()
141 return( NULL ); in mbedtls_cipher_info_from_values()
146 CIPHER_VALIDATE( ctx != NULL ); in mbedtls_cipher_init()
152 if( ctx == NULL ) in mbedtls_cipher_free()
[all …]
Dssl_cache.c57 mbedtls_time_t t = mbedtls_time( NULL ); in mbedtls_ssl_cache_get()
68 entry = NULL; in mbedtls_ssl_cache_get()
70 while( cur != NULL ) in mbedtls_ssl_cache_get()
100 if( entry->peer_cert.p != NULL ) in mbedtls_ssl_cache_get()
107 sizeof(mbedtls_x509_crt) ) ) == NULL ) in mbedtls_ssl_cache_get()
118 session->peer_cert = NULL; in mbedtls_ssl_cache_get()
142 mbedtls_time_t t = mbedtls_time( NULL ), oldest = 0; in mbedtls_ssl_cache_set()
143 mbedtls_ssl_cache_entry *old = NULL; in mbedtls_ssl_cache_set()
155 prv = NULL; in mbedtls_ssl_cache_set()
157 while( cur != NULL ) in mbedtls_ssl_cache_set()
[all …]
Decp.c252 ret = mbedtls_ctr_drbg_seed( ctx, ecp_ctr_drbg_null_entropy, NULL, in ecp_drbg_seed()
326 ctx->T = NULL; in ecp_restart_rsm_init()
342 if( ctx == NULL ) in ecp_restart_rsm_free()
347 if( ctx->T != NULL ) in ecp_restart_rsm_free()
391 if( ctx == NULL ) in ecp_restart_ma_free()
405 ECP_VALIDATE( ctx != NULL ); in mbedtls_ecp_restart_init()
408 ctx->rsm = NULL; in mbedtls_ecp_restart_init()
409 ctx->ma = NULL; in mbedtls_ecp_restart_init()
417 if( ctx == NULL ) in mbedtls_ecp_restart_free()
436 ECP_VALIDATE_RET( grp != NULL ); in mbedtls_ecp_check_budget()
[all …]
Dmd.c181 if( NULL == md_name ) in mbedtls_md_info_from_string()
182 return( NULL ); in mbedtls_md_info_from_string()
219 return( NULL ); in mbedtls_md_info_from_string()
261 return( NULL ); in mbedtls_md_info_from_type()
272 if( ctx == NULL || ctx->md_info == NULL ) in mbedtls_md_free()
275 if( ctx->md_ctx != NULL ) in mbedtls_md_free()
325 if( ctx->hmac_ctx != NULL ) in mbedtls_md_free()
338 if( dst == NULL || dst->md_info == NULL || in mbedtls_md_clone()
339 src == NULL || src->md_info == NULL || in mbedtls_md_clone()
403 if( ctx->md_ctx == NULL ) \
[all …]
Dccm.c63 CCM_VALIDATE( ctx != NULL ); in mbedtls_ccm_init()
75 CCM_VALIDATE_RET( ctx != NULL ); in mbedtls_ccm_setkey()
76 CCM_VALIDATE_RET( key != NULL ); in mbedtls_ccm_setkey()
80 if( cipher_info == NULL ) in mbedtls_ccm_setkey()
105 if( ctx == NULL ) in mbedtls_ccm_free()
325 CCM_VALIDATE_RET( ctx != NULL ); in mbedtls_ccm_star_encrypt_and_tag()
326 CCM_VALIDATE_RET( iv != NULL ); in mbedtls_ccm_star_encrypt_and_tag()
327 CCM_VALIDATE_RET( add_len == 0 || add != NULL ); in mbedtls_ccm_star_encrypt_and_tag()
328 CCM_VALIDATE_RET( length == 0 || input != NULL ); in mbedtls_ccm_star_encrypt_and_tag()
329 CCM_VALIDATE_RET( length == 0 || output != NULL ); in mbedtls_ccm_star_encrypt_and_tag()
[all …]
/openthread-3.6.0/third_party/mbedtls/repo/programs/pkey/
Dkey_app.c123 if( ( q = strchr( p, '=' ) ) == NULL ) in main()
159 if( ( f = fopen( opt.password_file, "rb" ) ) == NULL ) in main()
164 if( fgets( buf, sizeof(buf), f ) == NULL ) in main()
210 MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( "N: ", &N, 16, NULL ) ); in main()
211 MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( "E: ", &E, 16, NULL ) ); in main()
212 MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( "D: ", &D, 16, NULL ) ); in main()
213 MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( "P: ", &P, 16, NULL ) ); in main()
214 MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( "Q: ", &Q, 16, NULL ) ); in main()
215 MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( "DP: ", &DP, 16, NULL ) ); in main()
216 MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( "DQ: ", &DQ, 16, NULL ) ); in main()
[all …]

12345678910>>...12