/freebsd/crypto/openssl/test/ |
H A D | wpackettest.c | 44 if (!TEST_true(WPACKET_init(&pkt, buf)) in test_WPACKET_init() 49 || !TEST_true(WPACKET_finish(&pkt)) in test_WPACKET_init() 86 if (!TEST_true(WPACKET_finish(&pkt))) in test_WPACKET_init() 118 if (!TEST_true(WPACKET_init(&pkt, buf)) in test_WPACKET_set_max_size() 166 if (!TEST_true(WPACKET_init(&pkt, buf)) in test_WPACKET_start_sub_packet() 181 if (!TEST_true(WPACKET_init(&pkt, buf)) in test_WPACKET_start_sub_packet() 191 if (!TEST_true(WPACKET_init(&pkt, buf)) in test_WPACKET_start_sub_packet() 208 if (!TEST_true(WPACKET_init(&pkt, buf)) in test_WPACKET_start_sub_packet() 221 if (!TEST_true(WPACKET_init(&pkt, buf)) in test_WPACKET_start_sub_packet() 313 if (!TEST_true(WPACKET_finish(&pkt)) in test_WPACKET_allocate_bytes() [all …]
|
H A D | rsa_sp800_56b_test.c | 115 && TEST_true(BN_set_word(e, 1)) in test_check_public_exponent() 121 && TEST_true(BN_set_word(e, 3)) in test_check_public_exponent() 123 && TEST_true(BN_set_word(e, 17)) in test_check_public_exponent() 245 && TEST_true(BN_set_word(e, 5)) in test_check_private_exponent() 294 && TEST_true(BN_set_word(p, P)) in test_check_crt_components() 295 && TEST_true(BN_set_word(q, Q)) in test_check_crt_components() 296 && TEST_true(BN_set_word(e, E)) in test_check_crt_components() 357 && TEST_true(BN_set_word(p, 1)) in test_pq_diff() 364 && TEST_true(BN_set_word(q, 1)) in test_pq_diff() 520 && TEST_true(BN_lshift1(n, n)) in test_check_public_key() [all …]
|
H A D | packettest.c | 21 if (!TEST_true(PACKET_buf_init(&pkt, smbuf, BUF_LEN)) in test_PACKET_remaining() 25 || !TEST_true(PACKET_forward(&pkt, 1)) in test_PACKET_remaining() 41 || !TEST_true(PACKET_forward(&pkt, 1)) in test_PACKET_end() 54 || !TEST_true(PACKET_get_1(&pkt, &i)) in test_PACKET_get_1() 57 || !TEST_true(PACKET_get_1(&pkt, &i)) in test_PACKET_get_1() 71 || !TEST_true(PACKET_get_4(&pkt, &i)) in test_PACKET_get_4() 74 || !TEST_true(PACKET_get_4(&pkt, &i)) in test_PACKET_get_4() 88 || !TEST_true(PACKET_get_net_2(&pkt, &i)) in test_PACKET_get_net_2() 91 || !TEST_true(PACKET_get_net_2(&pkt, &i)) in test_PACKET_get_net_2() 292 || !TEST_true(PACKET_forward(&pkt, 1)) in test_PACKET_forward() [all …]
|
H A D | ectest.c | 66 || !TEST_true(EC_POINT_copy(P, G)) in group_order_tests() 67 || !TEST_true(BN_one(n1)) in group_order_tests() 82 if (!TEST_true(BN_set_word(n1, i)) in group_order_tests() 89 || !TEST_true(BN_one(n1)) in group_order_tests() 179 || !TEST_true(BN_hex2bn(&a, "1")) in prime_field_tests() 180 || !TEST_true(BN_hex2bn(&b, "1")) in prime_field_tests() 204 || !TEST_true(BN_hex2bn(&x, "D")) in prime_field_tests() 563 || !TEST_true(BN_add(z, z, y))) in prime_field_tests() 572 || !TEST_true(BN_add(z, x, y))) in prime_field_tests() 1096 if (!TEST_true(BN_dec2bn(&x, "0")) in hybrid_point_encoding_test() [all …]
|
H A D | bntest.c | 484 if (!(TEST_true(BN_hex2bn(&a, in test_modexp_mont5() 489 && TEST_true(BN_hex2bn(&b, in test_modexp_mont5() 494 && TEST_true(BN_hex2bn(&n, in test_modexp_mont5() 567 if (!(TEST_true(BN_hex2bn(&a, in test_modexp_mont5() 579 if (!(TEST_true(BN_hex2bn(&a, in test_modexp_mont5() 584 && TEST_true(BN_hex2bn(&b, in test_modexp_mont5() 589 && TEST_true(BN_hex2bn(&n, in test_modexp_mont5() 604 if (!(TEST_true(BN_hex2bn(&a, in test_modexp_mont5() 609 && TEST_true(BN_hex2bn(&b, in test_modexp_mont5() 684 if (!(TEST_true(BN_one(a)) in test_modexp_mont5() [all …]
|
H A D | param_build_test.c | 37 || !TEST_true(OSSL_PARAM_get_BN(p, &zbn_res)) in template_public_single_zero_test() 70 || !TEST_true(OSSL_PARAM_get_BN(p, &zbn_res)) in template_private_single_zero_test() 110 || !TEST_true(BN_set_word(bn, 1729)) in template_public_test() 141 || !TEST_true(OSSL_PARAM_get_int(p, &i)) in template_public_test() 165 || !TEST_true(OSSL_PARAM_get_long(p, &l)) in template_public_test() 172 || !TEST_true(OSSL_PARAM_get_time_t(p, &t)) in template_public_test() 254 || !TEST_true(BN_set_word(bn, 1729)) in template_private_test() 284 || !TEST_true(OSSL_PARAM_get_uint(p, &i)) in template_private_test() 433 || !TEST_true(BN_set_word(bn_priv, 1729)) in builder_merge_test() 445 || !TEST_true(BN_set_word(bn_pub, 0x42)) in builder_merge_test() [all …]
|
H A D | sslapitest.c | 1044 if (!TEST_true(SSL_clear(serverssl))) in execute_test_large_message() 1700 if (!TEST_true(create_ssl_ctx_pair(libctx, in execute_cleanse_plaintext() 1924 || !TEST_true(ocsp_client_called) in test_tlsext_status_type() 1982 || !TEST_true(ocsp_client_called) in test_tlsext_status_type() 3389 || !TEST_true( in create_a_psk() 6184 if (!TEST_true(cb_result)) in test_serverinfo_custom() 6875 if (!TEST_true(SSL_clear(clientssl))) in test_ssl_clear() 7267 if (!TEST_true(tst % 2 == 0)) in test_srp() 7270 if (!TEST_true(tst % 2 == 1)) in test_srp() 9346 || !TEST_true(BIO_up_ref(rbio))) in test_ssl_dup() [all …]
|
H A D | siphash_internal_test.c | 199 || !TEST_true(SipHash_Init(&siphash, key, 0, 0))) in test_siphash() 202 if (!TEST_true(SipHash_Final(&siphash, out, expectedlen)) in test_siphash() 208 || !TEST_true(SipHash_Init(&siphash, key, 0, 0))) in test_siphash() 267 && TEST_true(SipHash_set_hash_size(&siphash, 8)) in test_siphash_basic() 269 && TEST_true(SipHash_Init(&siphash, key, 0, 0)) in test_siphash_basic() 270 && TEST_true(SipHash_Final(&siphash, output, 8)) in test_siphash_basic() 274 && TEST_true(SipHash_set_hash_size(&siphash, 16)) in test_siphash_basic() 275 && TEST_true(SipHash_Init(&siphash, key, 0, 0)) in test_siphash_basic() 277 && TEST_true(SipHash_Final(&siphash, output, 16)) in test_siphash_basic() 280 && TEST_true(SipHash_set_hash_size(&siphash, 0)) in test_siphash_basic() [all …]
|
H A D | cmactest.c | 116 if (!TEST_true(CMAC_Init(ctx, test[0].key, test[0].key_len, in test_cmac_run() 119 || !TEST_true(CMAC_Final(ctx, buf, &len))) in test_cmac_run() 126 if (!TEST_true(CMAC_Init(ctx, test[1].key, test[1].key_len, in test_cmac_run() 129 || !TEST_true(CMAC_Final(ctx, buf, &len))) in test_cmac_run() 138 || !TEST_true(CMAC_Final(ctx, buf, &len))) in test_cmac_run() 144 if (!TEST_true(CMAC_Init(ctx, NULL, 0, NULL, NULL)) in test_cmac_run() 146 || !TEST_true(CMAC_Final(ctx, buf, &len))) in test_cmac_run() 156 || !TEST_true(CMAC_Final(ctx, buf, &len))) in test_cmac_run() 181 if (!TEST_true(CMAC_Init(ctx, test[0].key, test[0].key_len, in test_cmac_copy() 184 || !TEST_true(CMAC_CTX_copy(ctx2, ctx)) in test_cmac_copy() [all …]
|
H A D | exptest.c | 68 if (!TEST_true(BN_mod_exp(r, a, p, m, ctx))) in test_mod_exp_zero() 71 if (!TEST_true(a_is_zero_mod_one("BN_mod_exp", r, a))) in test_mod_exp_zero() 74 if (!TEST_true(BN_mod_exp_recp(r, a, p, m, ctx))) in test_mod_exp_zero() 80 if (!TEST_true(BN_mod_exp_simple(r, a, p, m, ctx))) in test_mod_exp_zero() 109 if (!TEST_true(BN_MONT_CTX_set(mont, m, ctx))) in test_mod_exp_zero() 197 if (!TEST_true(BN_mod(a, a, m, ctx)) in test_mod_exp() 198 || !TEST_true(BN_mod(b, b, m, ctx)) in test_mod_exp() 283 if (!TEST_true(BN_mod(a1, a1, m1, ctx)) in test_mod_exp_x2() 284 || !TEST_true(BN_mod(b1, b1, m1, ctx)) in test_mod_exp_x2() 285 || !TEST_true(BN_mod(a2, a2, m2, ctx)) in test_mod_exp_x2() [all …]
|
H A D | dtlstest.c | 92 || !TEST_true(SSL_CTX_set_cipher_list(cctx, in test_dtls_unprocessed() 211 || !TEST_true(SSL_CTX_set_cipher_list(cctx, in test_dtls_drop_records() 216 if (!TEST_true(SSL_CTX_set_dh_auto(sctx, 1))) in test_dtls_drop_records() 260 if (!TEST_true(SSL_set_session(clientssl, sess))) in test_dtls_drop_records() 328 || !TEST_true(SSL_CTX_set_cipher_list(cctx, in test_cookie() 364 || !TEST_true(SSL_CTX_set_cipher_list(cctx, in test_dtls_duplicate_records() 493 || !TEST_true(SSL_CTX_set_cipher_list(cctx, in test_swap_records() 518 || !TEST_true(mempacket_swap_epoch(bio))) in test_swap_records() 535 if (!TEST_true(mempacket_move_packet(bio, 0, 1))) in test_swap_records() 539 if (!TEST_true(mempacket_move_packet(bio, 0, 2))) in test_swap_records() [all …]
|
H A D | clienthellotest.c | 91 if (!TEST_true(SSL_CTX_set_max_proto_version(ctx, 0))) in test_client_hello() 136 } else if (!TEST_true(SSL_CTX_set_cipher_list(ctx, in test_client_hello() 138 || !TEST_true(SSL_CTX_set_ciphersuites(ctx, in test_client_hello() 168 || !TEST_true(SSL_set_session(con, sess))) in test_client_hello() 184 if (!TEST_true(SSL_set_session_ticket_ext(con, dummytick, in test_client_hello() 195 || !TEST_true(PACKET_buf_init(&pkt, data, len)) in test_client_hello() 203 if (!TEST_true(PACKET_forward(&pkt, SSL3_HM_HEADER_LENGTH)) in test_client_hello() 205 || !TEST_true(PACKET_forward(&pkt, CLIENT_VERSION_LEN in test_client_hello() 220 if (!TEST_true(PACKET_get_net_2(&pkt2, &type)) in test_client_hello() 226 if (TEST_true(PACKET_equal(&pkt3, dummytick, in test_client_hello() [all …]
|
H A D | threadstest.c | 42 res = TEST_true(CRYPTO_THREAD_read_lock(lock)) in test_lock() 43 && TEST_true(CRYPTO_THREAD_unlock(lock)) in test_lock() 45 && TEST_true(CRYPTO_THREAD_unlock(lock)); in test_lock() 70 || !TEST_true(wait_for_thread(thread)) in test_once() 122 || !TEST_true(wait_for_thread(thread)) in test_thread_local() 300 || !TEST_true(multi_success)) in thread_run_test() 547 if (!TEST_true(wait_for_thread(thread1))) in test_multi() 549 if (!TEST_true(wait_for_thread(thread2))) in test_multi() 551 if (!TEST_true(multi_success)) in test_multi() 606 if (!TEST_true(wait_for_thread(thread1)) in test_multi_default() [all …]
|
H A D | ffc_internal_test.c | 455 if (!TEST_true(BN_set_word(pub, 1))) in ffc_public_validate_test() 463 if (!TEST_true(BN_set_word(pub, 0))) in ffc_public_validate_test() 475 if (!TEST_true(BN_add_word(pub, 2))) in ffc_public_validate_test() 489 if (!TEST_true(BN_sub_word(pub, 1))) in ffc_public_validate_test() 497 if (!TEST_true(BN_sub_word(pub, 1))) in ffc_public_validate_test() 505 if (!TEST_true(BN_sub_word(pub, 5))) in ffc_public_validate_test() 553 if (!TEST_true(BN_set_word(priv, 1))) in ffc_private_validate_test() 562 if (!TEST_true(BN_set_word(priv, 0))) in ffc_private_validate_test() 583 if (!TEST_true(BN_sub_word(priv, 1))) in ffc_private_validate_test() 678 if (!TEST_true(ossl_ffc_params_copy(©, params))) in ffc_params_copy_test() [all …]
|
H A D | errtest.c | 102 if (!TEST_true(IS_HEX(*p))) in test_print_error_format() 105 if (!TEST_true(*p != 0) in test_print_error_format() 183 if (!TEST_true(ERR_set_mark()) in test_marks() 186 || !TEST_true(ERR_set_mark()) in test_marks() 192 if (!TEST_true(ERR_set_mark())) in test_marks() 201 if (!TEST_true(ERR_set_mark()) in test_marks() 211 if (!TEST_true(ERR_set_mark())) in test_marks() 227 if (!TEST_true(ERR_set_mark())) in test_marks() 264 if (!TEST_true(ERR_set_mark())) in test_marks() 270 if (!TEST_true(ERR_pop_to_mark()) in test_marks() [all …]
|
H A D | v3ext.c | 86 if (!TEST_true(X509v3_asid_subset(NULL, NULL)) in test_asid() 87 || !TEST_true(X509v3_asid_subset(NULL, asid1)) in test_asid() 88 || !TEST_true(X509v3_asid_subset(asid1, asid1)) in test_asid() 89 || !TEST_true(X509v3_asid_subset(asid2, asid2)) in test_asid() 90 || !TEST_true(X509v3_asid_subset(asid1, asid3)) in test_asid() 91 || !TEST_true(X509v3_asid_subset(asid2, asid3)) in test_asid() 189 if (!TEST_true(X509v3_addr_canonize(addr))) in test_addr_ranges() 208 if (!TEST_true(X509v3_addr_is_canonical(addr))) in test_addr_ranges() 251 if (!TEST_true(X509v3_addr_is_canonical(addr))) in test_addr_fam_len() 304 if (!TEST_true(X509v3_addr_canonize(addr))) in test_addr_fam_len() [all …]
|
H A D | evp_extra_test.c | 743 if (!TEST_true(ret)) in test_selection() 752 if (!TEST_true(ret)) in test_selection() 1969 if (!TEST_true(bio != NULL)) in test_EVP_SM2_verify() 1973 if (!TEST_true(pkey != NULL)) in test_EVP_SM2_verify() 1976 if (!TEST_true(EVP_PKEY_is_a(pkey, "SM2"))) in test_EVP_SM2_verify() 2308 || !TEST_true(len == inlen)) in test_set_get_raw_keys_int() 3056 || !TEST_true(BN_set_word(g, 2)) in test_EVP_PKEY_set1_DH() 3688 if (!TEST_true(success)) in test_names_do_all() 4845 if (!TEST_true(ENGINE_init(e))) { in test_signatures_with_engine() 4876 if (!TEST_true(ret)) in test_signatures_with_engine() [all …]
|
H A D | params_api_test.c | 130 if (!TEST_true(OSSL_PARAM_modified(param))) in test_param_type_extra() 160 if (!TEST_true(OSSL_PARAM_set_int(¶m, in))) in test_param_int() 166 if (!TEST_true(OSSL_PARAM_get_int(¶m, &in))) in test_param_int() 187 if (!TEST_true(OSSL_PARAM_set_long(¶m, in))) in test_param_long() 193 if (!TEST_true(OSSL_PARAM_get_long(¶m, &in))) in test_param_long() 213 if (!TEST_true(OSSL_PARAM_set_uint(¶m, in))) in test_param_uint() 219 if (!TEST_true(OSSL_PARAM_get_uint(¶m, &in))) in test_param_uint() 433 if (!TEST_true(OSSL_PARAM_set_BN(¶m, b)) in test_param_bignum() 437 if (!TEST_true(OSSL_PARAM_get_BN(¶m, &c)) in test_param_bignum() 618 || !TEST_true(OSSL_PARAM_set_BN(cp, bn)) in test_param_construct() [all …]
|
H A D | sm2_internal_test.c | 92 if (!TEST_true(BN_hex2bn(&p, p_hex)) in create_EC_group() 93 || !TEST_true(BN_hex2bn(&a, a_hex)) in create_EC_group() 94 || !TEST_true(BN_hex2bn(&b, b_hex))) in create_EC_group() 105 if (!TEST_true(BN_hex2bn(&g_x, x_hex)) in create_EC_group() 106 || !TEST_true(BN_hex2bn(&g_y, y_hex)) in create_EC_group() 111 if (!TEST_true(BN_hex2bn(&order, order_hex)) in create_EC_group() 175 if (!TEST_true(ossl_sm2_encrypt(key, digest, in test_sm2_crypt() 347 if (!TEST_true(BN_hex2bn(&r, r_hex)) in test_sm2_sign() 348 || !TEST_true(BN_hex2bn(&s, s_hex)) in test_sm2_sign() 357 TEST_true(ok); in test_sm2_sign() [all …]
|
H A D | keymgmt_internal_test.c | 94 if (!TEST_true(OSSL_PARAM_get_BN(p, &n)) in get_ulong_via_BN() 110 || !TEST_true(get_ulong_via_BN(p, &keydata[N])) in export_cb() 112 || !TEST_true(get_ulong_via_BN(p, &keydata[E])) in export_cb() 181 || !TEST_true(BN_set_word(bn1, expected[N])) in test_pass_rsa() 183 || !TEST_true(BN_set_word(bn2, expected[E])) in test_pass_rsa() 185 || !TEST_true(BN_set_word(bn3, expected[D])) in test_pass_rsa() 190 || !TEST_true(BN_set_word(bn1, expected[P])) in test_pass_rsa() 192 || !TEST_true(BN_set_word(bn2, expected[Q])) in test_pass_rsa() 197 || !TEST_true(BN_set_word(bn1, expected[DP])) in test_pass_rsa() 199 || !TEST_true(BN_set_word(bn2, expected[DQ])) in test_pass_rsa() [all …]
|
H A D | servername_test.c | 56 || !TEST_true(PACKET_buf_init(&pkt, data, len)) in get_sni_from_client_hello() 62 || !TEST_true(PACKET_forward(&pkt, CLIENT_VERSION_LEN in get_sni_from_client_hello() 65 || !TEST_true(PACKET_get_length_prefixed_1(&pkt, &pkt2)) in get_sni_from_client_hello() 67 || !TEST_true(PACKET_get_length_prefixed_2(&pkt, &pkt2)) in get_sni_from_client_hello() 69 || !TEST_true(PACKET_get_length_prefixed_1(&pkt, &pkt2)) in get_sni_from_client_hello() 71 || !TEST_true(PACKET_as_length_prefixed_2(&pkt, &pkt2))) in get_sni_from_client_hello() 76 if (!TEST_true(PACKET_get_net_2(&pkt2, &type)) in get_sni_from_client_hello() 87 || !TEST_true(PACKET_strndup(&pkt5, sni))) in get_sni_from_client_hello() 135 if (!TEST_true(get_sni_from_client_hello(wbio, &hostname))) in client_setup_sni_before_state() 188 if (!TEST_true(get_sni_from_client_hello(wbio, &hostname))) in client_setup_sni_after_state() [all …]
|
H A D | ecdsatest.c | 115 || !TEST_true(BN_hex2bn(&r, r_in)) in x9_62_tests() 116 || !TEST_true(BN_hex2bn(&s, s_in))) in x9_62_tests() 121 if (!TEST_true(EC_KEY_generate_key(key)) in x9_62_tests() 253 || !TEST_true(EVP_MD_CTX_reset(mctx)) in test_builtin() 258 || !TEST_true(EVP_MD_CTX_reset(mctx)) in test_builtin() 263 || !TEST_true(EVP_MD_CTX_reset(mctx)) in test_builtin() 268 || !TEST_true(EVP_MD_CTX_reset(mctx))) in test_builtin() 276 || !TEST_true(EVP_MD_CTX_reset(mctx))) in test_builtin() 283 || !TEST_true(EVP_MD_CTX_reset(mctx))) in test_builtin() 318 || !TEST_true(EVP_MD_CTX_reset(mctx))) in test_builtin() [all …]
|
H A D | enginetest.c | 80 if (!TEST_true(ENGINE_add(new_h1))) in test_engines() 86 if (!TEST_true(ENGINE_remove(ptr))) in test_engines() 92 if (!TEST_true(ENGINE_add(new_h3)) in test_engines() 98 if (!TEST_true(ENGINE_remove(new_h2))) in test_engines() 103 if (!TEST_true(ENGINE_add(new_h4))) in test_engines() 118 if (!TEST_true(ENGINE_remove(new_h3))) in test_engines() 123 if (!TEST_true(ENGINE_remove(new_h4))) in test_engines() 144 if (!TEST_true(ENGINE_add(new_h1)) in test_engines() 170 if (!TEST_true(ENGINE_remove(ptr))) in test_engines() 318 || !TEST_true(called_encrypt)) in test_redirect() [all …]
|
H A D | cmp_protect_test.c | 91 && TEST_true(ASN1_STRING_cmp(protection, in execute_calc_protection_pbmac_test() 135 && TEST_true(ASN1_STRING_cmp(protection, in execute_calc_protection_signature_test() 259 || !TEST_true(SET_OPT_UNPROTECTED_SEND(ctx, 0)) in test_MSG_protect_certificate_based_without_cert() 351 && TEST_true(X509_STORE_add_cert(store, root))) { in execute_cmp_build_cert_chain_test() 376 || !TEST_true(sk_X509_push(fixture->certs, root)) in test_cmp_build_cert_chain() 402 || !TEST_true(sk_X509_push(fixture->certs, root)) in test_cmp_build_cert_chain_missing_intermediate() 438 || !TEST_true(sk_X509_push(fixture->certs, root)) in test_cmp_build_cert_chain_only_root() 470 if (!TEST_true(ossl_cmp_X509_STORE_add1_certs(store, in execute_X509_STORE_test() 508 if (!TEST_true(sk_X509_push(fixture->certs, endentity1)) in test_X509_STORE_only_self_issued() 510 || !TEST_true(sk_X509_push(fixture->certs, root)) in test_X509_STORE_only_self_issued() [all …]
|
H A D | tls13ccstest.c | 380 if (!TEST_true(sccsseen) in test_tls13ccs() 381 || !TEST_true(ccsaftersh) in test_tls13ccs() 388 if (!TEST_true(sccsseen) in test_tls13ccs() 397 || !TEST_true(ccsaftersh) in test_tls13ccs() 404 if (!TEST_true(sccsseen) in test_tls13ccs() 405 || !TEST_true(ccsaftersh) in test_tls13ccs() 412 if (!TEST_true(sccsseen) in test_tls13ccs() 428 if (!TEST_true(sccsseen) in test_tls13ccs() 436 if (!TEST_true(sccsseen) in test_tls13ccs() 452 if (!TEST_true(sccsseen) in test_tls13ccs() [all …]
|