/freebsd/crypto/openssl/test/ |
H A D | keymgmt_internal_test.c | 177 if (!TEST_ptr(rsa = RSA_new())) in test_pass_rsa() 180 if (!TEST_ptr(bn1 = BN_new()) in test_pass_rsa() 182 || !TEST_ptr(bn2 = BN_new()) in test_pass_rsa() 184 || !TEST_ptr(bn3 = BN_new()) in test_pass_rsa() 189 if (!TEST_ptr(bn1 = BN_new()) in test_pass_rsa() 191 || !TEST_ptr(bn2 = BN_new()) in test_pass_rsa() 196 if (!TEST_ptr(bn1 = BN_new()) in test_pass_rsa() 198 || !TEST_ptr(bn2 = BN_new()) in test_pass_rsa() 200 || !TEST_ptr(bn3 = BN_new()) in test_pass_rsa() 206 if (!TEST_ptr(bn_primes[0] = BN_new()) in test_pass_rsa() [all …]
|
H A D | provider_pkey_test.c | 30 if (!TEST_ptr(sig)) in fetch_sig() 33 if (!TEST_ptr(prov = EVP_SIGNATURE_get0_provider(sig))) in fetch_sig() 58 if (!TEST_ptr(fake_rsa = fake_rsa_start(libctx))) in test_pkey_sig() 74 || !TEST_ptr(pkey)) in test_pkey_sig() 151 if (!TEST_ptr(fake_rsa = fake_rsa_start(libctx))) in test_alternative_keygen_init() 189 if (!TEST_ptr(fake_rsa = fake_rsa_start(libctx))) in test_pkey_eq() 196 if (!TEST_ptr(params = fake_rsa_key_params(0)) in test_pkey_eq() 202 || !TEST_ptr(pkey_fake)) in test_pkey_eq() 211 if (!TEST_ptr(params = fake_rsa_key_params(0)) in test_pkey_eq() 217 || !TEST_ptr(pkey_dflt)) in test_pkey_eq() [all …]
|
H A D | bntest.c | 152 if (!TEST_ptr(a = BN_new()) in test_swap() 225 if (!TEST_ptr(a = BN_new()) in test_sub() 263 if (!TEST_ptr(a = BN_new()) in test_div_recip() 377 if (!TEST_ptr(a = BN_new()) in test_mod() 460 if (!TEST_ptr(a = BN_new()) in test_modexp_mont5() 721 if (!TEST_ptr(a = BN_new()) in test_gf2m_add() 2362 if (!TEST_ptr(r) in test_expmodone() 2363 || !TEST_ptr(a) in test_expmodone() 2364 || !TEST_ptr(p) in test_expmodone() 2365 || !TEST_ptr(p) in test_expmodone() [all …]
|
H A D | param_build_test.c | 26 if (!TEST_ptr(bld = OSSL_PARAM_BLD_new()) in template_public_single_zero_test() 27 || !TEST_ptr(zbn = BN_new()) in template_public_single_zero_test() 58 if (!TEST_ptr(bld = OSSL_PARAM_BLD_new()) in template_private_single_zero_test() 59 || !TEST_ptr(zbn = BN_secure_new()) in template_private_single_zero_test() 101 if (!TEST_ptr(bld) in template_public_test() 107 || !TEST_ptr(zbn = BN_new()) in template_public_test() 109 || !TEST_ptr(bn = BN_new()) in template_public_test() 375 if (!TEST_ptr(bld)) in builder_limit_test() 426 if (!TEST_ptr(bld) in builder_merge_test() 438 if (!TEST_ptr(bld2) in builder_merge_test() [all …]
|
H A D | dhtest.c | 57 if (!TEST_ptr(dh = DH_new()) in dh_test() 58 || !TEST_ptr(p = BN_new()) in dh_test() 59 || !TEST_ptr(q = BN_new()) in dh_test() 60 || !TEST_ptr(g = BN_new()) in dh_test() 158 if (!TEST_ptr(a = DH_new()) in dh_test() 740 if (!TEST_ptr(p) || !TEST_ptr(q) || !TEST_ptr(g)) in dh_test_prime_groups() 812 if (!TEST_ptr(dh1) in dh_get_nid() 813 || !TEST_ptr(dh2)) in dh_get_nid() 818 if (!TEST_ptr(p) in dh_get_nid() 819 || !TEST_ptr(q) in dh_get_nid() [all …]
|
H A D | cmp_protect_test.c | 90 int res = TEST_ptr(protection) in execute_calc_protection_pbmac_test() 117 && TEST_ptr(ctx = EVP_MD_CTX_new()) in verify_signature() 134 int ret = (TEST_ptr(protection) in execute_calc_protection_signature_test() 238 if (!TEST_ptr(fixture->msg = in test_MSG_protect_with_certificate_and_key() 257 if (!TEST_ptr(fixture->msg = in test_MSG_protect_certificate_based_without_cert() 342 if (TEST_ptr(chain)) { in execute_cmp_build_cert_chain_test() 350 if (TEST_ptr(store = X509_STORE_new()) in execute_cmp_build_cert_chain_test() 373 if (!TEST_ptr(fixture->certs = sk_X509_new_null()) in test_cmp_build_cert_chain() 399 if (!TEST_ptr(fixture->certs = sk_X509_new_null()) in test_cmp_build_cert_chain_missing_intermediate() 417 if (!TEST_ptr(fixture->certs = sk_X509_new_null()) in test_cmp_build_cert_chain_no_root() [all …]
|
H A D | ocspapitest.c | 39 if (!TEST_ptr(cert) || !TEST_ptr(key)) in get_cert_and_key() 59 if (!TEST_ptr(cert)) in get_cert() 81 if (!TEST_ptr(name) in make_dummy_resp() 82 || !TEST_ptr(key) in make_dummy_resp() 83 || !TEST_ptr(serial) in make_dummy_resp() 91 if (!TEST_ptr(bs) in make_dummy_resp() 94 || !TEST_ptr(cid) in make_dummy_resp() 126 if (!TEST_ptr(bs) in test_resp_signer() 141 if (!TEST_ptr(bs) in test_resp_signer() 162 if (!TEST_ptr(ad)) in test_access_description() [all …]
|
H A D | rsa_sp800_56b_test.c | 113 ret = TEST_ptr(e = BN_new()) in test_check_public_exponent() 151 ret = TEST_ptr(p = BN_new()) in test_check_prime_factor_range() 193 ret = TEST_ptr(p = BN_new()) in test_check_prime_factor() 197 && TEST_ptr(e = BN_new()) in test_check_prime_factor() 228 ret = TEST_ptr(key = RSA_new()) in test_check_private_exponent() 230 && TEST_ptr(p = BN_new()) in test_check_private_exponent() 231 && TEST_ptr(q = BN_new()) in test_check_private_exponent() 242 ret = TEST_ptr(e = BN_new()) in test_check_private_exponent() 243 && TEST_ptr(d = BN_new()) in test_check_private_exponent() 244 && TEST_ptr(n = BN_new()) in test_check_private_exponent() [all …]
|
H A D | ectest.c | 47 if (!TEST_ptr(n1 = BN_new()) in group_order_tests() 48 || !TEST_ptr(n2 = BN_new()) in group_order_tests() 49 || !TEST_ptr(order = BN_new()) in group_order_tests() 175 || !TEST_ptr(p = BN_new()) in prime_field_tests() 176 || !TEST_ptr(a = BN_new()) in prime_field_tests() 177 || !TEST_ptr(b = BN_new()) in prime_field_tests() 200 || !TEST_ptr(x = BN_new()) in prime_field_tests() 201 || !TEST_ptr(y = BN_new()) in prime_field_tests() 202 || !TEST_ptr(z = BN_new()) in prime_field_tests() 2245 if (!TEST_ptr(x = BN_new()) in check_ec_key_field_public_range_test() [all …]
|
H A D | prov_config_test.c | 29 if (!TEST_ptr(configfile)) in test_double_config() 31 if (!TEST_ptr(ctx)) in test_double_config() 41 if (!TEST_ptr(sha256)) in test_double_config() 57 if (!TEST_ptr(recurseconfigfile)) in test_recursive_config() 60 if (!TEST_ptr(ctx)) in test_recursive_config() 86 if (!TEST_ptr(module_path)) in test_path_config() 90 if (!TEST_ptr(full_path)) in test_path_config() 101 if (!TEST_ptr(pathedconfig)) in test_path_config() 105 if (!TEST_ptr(ctx)) in test_path_config() 132 if (!TEST_ptr(configfile = test_get_argument(0))) in setup_tests() [all …]
|
H A D | pem_read_depr_test.c | 47 if (!TEST_ptr(infile)) in test_read_dh_params() 51 if (!TEST_ptr(dh)) in test_read_dh_params() 68 if (!TEST_ptr(infile)) in test_read_dh_x942_params() 72 if (!TEST_ptr(dh)) in test_read_dh_x942_params() 91 if (!TEST_ptr(infile)) in test_read_dsa_params() 95 if (!TEST_ptr(dsa)) in test_read_dsa_params() 112 if (!TEST_ptr(infile)) in test_read_dsa_private() 116 if (!TEST_ptr(dsa)) in test_read_dsa_private() 137 if (!TEST_ptr(dsa)) in test_read_dsa_public() 159 if (!TEST_ptr(rsa)) in test_read_rsa_private() [all …]
|
H A D | evp_kdf_test.c | 72 ret = TEST_ptr(params) in test_kdf_tls1_prf() 90 ret = TEST_ptr(params) in test_kdf_tls1_prf_invalid_digest() 109 ret = TEST_ptr(params) in test_kdf_tls1_prf_zero_output_size() 128 ret = TEST_ptr(params) in test_kdf_tls1_prf_empty_secret() 146 ret = TEST_ptr(params) in test_kdf_tls1_prf_1byte_secret() 165 ret = TEST_ptr(params) in test_kdf_tls1_prf_empty_seed() 184 ret = TEST_ptr(params) in test_kdf_tls1_prf_1byte_seed() 232 ret = TEST_ptr(params) in test_kdf_hkdf() 310 ret = TEST_ptr(params) in test_kdf_hkdf_invalid_digest() 530 if (!TEST_ptr(params) in test_kdf_pbkdf1() [all …]
|
H A D | ec_internal_test.c | 36 if (!TEST_ptr(c = BN_CTX_get(ctx)) in group_field_tests() 83 if (!TEST_ptr(ctx = BN_CTX_new())) in field_tests() 89 if (!TEST_ptr(b = BN_CTX_get(ctx)) in field_tests() 178 || !TEST_ptr(ctx = BN_CTX_new()) in field_tests_default() 212 if (!TEST_ptr(ctx)) in underflow_test() 222 if (!TEST_ptr(k)) in underflow_test() 229 if (!TEST_ptr(grp) || !TEST_ptr(P) || !TEST_ptr(Q) || !TEST_ptr(R)) in underflow_test() 272 if (!TEST_ptr(key) in set_private_key() 273 || !TEST_ptr(aux_key) in set_private_key() 312 if (!TEST_ptr(grp) in decoded_flag_test() [all …]
|
H A D | evp_extra_test.c | 1178 if (!TEST_ptr(ctx) in test_EVP_PKEY_sign() 1184 if (!TEST_ptr(sig) in test_EVP_PKEY_sign() 1253 if (!TEST_ptr(ctx) in test_EVP_PKEY_sign_with_app_method() 1259 if (!TEST_ptr(sig) in test_EVP_PKEY_sign_with_app_method() 1387 if (!TEST_ptr(membio) || !TEST_ptr(mdbio)) in test_EVP_DigestSignInit() 2639 if (!TEST_ptr(xp)) in test_X509_PUBKEY_inplace() 2671 if (!TEST_ptr(xp) in test_X509_PUBKEY_dup() 2719 if (!TEST_ptr(ctx) in test_EVP_PKEY_CTX_get_set_params() 3603 if (!TEST_ptr(ctx) in test_ecpub() 3656 ret = TEST_ptr(md) in test_EVP_rsa_pss_with_keygen_bits() [all …]
|
H A D | rsa_mp_test.c | 171 if (!TEST_ptr(pris) || !TEST_ptr(exps) || !TEST_ptr(coeffs)) in key2048p3_v1() 177 if (!TEST_ptr(pris[0]) || !TEST_ptr(exps[0]) || !TEST_ptr(coeffs[0])) in key2048p3_v1() 206 if (!TEST_ptr(primes = sk_BIGNUM_new_null()) in key2048p3_v2() 207 || !TEST_ptr(exps = sk_BIGNUM_new_null()) in key2048p3_v2() 208 || !TEST_ptr(coeffs = sk_BIGNUM_new_null())) in key2048p3_v2() 211 if (!TEST_ptr(num = BN_bin2bn(p, sizeof(p) - 1, NULL)) in key2048p3_v2() 213 || !TEST_ptr(num = BN_bin2bn(q, sizeof(q) - 1, NULL)) in key2048p3_v2() 219 if (!TEST_ptr(num = BN_bin2bn(dmp1, sizeof(dmp1) - 1, NULL)) in key2048p3_v2() 221 || !TEST_ptr(num = BN_bin2bn(dmq1, sizeof(dmq1) - 1, NULL)) in key2048p3_v2() 227 if (!TEST_ptr(num = BN_bin2bn(iqmp, sizeof(iqmp) - 1, NULL)) in key2048p3_v2() [all …]
|
H A D | cmsapitest.c | 33 if (!TEST_ptr(certstack) || !TEST_ptr(msgbio) || !TEST_ptr(outmsgbio)) in test_encrypt_decrypt() 40 if (!TEST_ptr(content)) in test_encrypt_decrypt() 284 && TEST_ptr(cms = d2i_CMS_bio(bio, NULL)) in test_d2i_CMS_bio_NULL() 330 if (!TEST_ptr(bio = BIO_new_file(derin, "r"))) in test_d2i_CMS_decode() 335 if (!TEST_ptr(cms = d2i_CMS_bio(bio, NULL))) in test_d2i_CMS_decode() 339 if (!TEST_ptr(buf = read_all(bio, &buf_len))) in test_d2i_CMS_decode() 371 if (!TEST_ptr(certin = test_get_argument(0)) in setup_tests() 372 || !TEST_ptr(privkeyin = test_get_argument(1)) in setup_tests() 373 || !TEST_ptr(derin = test_get_argument(2))) in setup_tests() 377 if (!TEST_ptr(certbio)) in setup_tests() [all …]
|
H A D | exptest.c | 55 if (!TEST_ptr(m = BN_new()) in test_mod_exp_zero() 56 || !TEST_ptr(a = BN_new()) in test_mod_exp_zero() 57 || !TEST_ptr(p = BN_new()) in test_mod_exp_zero() 58 || !TEST_ptr(r = BN_new())) in test_mod_exp_zero() 167 if (!TEST_ptr(r_mont = BN_new()) in test_mod_exp() 171 || !TEST_ptr(a = BN_new()) in test_mod_exp() 172 || !TEST_ptr(b = BN_new()) in test_mod_exp() 173 || !TEST_ptr(m = BN_new())) in test_mod_exp() 268 || !TEST_ptr(a1 = BN_new()) in test_mod_exp_x2() 269 || !TEST_ptr(b1 = BN_new()) in test_mod_exp_x2() [all …]
|
H A D | context_internal_test.c | 56 return TEST_ptr(data = ossl_lib_ctx_get_data(ctx, 0, &foo_method)) in test_context() 65 TEST_ptr(ctx = OSSL_LIB_CTX_new()) in test_app_context() 85 if (!TEST_ptr(global) in test_set0_default() 86 || !TEST_ptr(local) in test_set0_default() 88 || !TEST_ptr(data = ossl_lib_ctx_get_data(local, 0, &foo_method))) in test_set0_default() 97 if (!TEST_ptr(data = ossl_lib_ctx_get_data(NULL, 0, &foo_method)) in test_set0_default() 102 if (!TEST_ptr(prev = OSSL_LIB_CTX_set0_default(local)) in test_set0_default() 104 || !TEST_ptr(data = ossl_lib_ctx_get_data(NULL, 0, &foo_method)) in test_set0_default() 110 || !TEST_ptr(data = ossl_lib_ctx_get_data(NULL, 0, &foo_method)) in test_set0_default() 119 if (!TEST_ptr(prev = OSSL_LIB_CTX_set0_default(global)) in test_set0_default() [all …]
|
H A D | cmp_vfy_test.c | 57 if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture)))) in set_up() 606 if (!TEST_ptr(server_f = test_get_argument(0)) in OPT_TEST_DECLARE_USAGE() 607 || !TEST_ptr(client_f = test_get_argument(1)) in OPT_TEST_DECLARE_USAGE() 608 || !TEST_ptr(endentity1_f = test_get_argument(2)) in OPT_TEST_DECLARE_USAGE() 609 || !TEST_ptr(endentity2_f = test_get_argument(3)) in OPT_TEST_DECLARE_USAGE() 610 || !TEST_ptr(root_f = test_get_argument(4)) in OPT_TEST_DECLARE_USAGE() 614 || !TEST_ptr(ip_waiting_f = test_get_argument(8)) in OPT_TEST_DECLARE_USAGE() 616 || !TEST_ptr(instacert_f = test_get_argument(10)) in OPT_TEST_DECLARE_USAGE() 617 || !TEST_ptr(instaca_f = test_get_argument(11)) in OPT_TEST_DECLARE_USAGE() 630 || !TEST_ptr(root = load_cert_pem(root_f, NULL)) in OPT_TEST_DECLARE_USAGE() [all …]
|
H A D | evp_extra_test2.c | 352 ret = ret && TEST_ptr(dhkey = EVP_PKEY_get0_DH(key)) in test_dh_tofrom_data_select() 378 && TEST_ptr(pkey); in test_dh_paramgen() 514 && TEST_ptr(enc_bio = BIO_new(BIO_s_mem())) in test_pkcs8key_nid_bio() 685 if (!TEST_ptr(provider)) in test_PEM_read_bio_negative_wrong_password() 687 if (!TEST_ptr(key_bio)) in test_PEM_read_bio_negative_wrong_password() 689 if (!TEST_ptr(write_pkey)) in test_PEM_read_bio_negative_wrong_password() 915 ret = TEST_ptr(p = OSSL_PARAM_locate(params, key)) in do_check_bn() 1131 || !TEST_ptr(pkey = EVP_PKEY_new()) in test_pkey_export() 1169 && TEST_ptr(sig = OPENSSL_malloc(sig_len)) in test_rsa_pss_sign() 1187 ret = TEST_ptr(mdctx = EVP_MD_CTX_new()) in test_evp_md_ctx_copy() [all …]
|
H A D | enginetest.c | 64 if (!TEST_ptr(new_h1 = ENGINE_new()) in test_engines() 67 || !TEST_ptr(new_h2 = ENGINE_new()) in test_engines() 70 || !TEST_ptr(new_h3 = ENGINE_new()) in test_engines() 73 || !TEST_ptr(new_h4 = ENGINE_new()) in test_engines() 154 if (!TEST_ptr(block[loop] = ENGINE_new()) in test_engines() 262 if (!TEST_ptr(pkey = get_test_pkey())) in test_redirect() 266 if (!TEST_ptr(tmp = OPENSSL_malloc(len))) in test_redirect() 281 if (!TEST_ptr(e = ENGINE_new()) in test_redirect() 372 if (!TEST_ptr(dupcert = X509_dup(cert))) in test_x509_dup_w_engine() 390 if (!TEST_ptr(e = ENGINE_new()) in test_x509_dup_w_engine() [all …]
|
H A D | dsatest.c | 82 if (!TEST_ptr(cb = BN_GENCB_new())) in dsa_test() 86 if (!TEST_ptr(dsa = DSA_new()) in dsa_test() 252 || !TEST_ptr(OSSL_PARAM_locate_const(settables, in dsa_keygen_test() 354 if (!TEST_ptr(p = BN_bin2bn(out_p, sizeof(out_p), NULL)) in test_dsa_sig_infinite_loop() 355 || !TEST_ptr(q = BN_bin2bn(out_q, sizeof(out_q), NULL)) in test_dsa_sig_infinite_loop() 359 || !TEST_ptr(priv2 = BN_dup(priv)) in test_dsa_sig_infinite_loop() 360 || !TEST_ptr(badq = BN_new()) in test_dsa_sig_infinite_loop() 362 || !TEST_ptr(badpriv = BN_new()) in test_dsa_sig_infinite_loop() 364 || !TEST_ptr(dsa = DSA_new())) in test_dsa_sig_infinite_loop() 443 if (!TEST_ptr(p = BN_bin2bn(out_p, sizeof(out_p), NULL)) in test_dsa_sig_neg_param() [all …]
|
H A D | evp_pkey_provided_test.c | 98 if (!TEST_ptr(fullfile)) in compare_with_file() 102 if (!TEST_ptr(file)) in compare_with_file() 146 if (!TEST_ptr(membio)) in test_print_key_using_pem() 262 if (!TEST_ptr(membio)) in test_print_key_type_using_encoder() 472 if (!TEST_ptr(bld = OSSL_PARAM_BLD_new()) in test_evp_pkey_get_bn_param_large() 632 || !TEST_ptr(q) in test_fromdata_dh_named_group() 815 || !TEST_ptr(q) in test_fromdata_dh_fips186_4() 1083 if (!TEST_ptr(ctx)) in test_fromdata_ecx() 1259 if (!TEST_ptr(ctx)) in test_fromdata_ec() 1394 || !TEST_ptr(param)) in test_ec_dup_no_operation() [all …]
|
H A D | evp_libctx_test.c | 113 if (!TEST_ptr(pkey_parm = EVP_PKEY_new()) in test_dsa_param_keygen() 114 || !TEST_ptr(dsa = DSA_new()) in test_dsa_param_keygen() 115 || !TEST_ptr(p = BN_dup(bn[pind])) in test_dsa_param_keygen() 116 || !TEST_ptr(q = BN_dup(bn[qind])) in test_dsa_param_keygen() 117 || !TEST_ptr(g = BN_dup(bn[gind])) in test_dsa_param_keygen() 177 || !TEST_ptr(dh = DH_new()) in do_dh_param_keygen() 178 || !TEST_ptr(p = BN_dup(bn[pind])) in do_dh_param_keygen() 179 || !TEST_ptr(q = BN_dup(bn[qind])) in do_dh_param_keygen() 180 || !TEST_ptr(g = BN_dup(bn[gind])) in do_dh_param_keygen() 505 || !TEST_ptr(ectx = in rsa_keygen() [all …]
|
/freebsd/crypto/openssl/test/testutil/ |
H A D | load.c | 23 if (!TEST_ptr(file) || !TEST_ptr(bio = BIO_new(BIO_s_file()))) in load_cert_pem() 26 && TEST_ptr(cert = X509_new_ex(libctx, NULL))) in load_cert_pem() 27 (void)TEST_ptr(cert = PEM_read_bio_X509(bio, &cert, NULL, NULL)); in load_cert_pem() 39 if (!TEST_ptr(file) || (bio = BIO_new_file(file, "r")) == NULL) in STACK_OF() 74 if (!TEST_ptr(file) || !TEST_ptr(bio = BIO_new(BIO_s_file()))) in load_pkey_pem() 79 if (TEST_ptr(key = PEM_read_bio_PrivateKey_ex(bio, NULL, NULL, NULL, in load_pkey_pem() 97 if (!TEST_ptr(file) || !TEST_ptr(bio = BIO_new_file(file, "rb"))) in load_csr_der() 101 if (TEST_ptr(csr)) in load_csr_der() 102 (void)TEST_ptr(d2i_X509_REQ_bio(bio, &csr)); in load_csr_der()
|