| /lib/mbedtls/external/mbedtls/tests/suites/ |
| A D | test_suite_bignum.function | 177 TEST_ASSERT(sign_is_valid(&X)); 197 TEST_ASSERT(sign_is_valid(&X)); 282 TEST_ASSERT(file != NULL); 285 TEST_ASSERT(ret == result); 314 TEST_ASSERT(file_out != NULL); 317 TEST_ASSERT(ret == 0); 320 TEST_ASSERT(file_in != NULL); 323 TEST_ASSERT(ret == 0); 405 TEST_ASSERT(sign_is_valid(&Z)); 534 TEST_ASSERT(sign_is_valid(&X)); [all …]
|
| A D | test_suite_cmac.function | 57 TEST_ASSERT(mbedtls_cipher_cmac(NULL, 145 TEST_ASSERT(block1_len <= 100); 146 TEST_ASSERT(block2_len <= 100); 147 TEST_ASSERT(block3_len <= 100); 148 TEST_ASSERT(block4_len <= 100); 226 TEST_ASSERT(block_a1_len <= 100); 227 TEST_ASSERT(block_a2_len <= 100); 228 TEST_ASSERT(block_a3_len <= 100); 230 TEST_ASSERT(block_b1_len <= 100); 231 TEST_ASSERT(block_b2_len <= 100); [all …]
|
| A D | test_suite_dhm.function | 36 TEST_ASSERT(size >= *offset + 2); 42 TEST_ASSERT(size >= *offset + n); 62 TEST_ASSERT(mbedtls_mpi_cmp_int(&ctx->X, 1) > 0); 163 TEST_ASSERT(sec_srv_len == sec_cli_len); 164 TEST_ASSERT(sec_srv_len != 0); 187 TEST_ASSERT(sec_srv_len == sec_cli_len); 188 TEST_ASSERT(sec_srv_len != 0); 222 TEST_ASSERT(sec_srv_len == sec_cli_len); 223 TEST_ASSERT(sec_srv_len != 0); 243 TEST_ASSERT(mbedtls_mpi_lset(&P, 1) == 0); [all …]
|
| A D | test_suite_ecdh.function | 162 TEST_ASSERT(!mbedtls_ecp_is_zero(&qA)); 171 TEST_ASSERT(!mbedtls_ecp_is_zero(&qB)); 230 TEST_ASSERT(len == res_len); 274 TEST_ASSERT(grp.nbits % 8 == 0); 297 TEST_ASSERT(ret == 0); 316 TEST_ASSERT(ret == 0); 334 TEST_ASSERT(ret == 0); 338 TEST_ASSERT(len == z->len); 352 TEST_ASSERT(ret == 0); 356 TEST_ASSERT(len == z->len); [all …]
|
| A D | test_suite_chachapoly.function | 22 TEST_ASSERT(key_str->len == 32); 23 TEST_ASSERT(nonce_str->len == 12); 24 TEST_ASSERT(mac_str->len == 16); 30 TEST_ASSERT(mbedtls_chachapoly_encrypt_and_tag(&ctx, 36 TEST_ASSERT(memcmp(mac_str->x, mac, 16U) == 0); 56 TEST_ASSERT(key_str->len == 32); 57 TEST_ASSERT(nonce_str->len == 12); 58 TEST_ASSERT(mac_str->len == 16); 69 TEST_ASSERT(ret == ret_exp); 102 TEST_ASSERT(mbedtls_chachapoly_finish(&ctx, mac) [all …]
|
| A D | test_suite_cipher.function | 20 TEST_ASSERT(info != NULL); 206 TEST_ASSERT( 222 TEST_ASSERT( 230 TEST_ASSERT( 242 TEST_ASSERT( 256 TEST_ASSERT( 265 TEST_ASSERT( 273 TEST_ASSERT( 280 TEST_ASSERT( 735 TEST_ASSERT(0 == [all …]
|
| A D | test_suite_nist_kw.function | 61 TEST_ASSERT(plaintext[i] == 0); 104 TEST_ASSERT(plaintext[i] == 0); 115 TEST_ASSERT(plaintext[i] == 0); 138 TEST_ASSERT(ret == result); 160 TEST_ASSERT(plaintext != NULL); 182 TEST_ASSERT(output_len == 0); 208 TEST_ASSERT(plaintext != NULL); 227 TEST_ASSERT(output_len == 0); 262 TEST_ASSERT(result[i] == '+'); 292 TEST_ASSERT(result_len == 0); [all …]
|
| A D | test_suite_rsa.function | 188 TEST_ASSERT(mbedtls_rsa_complete(&ctx) == 0); 191 TEST_ASSERT(mbedtls_rsa_pkcs1_sign( 353 TEST_ASSERT(mbedtls_rsa_pkcs1_encrypt(&ctx, 910 TEST_ASSERT(mbedtls_rsa_import(&ctx, 920 TEST_ASSERT(mbedtls_rsa_import(&ctx, 924 TEST_ASSERT(mbedtls_rsa_import(&ctx, 929 TEST_ASSERT(mbedtls_rsa_import(&ctx, 934 TEST_ASSERT(mbedtls_rsa_import(&ctx, 939 TEST_ASSERT(mbedtls_rsa_import(&ctx, 1060 TEST_ASSERT(mbedtls_rsa_import(&ctx, [all …]
|
| A D | test_suite_pkcs1_v21.function | 29 TEST_ASSERT(mbedtls_rsa_set_padding(&ctx, 40 TEST_ASSERT(mbedtls_rsa_check_pubkey(&ctx) == 0); 45 TEST_ASSERT(mbedtls_rsa_pkcs1_encrypt(&ctx, 80 TEST_ASSERT(mbedtls_rsa_set_padding(&ctx, 96 TEST_ASSERT(mbedtls_rsa_complete(&ctx) == 0); 147 TEST_ASSERT(mbedtls_rsa_set_padding(&ctx, 162 TEST_ASSERT(mbedtls_rsa_complete(&ctx) == 0); 166 TEST_ASSERT(mbedtls_rsa_pkcs1_sign( 177 TEST_ASSERT(mbedtls_rsa_rsassa_pss_sign_ext( 206 TEST_ASSERT(mbedtls_rsa_set_padding(&ctx, [all …]
|
| A D | test_suite_mps.function | 67 TEST_ASSERT(paused == 0); 408 TEST_ASSERT(paused == 1); 463 TEST_ASSERT(0); 549 TEST_ASSERT(0); 560 TEST_ASSERT(fetch_len == 50); 564 TEST_ASSERT(fetch_len == 0); 568 TEST_ASSERT(fetch_len == 50); 572 TEST_ASSERT(0); 635 TEST_ASSERT(0); 812 TEST_ASSERT(0); [all …]
|
| A D | test_suite_des.function | 13 TEST_ASSERT(mbedtls_des_key_check_weak(key->x) == ret); 27 TEST_ASSERT(mbedtls_des_setkey_enc(&ctx, key_str->x) == 0); 47 TEST_ASSERT(mbedtls_des_setkey_dec(&ctx, key_str->x) == 0); 68 TEST_ASSERT(mbedtls_des_setkey_enc(&ctx, key_str->x) == 0); 124 TEST_ASSERT(0); 152 TEST_ASSERT(0); 181 TEST_ASSERT(0); 189 TEST_ASSERT(mbedtls_test_hexcmp(output, dst->x, 215 TEST_ASSERT(0); 264 TEST_ASSERT(0); [all …]
|
| A D | test_suite_memory_buffer_alloc.function | 56 TEST_ASSERT(check_pointer(ptr_a) == 0); 63 TEST_ASSERT(check_pointer(ptr_b) == 0); 70 TEST_ASSERT(check_pointer(ptr_c) == 0); 77 TEST_ASSERT(check_pointer(ptr_d) == 0); 126 TEST_ASSERT(check_pointer(ptr_e) == 0); 176 TEST_ASSERT(reported_bytes == 0); 202 TEST_ASSERT(check_pointer(ptr_a) == 0); 205 TEST_ASSERT(check_pointer(ptr_b) == 0); 208 TEST_ASSERT(ptr_c == NULL); 225 TEST_ASSERT(reported_bytes == 0); [all …]
|
| A D | test_suite_hmac_drbg.function | 54 TEST_ASSERT(md_info != NULL); 83 TEST_ASSERT(out[sizeof(out) - 4] == 0); 84 TEST_ASSERT(out[sizeof(out) - 3] == 0); 85 TEST_ASSERT(out[sizeof(out) - 2] == 0); 86 TEST_ASSERT(out[sizeof(out) - 1] == 0); 138 TEST_ASSERT(md_info != NULL); 140 TEST_ASSERT(mbedtls_hmac_drbg_seed(&ctx, md_info, 169 TEST_ASSERT(md_info != NULL); 205 TEST_ASSERT(md_info != NULL); 255 TEST_ASSERT(md_info != NULL); [all …]
|
| A D | test_suite_psa_crypto_metadata.function | 117 TEST_ASSERT(has_even_parity(value)) 200 TEST_ASSERT(!PSA_ALG_IS_HASH(alg)); 201 TEST_ASSERT(PSA_ALG_IS_MAC(alg)); 203 TEST_ASSERT(!PSA_ALG_IS_AEAD(alg)); 204 TEST_ASSERT(!PSA_ALG_IS_SIGN(alg)); 208 TEST_ASSERT(!PSA_ALG_IS_PAKE(alg)); 227 TEST_ASSERT(!PSA_ALG_IS_MAC(alg)); 229 TEST_ASSERT(PSA_ALG_IS_AEAD(alg)); 266 TEST_ASSERT(PSA_ALG_IS_HASH(alg)); 267 TEST_ASSERT(!PSA_ALG_IS_MAC(alg)); [all …]
|
| A D | test_suite_ecp.function | 115 TEST_ASSERT(by_id != NULL); 116 TEST_ASSERT(by_tls != NULL); 117 TEST_ASSERT(by_name != NULL); 119 TEST_ASSERT(by_id == by_tls); 120 TEST_ASSERT(by_id == by_name); 211 TEST_ASSERT(ret == 0); 227 TEST_ASSERT(ret == 0); 297 TEST_ASSERT(ret == 0); 810 TEST_ASSERT(ret == 0); 1201 TEST_ASSERT(ret == 0); [all …]
|
| A D | test_suite_pkcs1_v15.function | 33 TEST_ASSERT(mbedtls_rsa_set_padding(&ctx, 49 TEST_ASSERT(mbedtls_rsa_pkcs1_encrypt(&ctx, 82 TEST_ASSERT(mbedtls_rsa_set_padding(&ctx, 215 TEST_ASSERT(input->len <= sizeof(N)); 221 TEST_ASSERT(mbedtls_rsa_pkcs1_decrypt(&ctx, 245 TEST_ASSERT(final[i] == 0); 251 TEST_ASSERT(output_length != 0x7EA0); 257 TEST_ASSERT(count < 16); 287 TEST_ASSERT(mbedtls_rsa_set_padding(&ctx, 305 TEST_ASSERT(mbedtls_rsa_pkcs1_sign( [all …]
|
| A D | test_suite_entropy.function | 268 TEST_ASSERT(acc[j] != 0); 273 TEST_ASSERT(acc[j] == 0); 300 TEST_ASSERT(mbedtls_entropy_gather(&ctx) 344 TEST_ASSERT(ret == 0); 352 TEST_ASSERT(ret == result); 392 TEST_ASSERT(ret == 0); 400 TEST_ASSERT(ret == result); 511 TEST_ASSERT(mbedtls_md_update(&accumulator, 516 TEST_ASSERT(mbedtls_md_update(&accumulator, 525 TEST_ASSERT(mbedtls_md_update(&accumulator, [all …]
|
| A D | test_suite_ecdsa.function | 211 TEST_ASSERT( 261 TEST_ASSERT(sig[i] == 0x2a); 330 TEST_ASSERT(sig[i] == 0x2a); 387 TEST_ASSERT(ret == 0); 388 TEST_ASSERT(cnt_restart >= min_restart); 389 TEST_ASSERT(cnt_restart <= max_restart); 393 TEST_ASSERT(sig->len > 10); 465 TEST_ASSERT(ret == 0); 466 TEST_ASSERT(slen == sig_check->len); 469 TEST_ASSERT(cnt_restart >= min_restart); [all …]
|
| A D | test_suite_ssl.function | 43 TEST_ASSERT(ret > 0); 175 TEST_ASSERT(put1 >= 0); 179 TEST_ASSERT(put2 >= 0); 184 TEST_ASSERT(get1 >= 0); 188 TEST_ASSERT(get2 >= 0); 1253 TEST_ASSERT(ret == 0); 1407 TEST_ASSERT(ret == 0); 1574 TEST_ASSERT( 1577 TEST_ASSERT( 2109 TEST_ASSERT( [all …]
|
| A D | test_suite_aes.function | 24 TEST_ASSERT(mbedtls_aes_setkey_enc(master, key->x, 32 TEST_ASSERT(mbedtls_aes_setkey_dec(master, key->x, 100 TEST_ASSERT(pt->len == ct->len); 151 TEST_ASSERT(length >= 0); 152 TEST_ASSERT(step_size > 0); 303 TEST_ASSERT(key_len % 2 == 0); 307 TEST_ASSERT(src_len == dst_len); 347 TEST_ASSERT(key_len % 2 == 0); 351 TEST_ASSERT(src_len == dst_len); 641 TEST_ASSERT(1); [all …]
|
| A D | test_suite_poly1305.function | 22 TEST_ASSERT(mbedtls_poly1305_mac(key->x, src_str->x, 33 TEST_ASSERT(mbedtls_poly1305_starts(&ctx, key->x) == 0); 37 TEST_ASSERT(mbedtls_poly1305_finish(&ctx, mac) == 0); 49 TEST_ASSERT(mbedtls_poly1305_starts(&ctx, key->x) == 0); 51 TEST_ASSERT(mbedtls_poly1305_update(&ctx, src_str->x, 1) == 0); 54 TEST_ASSERT(mbedtls_poly1305_finish(&ctx, mac) == 0); 64 TEST_ASSERT(mbedtls_poly1305_starts(&ctx, key->x) == 0); 66 TEST_ASSERT(mbedtls_poly1305_update(&ctx, src_str->x, 1) == 0); 67 TEST_ASSERT(mbedtls_poly1305_update(&ctx, src_str->x + 1, 1) == 0); 70 TEST_ASSERT(mbedtls_poly1305_finish(&ctx, mac) == 0); [all …]
|
| A D | test_suite_oid.function | 26 TEST_ASSERT(ret == MBEDTLS_ERR_OID_NOT_FOUND); 28 TEST_ASSERT(ret == 0); 47 TEST_ASSERT(ret == MBEDTLS_ERR_OID_NOT_FOUND); 49 TEST_ASSERT(ret == 0); 70 TEST_ASSERT(ret == 0); 71 TEST_ASSERT(ext_type == exp_type); 91 TEST_ASSERT(md_id == 0); 93 TEST_ASSERT(ret == 0); 114 TEST_ASSERT(md_id == 0); 116 TEST_ASSERT(ret == 0); [all …]
|
| A D | test_suite_chacha20.function | 22 TEST_ASSERT(src_str->len == expected_output_str->len); 23 TEST_ASSERT(key_str->len == 32U); 24 TEST_ASSERT(nonce_str->len == 12U); 29 TEST_ASSERT(mbedtls_chacha20_crypt(key_str->x, nonce_str->x, counter, src_str->len, src_str->x, 40 TEST_ASSERT(mbedtls_chacha20_setkey(&ctx, key_str->x) == 0); 42 TEST_ASSERT(mbedtls_chacha20_starts(&ctx, nonce_str->x, counter) == 0); 45 TEST_ASSERT(mbedtls_chacha20_update(&ctx, src_str->len, src_str->x, output) == 0); 56 TEST_ASSERT(mbedtls_chacha20_starts(&ctx, nonce_str->x, counter) == 0); 59 TEST_ASSERT(mbedtls_chacha20_update(&ctx, 1, src_str->x, output) == 0); 60 TEST_ASSERT(mbedtls_chacha20_update(&ctx, src_str->len - 1, [all …]
|
| A D | test_suite_base64.function | 80 TEST_ASSERT(strcmp((char *) dst_str, dst_string) == 0); 98 TEST_ASSERT(res == result); 100 TEST_ASSERT(strcmp((char *) dst_str, dst_string) == 0); 123 TEST_ASSERT(len == strlen(dst)); 124 TEST_ASSERT(memcmp(dst, res, len) == 0); 141 TEST_ASSERT(mbedtls_base64_decode(res, dst_buf_size, &len, (unsigned char *) src, 144 TEST_ASSERT(len == dst->len); 145 TEST_ASSERT(memcmp(dst->x, res, len) == 0); 161 TEST_ASSERT(len == strlen(dst_ref)); 162 TEST_ASSERT(memcmp(dst, dst_ref, len) == 0); [all …]
|
| /lib/mbedtls/external/mbedtls/tests/src/test_helpers/ |
| A D | ssl_helpers.c | 623 TEST_ASSERT(ret == 0); in mbedtls_test_ssl_endpoint_certificate_init() 634 TEST_ASSERT(ret == 0); in mbedtls_test_ssl_endpoint_certificate_init() 641 TEST_ASSERT(ret == 0); in mbedtls_test_ssl_endpoint_certificate_init() 713 TEST_ASSERT(ret == 0); in mbedtls_test_ssl_endpoint_certificate_init() 717 TEST_ASSERT(ret == 0); in mbedtls_test_ssl_endpoint_certificate_init() 722 TEST_ASSERT(ret == 0); in mbedtls_test_ssl_endpoint_certificate_init() 797 TEST_ASSERT(ret == 0); in mbedtls_test_ssl_endpoint_init() 853 TEST_ASSERT(ret == 0); in mbedtls_test_ssl_endpoint_init() 882 TEST_ASSERT(ret == 0); in mbedtls_test_ssl_endpoint_init() 1016 TEST_ASSERT(ret == 0); in mbedtls_ssl_read_fragment() [all …]
|