Home
last modified time | relevance | path

Searched refs:TEST_ptr (Results 1 - 25 of 148) sorted by relevance

123456

/third_party/openssl/test/
H A Dkeymgmt_internal_test.c55 if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture))) in set_up()
56 || !TEST_ptr(fixture->ctx1 = OSSL_LIB_CTX_new()) in set_up()
57 || !TEST_ptr(fixture->prov1 = OSSL_PROVIDER_load(fixture->ctx1, in set_up()
59 || !TEST_ptr(fixture->ctx2 = OSSL_LIB_CTX_new()) in set_up()
60 || !TEST_ptr(fixture->prov2 = OSSL_PROVIDER_load(fixture->ctx2, in set_up()
109 if (!TEST_ptr(p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_RSA_N)) in export_cb()
111 || !TEST_ptr(p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_RSA_E)) in export_cb()
113 || !TEST_ptr(p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_RSA_D)) in export_cb()
117 if (!TEST_ptr(p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_RSA_FACTOR1)) in export_cb()
119 || !TEST_ptr( in export_cb()
[all...]
H A Dprovider_pkey_test.c30 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()
61 if (!TEST_ptr(deflt = OSSL_PROVIDER_load(libctx, "default"))) in test_pkey_sig()
70 if (!TEST_ptr(ctx = EVP_PKEY_CTX_new_from_name(libctx, "RSA", in test_pkey_sig()
74 || !TEST_ptr(pkey)) in test_pkey_sig()
89 if (!TEST_ptr(ctx = EVP_PKEY_CTX_new_from_pkey(libctx, pkey, in test_pkey_sig()
128 if (!TEST_ptr(deflt = OSSL_PROVIDER_load(libctx, "default"))) in test_alternative_keygen_init()
132 if (!TEST_ptr(ctx = EVP_PKEY_CTX_new_from_name(libctx, "RSA", NULL))) in test_alternative_keygen_init()
138 if (!TEST_ptr(provide in test_alternative_keygen_init()
[all...]
H A Dparam_build_test.c26 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()
29 || !TEST_ptr(params_blt = OSSL_PARAM_BLD_to_param(bld))) in template_public_single_zero_test()
34 if (!TEST_ptr(p = OSSL_PARAM_locate(params, "zeronumber")) 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()
61 || !TEST_ptr(params_blt = OSSL_PARAM_BLD_to_param(bld))) in template_private_single_zero_test()
66 if (!TEST_ptr(p = OSSL_PARAM_locate(params, "zeronumber")) in template_private_single_zero_test()
101 if (!TEST_ptr(bld) in template_public_test()
107 || !TEST_ptr(zb in template_public_test()
[all...]
H A Dcmp_protect_test.c55 if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture)))) in set_up()
58 if (!TEST_ptr(fixture->cmp_ctx = OSSL_CMP_CTX_new(libctx, NULL))) { in set_up()
88 int res = TEST_ptr(protection) in execute_calc_protection_pbmac_test()
115 && TEST_ptr(ctx = EVP_MD_CTX_new()) in verify_signature()
132 int ret = (TEST_ptr(protection) in execute_calc_protection_signature_test()
146 if (!TEST_ptr(fixture->msg = load_pkimsg(ir_unprotected_f, libctx)) in test_cmp_calc_protection_no_key_no_secret()
147 || !TEST_ptr(fixture->msg->header->protectionAlg = in test_cmp_calc_protection_no_key_no_secret()
162 || !TEST_ptr(fixture->msg = load_pkimsg(ir_protected_f, libctx))) { in test_cmp_calc_protection_pkey()
177 || !TEST_ptr(fixture->msg = load_pkimsg(ip_PBM_f, libctx))) { in test_cmp_calc_protection_pbmac()
197 if (!TEST_ptr(fixtur in test_MSG_protect_unprotected_request()
[all...]
H A Docspapitest.c31 if (!TEST_ptr(certbio = BIO_new_file(certstr, "r"))) in get_cert_and_key()
35 if (!TEST_ptr(keybio = BIO_new_file(privkeystr, "r"))) in get_cert_and_key()
39 if (!TEST_ptr(cert) || !TEST_ptr(key)) in get_cert_and_key()
55 if (!TEST_ptr(certbio = BIO_new_file(certstr, "r"))) in get_cert()
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(b in make_dummy_resp()
[all...]
H A Dpem_read_depr_test.c31 if (!TEST_ptr(paramsfile)) in getfile()
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()
133 if (!TEST_ptr(infil in test_read_dsa_public()
[all...]
H A Dbntest.c115 if (!TEST_ptr(ret = getBN(s, attribute)) in getint()
152 if (!TEST_ptr(a = BN_new()) in test_swap()
153 || !TEST_ptr(b = BN_new()) in test_swap()
154 || !TEST_ptr(c = BN_new()) in test_swap()
155 || !TEST_ptr(d = BN_new())) in test_swap()
160 && TEST_ptr(BN_copy(c, a)) in test_swap()
161 && TEST_ptr(BN_copy(d, b)))) in test_swap()
225 if (!TEST_ptr(a = BN_new()) in test_sub()
226 || !TEST_ptr(b = BN_new()) in test_sub()
227 || !TEST_ptr( in test_sub()
[all...]
H A Dectest.c47 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()
50 || !TEST_ptr(ctx = BN_CTX_new()) in group_order_tests()
51 || !TEST_ptr(G = EC_GROUP_get0_generator(group)) in group_order_tests()
52 || !TEST_ptr(P = EC_POINT_new(group)) in group_order_tests()
53 || !TEST_ptr(Q = EC_POINT_new(group)) in group_order_tests()
54 || !TEST_ptr(R = EC_POINT_new(group)) in group_order_tests()
55 || !TEST_ptr(S = EC_POINT_new(group))) in group_order_tests()
174 if (!TEST_ptr(ct in prime_field_tests()
[all...]
H A Drsa_mp_test.c171 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(nu in key2048p3_v2()
[all...]
H A Dcontext_internal_test.c56 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(pre in test_set0_default()
[all...]
H A Dcmp_vfy_test.c57 if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture)))) in set_up()
63 || !TEST_ptr(fixture->cmp_ctx = OSSL_CMP_CTX_new(libctx, NULL)) in set_up()
159 || !TEST_ptr(fixture->msg = load_pkimsg(ip_waiting_f, libctx))) { in test_validate_msg_mac_alg_protection()
195 || !TEST_ptr(fixture->msg = load_pkimsg(ip_waiting_f, libctx))) { in test_validate_msg_mac_alg_protection_bad()
224 || !TEST_ptr(fixture->msg = load_pkimsg(ir_protected_f, libctx)) in test_validate_msg_signature_partial_chain()
255 if (!TEST_ptr(fixture->msg = load_pkimsg(ir_protected_f, libctx)) in test_validate_msg_signature_srvcert()
294 if (!TEST_ptr(fixture->msg = load_pkimsg(ir_protected_0_extracerts, libctx)) in test_validate_msg_signature_sender_cert_untrusted()
308 if (!TEST_ptr(fixture->msg = load_pkimsg(ir_protected_0_extracerts, libctx)) in test_validate_msg_signature_sender_cert_trusted()
322 if (!TEST_ptr(fixture->msg = load_pkimsg(ir_protected_2_extracerts, libctx)) in test_validate_msg_signature_sender_cert_extracert()
337 if (!TEST_ptr(fixtur in test_validate_msg_signature_sender_cert_absent()
[all...]
H A Dproperty_test.c57 if (TEST_ptr(store = ossl_method_store_new(NULL)) in test_property_string()
123 if (TEST_ptr(store = ossl_method_store_new(NULL)) in test_property_parse()
126 && TEST_ptr(p = ossl_parse_property(NULL, parser_tests[n].defn)) in test_property_parse()
127 && TEST_ptr(q = ossl_parse_query(NULL, parser_tests[n].query, 0)) in test_property_parse()
143 if (TEST_ptr(store = ossl_method_store_new(NULL)) in test_property_query_value_create()
145 && TEST_ptr(p = ossl_parse_query(NULL, "wood=oak", 0)) /* undefined */ in test_property_query_value_create()
146 && TEST_ptr(q = ossl_parse_query(NULL, "wood=oak", 1)) /* creates */ in test_property_query_value_create()
147 && TEST_ptr(o = ossl_parse_query(NULL, "wood=oak", 0)) /* defined */ in test_property_query_value_create()
188 if (!TEST_ptr(store = ossl_method_store_new(NULL)) in test_property_parse_error()
238 if (TEST_ptr(stor in test_property_merge()
[all...]
H A Dec_internal_test.c36 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()
90 || !TEST_ptr(group = EC_GROUP_new(meth)) in field_tests()
171 if (!TEST_ptr(b = BN_CTX_get(ctx)) in ec2m_field_sanity()
227 if (!TEST_ptr(group = EC_GROUP_new_by_curve_name(nid)) in field_tests_default()
228 || !TEST_ptr(ctx = BN_CTX_new()) in field_tests_default()
262 if (!TEST_ptr(ctx)) in underflow_test()
272 if (!TEST_ptr(k)) in underflow_test()
279 if (!TEST_ptr(gr in underflow_test()
[all...]
H A Dacvp_test.c98 if (!TEST_ptr(sig = OPENSSL_malloc(sz)) in sig_gen()
99 || !TEST_ptr(md_ctx = EVP_MD_CTX_new()) in sig_gen()
126 if (!TEST_ptr(pkey = EVP_PKEY_Q_keygen(libctx, NULL, "EC", tst->curve_name)) in ecdsa_keygen_test()
159 if (!TEST_ptr(bld = OSSL_PARAM_BLD_new()) in ecdsa_create_pkey()
166 || !TEST_ptr(params = OSSL_PARAM_BLD_to_param(bld)) in ecdsa_create_pkey()
167 || !TEST_ptr(ctx = EVP_PKEY_CTX_new_from_name(libctx, "EC", NULL)) in ecdsa_create_pkey()
194 if (!TEST_ptr(key_ctx = EVP_PKEY_CTX_new_from_pkey(libctx, pkey, "")) in ecdsa_pub_verify_test()
256 if (!TEST_ptr(pkey = EVP_PKEY_Q_keygen(libctx, NULL, "EC", tst->curve_name))) in ecdsa_siggen_test()
289 if (!TEST_ptr(sign = ECDSA_SIG_new()) in ecdsa_sigver_test()
290 || !TEST_ptr(rb in ecdsa_sigver_test()
[all...]
H A Denginetest.c64 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()
269 if (!TEST_ptr(ctx = EVP_PKEY_CTX_new(pkey, NULL))) in test_redirect()
281 if (!TEST_ptr(e = ENGINE_new()) in test_redirect()
296 if (!TEST_ptr(test_rs in test_redirect()
[all...]
H A Devp_kdf_test.c72 ret = TEST_ptr(params) in test_kdf_tls1_prf()
73 && TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_TLS1_PRF)) in test_kdf_tls1_prf()
90 ret = TEST_ptr(params) in test_kdf_tls1_prf_invalid_digest()
91 && TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_TLS1_PRF)) in test_kdf_tls1_prf_invalid_digest()
109 ret = TEST_ptr(params) in test_kdf_tls1_prf_zero_output_size()
110 && TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_TLS1_PRF)) in test_kdf_tls1_prf_zero_output_size()
128 ret = TEST_ptr(params) in test_kdf_tls1_prf_empty_secret()
129 && TEST_ptr(kctx = get_kdfbyname(OSSL_KDF_NAME_TLS1_PRF)) in test_kdf_tls1_prf_empty_secret()
146 ret = TEST_ptr(params) in test_kdf_tls1_prf_1byte_secret()
147 && TEST_ptr(kct in test_kdf_tls1_prf_1byte_secret()
[all...]
H A Dv3ext.c29 if (!TEST_ptr(b = BIO_new_file(infile, "r")) in test_pathlen()
30 || !TEST_ptr(x = PEM_read_bio_X509(b, NULL, NULL, NULL)) in test_pathlen()
50 if (!TEST_ptr(asid1) in test_asid()
51 || !TEST_ptr(asid2) in test_asid()
52 || !TEST_ptr(asid3)) in test_asid()
55 if (!TEST_ptr(val1 = ASN1_INTEGER_new()) in test_asid()
63 if (!TEST_ptr(val2 = ASN1_INTEGER_new()) in test_asid()
71 if (!TEST_ptr(val1 = ASN1_INTEGER_new()) in test_asid()
73 || !TEST_ptr(val2 = ASN1_INTEGER_new()) in test_asid()
155 if (!TEST_ptr(fa in check_addr()
[all...]
H A Dexptest.c55 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()
98 if (!TEST_ptr(mont = BN_MONT_CTX_new())) in test_mod_exp_zero()
164 if (!TEST_ptr(ctx = BN_CTX_new())) in test_mod_exp()
167 if (!TEST_ptr(r_mont = BN_new()) in test_mod_exp()
168 || !TEST_ptr(r_mont_const = BN_new()) in test_mod_exp()
169 || !TEST_ptr(r_recp = BN_new()) in test_mod_exp()
170 || !TEST_ptr(r_simpl in test_mod_exp()
[all...]
H A Dx509_check_cert_pkey_test.c59 if (!TEST_ptr(bio = BIO_new_file(k, "r"))) in test_x509_check_cert_pkey()
62 if (!TEST_ptr(pkey = PEM_read_bio_PrivateKey(bio, NULL, NULL, NULL))) in test_x509_check_cert_pkey()
68 if (!TEST_ptr(bio = BIO_new_file(c, "r"))) in test_x509_check_cert_pkey()
120 if (!TEST_ptr((in = BIO_new_file(file, "r")))) in test_PEM_X509_INFO_read_bio()
163 if (!TEST_ptr(file = test_get_argument(0)) in setup_tests()
164 || !TEST_ptr(num = test_get_argument(1))) in setup_tests()
170 if (!TEST_ptr(c = test_get_argument(0)) in setup_tests()
171 || !TEST_ptr(k = test_get_argument(1)) in setup_tests()
172 || !TEST_ptr(t = test_get_argument(2)) in setup_tests()
173 || !TEST_ptr( in setup_tests()
[all...]
H A Dverify_extra_test.c131 if (!TEST_ptr(v2) in test_distinguishing_id()
170 if (!TEST_ptr(v2) in test_req_distinguishing_id()
235 if (!TEST_ptr(eecert) in do_test_purpose()
236 || !TEST_ptr(untrcert) in do_test_purpose()
237 || !TEST_ptr(trcert) in do_test_purpose()
238 || !TEST_ptr(trusted) in do_test_purpose()
239 || !TEST_ptr(untrusted) in do_test_purpose()
240 || !TEST_ptr(ctx)) in do_test_purpose()
302 if (!TEST_ptr(certs_dir = test_get_argument(0))) in setup_tests()
305 if (!TEST_ptr(root_ in setup_tests()
[all...]
H A Dhmactest.c103 return TEST_ptr(p) && TEST_str_eq(p, test[idx].digest); in test_hmac_md5()
113 if (!TEST_ptr(ctx) in test_hmac_bad()
135 if (!TEST_ptr(ctx = HMAC_CTX_new())) in test_hmac_run()
139 if (!TEST_ptr(ctx) in test_hmac_run()
152 if (!TEST_ptr(p) || !TEST_str_eq(p, test[4].digest)) in test_hmac_run()
165 if (!TEST_ptr(p) || !TEST_str_eq(p, test[5].digest)) in test_hmac_run()
173 if (!TEST_ptr(p) || !TEST_str_eq(p, test[6].digest)) in test_hmac_run()
182 if (!TEST_ptr(p) || !TEST_str_eq(p, test[6].digest)) in test_hmac_run()
194 if (!TEST_ptr(p) || !TEST_str_eq(p, test[6].digest)) in test_hmac_run()
211 if (!TEST_ptr( in test_hmac_single_shot()
[all...]
H A Dprov_config_test.c27 if (!TEST_ptr(configfile)) in test_double_config()
29 if (!TEST_ptr(ctx)) in test_double_config()
39 if (!TEST_ptr(sha256)) in test_double_config()
55 if (!TEST_ptr(recurseconfigfile)) in test_recursive_config()
58 if (!TEST_ptr(ctx)) in test_recursive_config()
82 if (!TEST_ptr(configfile = test_get_argument(0))) in setup_tests()
85 if (!TEST_ptr(recurseconfigfile = test_get_argument(1))) in setup_tests()
H A Dnamemap_internal_test.c25 && TEST_ptr(nm = ossl_namemap_new()) in test_namemap_empty()
59 int ok = TEST_ptr(nm) && test_namemap(nm); in test_namemap_independent()
69 return TEST_ptr(nm) in test_namemap_stored()
83 if (!TEST_ptr(nm)) in test_digestbyname()
92 if (!TEST_ptr(sha256)) in test_digestbyname()
111 if (!TEST_ptr(nm)) in test_cipherbyname()
120 if (!TEST_ptr(aes128)) in test_cipherbyname()
138 if (!TEST_ptr(fetched)) in test_cipher_is_a()
160 if (!TEST_ptr(fetched)) in test_digest_is_a()
/third_party/openssl/test/testutil/
H A Dload.c23 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(bi in load_csr_der()
[all...]
/third_party/openssl/test/helpers/
H A Dpkcs12.c82 if (!TEST_ptr(cert)) in load_cert_asn1()
93 if (!TEST_ptr(pkey)) in load_pkey_asn1()
106 if (!TEST_ptr(pb)) in new_pkcs12_builder()
155 if (!TEST_ptr(pb->p12bio)) { in generate_p12()
163 if (!TEST_ptr(p12)) { in generate_p12()
216 if (!TEST_ptr(p12)) in from_bio_p12()
221 if (!TEST_ptr(p12)) in from_bio_p12()
247 if (!TEST_ptr(p12)) in read_p12()
315 if (!TEST_ptr(p7)) in STACK_OF()
328 if (!TEST_ptr(bag in STACK_OF()
[all...]

Completed in 15 milliseconds

123456