Lines Matching refs:NULL

24 static char *datadir = NULL;
57 BIO *file = NULL; in compare_with_file()
59 char *memdata, *fullfile = NULL; in compare_with_file()
152 NULL, NULL)) in test_print_key_using_pem()
157 NULL, NULL)) in test_print_key_using_pem()
160 NULL, 0, NULL, "")) in test_print_key_using_pem()
163 NULL, 0, pass_cb, NULL)) in test_print_key_using_pem()
166 NULL, 0, pass_cb_error, in test_print_key_using_pem()
167 NULL)) in test_print_key_using_pem()
171 (const char *)~0, 0, NULL, NULL)) in test_print_key_using_pem()
173 bio_out, pk, NID_pbe_WithSHA1And3_Key_TripleDES_CBC, NULL, 0, in test_print_key_using_pem()
174 NULL, "")) in test_print_key_using_pem()
176 bio_out, pk, NID_pbe_WithSHA1And3_Key_TripleDES_CBC, NULL, 0, in test_print_key_using_pem()
177 pass_cb, NULL)) in test_print_key_using_pem()
179 bio_out, pk, NID_pbe_WithSHA1And3_Key_TripleDES_CBC, NULL, 0, in test_print_key_using_pem()
180 pass_cb_error, NULL)) in test_print_key_using_pem()
183 || !TEST_int_gt(EVP_PKEY_print_private(membio, pk, 0, NULL), 0) in test_print_key_using_pem()
190 NULL, NULL, 0, NULL, NULL)) in test_print_key_using_pem()
193 || !TEST_false(PEM_write_bio_PrivateKey(membio, NULL, in test_print_key_using_pem()
194 NULL, NULL, 0, NULL, NULL)) in test_print_key_using_pem()
195 || !TEST_false(PEM_write_bio_PrivateKey_traditional(membio, NULL, in test_print_key_using_pem()
196 NULL, NULL, 0, NULL, NULL))) in test_print_key_using_pem()
210 OSSL_ENCODER_CTX *ctx = NULL; in test_print_key_type_using_encoder()
217 output_structure = NULL; in test_print_key_type_using_encoder()
238 output_structure = NULL; in test_print_key_type_using_encoder()
270 NULL)) in test_print_key_type_using_encoder()
290 if (!TEST_true(OSSL_ENCODER_CTX_set_cipher(ctx, "AES-256-CBC", NULL)) in test_print_key_type_using_encoder()
296 if (!TEST_false(OSSL_ENCODER_CTX_set_cipher(ctx, "FOO", NULL)) in test_print_key_type_using_encoder()
302 if (!TEST_true(OSSL_ENCODER_CTX_set_cipher(ctx, NULL, NULL)) in test_print_key_type_using_encoder()
352 EVP_PKEY_CTX *ctx = NULL, *key_ctx = NULL; in test_fromdata_rsa()
353 EVP_PKEY *pk = NULL, *copy_pk = NULL, *dup_pk = NULL; in test_fromdata_rsa()
384 if (!TEST_ptr(ctx = EVP_PKEY_CTX_new_from_name(NULL, "RSA", NULL))) in test_fromdata_rsa()
401 if (!TEST_ptr(key_ctx = EVP_PKEY_CTX_new_from_pkey(NULL, pk, ""))) in test_fromdata_rsa()
415 copy_pk = NULL; in test_fromdata_rsa()
420 if (!ret || dup_pk != NULL) in test_fromdata_rsa()
433 for (i = 0; fromdata_params[i].key != NULL; ++i) { in test_fromdata_rsa()
460 const OSSL_PARAM *check_param = NULL; in do_fromdata_rsa_derive()
461 BIGNUM *check_bn = NULL; in do_fromdata_rsa_derive()
462 OSSL_PARAM *todata_params = NULL; in do_fromdata_rsa_derive()
463 EVP_PKEY_CTX *ctx = NULL, *key_ctx = NULL; in do_fromdata_rsa_derive()
464 EVP_PKEY *pk = NULL, *copy_pk = NULL, *dup_pk = NULL; in do_fromdata_rsa_derive()
468 if (!TEST_ptr(ctx = EVP_PKEY_CTX_new_from_name(NULL, "RSA", NULL)) in do_fromdata_rsa_derive()
481 for (i = 0; check[i].pname != NULL; i++) { in do_fromdata_rsa_derive()
492 check_bn = NULL; in do_fromdata_rsa_derive()
503 if (!TEST_ptr(key_ctx = EVP_PKEY_CTX_new_from_pkey(NULL, pk, ""))) in do_fromdata_rsa_derive()
517 copy_pk = NULL; in do_fromdata_rsa_derive()
519 if (dup_pk != NULL) in do_fromdata_rsa_derive()
544 OSSL_PARAM_BLD *bld = NULL; in test_fromdata_rsa_derive_from_pq_sp800()
545 BIGNUM *n = NULL, *e = NULL, *d = NULL, *p = NULL, *q = NULL; in test_fromdata_rsa_derive_from_pq_sp800()
546 BIGNUM *dmp1 = NULL, *dmq1 = NULL, *iqmp = NULL; in test_fromdata_rsa_derive_from_pq_sp800()
547 OSSL_PARAM *fromdata_params = NULL; in test_fromdata_rsa_derive_from_pq_sp800()
594 || !TEST_ptr(n = BN_bin2bn(n_data, sizeof(n_data), NULL)) in test_fromdata_rsa_derive_from_pq_sp800()
595 || !TEST_ptr(e = BN_bin2bn(e_data, sizeof(e_data), NULL)) in test_fromdata_rsa_derive_from_pq_sp800()
596 || !TEST_ptr(d = BN_bin2bn(d_data, sizeof(d_data), NULL)) in test_fromdata_rsa_derive_from_pq_sp800()
597 || !TEST_ptr(p = BN_bin2bn(p_data, sizeof(p_data), NULL)) in test_fromdata_rsa_derive_from_pq_sp800()
598 || !TEST_ptr(q = BN_bin2bn(q_data, sizeof(q_data), NULL)) in test_fromdata_rsa_derive_from_pq_sp800()
599 || !TEST_ptr(dmp1 = BN_bin2bn(dmp1_data, sizeof(dmp1_data), NULL)) in test_fromdata_rsa_derive_from_pq_sp800()
600 || !TEST_ptr(dmq1 = BN_bin2bn(dmq1_data, sizeof(dmq1_data), NULL)) in test_fromdata_rsa_derive_from_pq_sp800()
601 || !TEST_ptr(iqmp = BN_bin2bn(iqmp_data, sizeof(iqmp_data), NULL)) in test_fromdata_rsa_derive_from_pq_sp800()
620 cdata[3].pname = NULL; in test_fromdata_rsa_derive_from_pq_sp800()
621 cdata[3].comparebn = NULL; in test_fromdata_rsa_derive_from_pq_sp800()
640 OSSL_PARAM_BLD *bld = NULL; in test_fromdata_rsa_derive_from_pq_multiprime()
641 BIGNUM *n = NULL, *e = NULL, *d = NULL; in test_fromdata_rsa_derive_from_pq_multiprime()
642 BIGNUM *p = NULL, *q = NULL, *p2 = NULL; in test_fromdata_rsa_derive_from_pq_multiprime()
643 BIGNUM *dmp1 = NULL, *dmq1 = NULL, *iqmp = NULL; in test_fromdata_rsa_derive_from_pq_multiprime()
644 BIGNUM *exp3 = NULL, *coeff2 = NULL; in test_fromdata_rsa_derive_from_pq_multiprime()
645 OSSL_PARAM *fromdata_params = NULL; in test_fromdata_rsa_derive_from_pq_multiprime()
776 || !TEST_ptr(n = BN_bin2bn(n_data, sizeof(n_data), NULL)) in test_fromdata_rsa_derive_from_pq_multiprime()
777 || !TEST_ptr(e = BN_bin2bn(e_data, sizeof(e_data), NULL)) in test_fromdata_rsa_derive_from_pq_multiprime()
778 || !TEST_ptr(d = BN_bin2bn(d_data, sizeof(d_data), NULL)) in test_fromdata_rsa_derive_from_pq_multiprime()
779 || !TEST_ptr(p = BN_bin2bn(p_data, sizeof(p_data), NULL)) in test_fromdata_rsa_derive_from_pq_multiprime()
780 || !TEST_ptr(q = BN_bin2bn(q_data, sizeof(q_data), NULL)) in test_fromdata_rsa_derive_from_pq_multiprime()
781 || !TEST_ptr(p2 = BN_bin2bn(p2_data, sizeof(p2_data), NULL)) in test_fromdata_rsa_derive_from_pq_multiprime()
782 || !TEST_ptr(exp3 = BN_bin2bn(exp3_data, sizeof(exp3_data), NULL)) in test_fromdata_rsa_derive_from_pq_multiprime()
783 || !TEST_ptr(coeff2 = BN_bin2bn(coeff2_data, sizeof(coeff2_data), NULL)) in test_fromdata_rsa_derive_from_pq_multiprime()
784 || !TEST_ptr(dmp1 = BN_bin2bn(dmp1_data, sizeof(dmp1_data), NULL)) in test_fromdata_rsa_derive_from_pq_multiprime()
785 || !TEST_ptr(dmq1 = BN_bin2bn(dmq1_data, sizeof(dmq1_data), NULL)) in test_fromdata_rsa_derive_from_pq_multiprime()
786 || !TEST_ptr(iqmp = BN_bin2bn(iqmp_data, sizeof(iqmp_data), NULL)) in test_fromdata_rsa_derive_from_pq_multiprime()
823 cdata[11].pname = NULL; in test_fromdata_rsa_derive_from_pq_multiprime()
824 cdata[11].comparebn = NULL; in test_fromdata_rsa_derive_from_pq_multiprime()
847 EVP_PKEY_CTX *ctx = NULL, *key_ctx = NULL; in test_evp_pkey_get_bn_param_large()
848 EVP_PKEY *pk = NULL; in test_evp_pkey_get_bn_param_large()
849 OSSL_PARAM_BLD *bld = NULL; in test_evp_pkey_get_bn_param_large()
850 OSSL_PARAM *fromdata_params = NULL; in test_evp_pkey_get_bn_param_large()
851 BIGNUM *n = NULL, *e = NULL, *d = NULL, *n_out = NULL; in test_evp_pkey_get_bn_param_large()
868 || !TEST_ptr(n = BN_bin2bn(n_data, sizeof(n_data), NULL)) in test_evp_pkey_get_bn_param_large()
869 || !TEST_ptr(e = BN_bin2bn(e_data, sizeof(e_data), NULL)) in test_evp_pkey_get_bn_param_large()
870 || !TEST_ptr(d = BN_bin2bn(d_data, sizeof(d_data), NULL)) in test_evp_pkey_get_bn_param_large()
875 || !TEST_ptr(ctx = EVP_PKEY_CTX_new_from_name(NULL, "RSA", NULL)) in test_evp_pkey_get_bn_param_large()
879 || !TEST_ptr(key_ctx = EVP_PKEY_CTX_new_from_pkey(NULL, pk, "")) in test_evp_pkey_get_bn_param_large()
903 EVP_PKEY_CTX *ctx = NULL, *key_ctx = NULL; in test_fromdata_dh_named_group()
904 EVP_PKEY *pk = NULL, *copy_pk = NULL, *dup_pk = NULL; in test_fromdata_dh_named_group()
906 BIGNUM *pub = NULL, *priv = NULL; in test_fromdata_dh_named_group()
907 BIGNUM *pub_out = NULL, *priv_out = NULL; in test_fromdata_dh_named_group()
908 BIGNUM *p = NULL, *q = NULL, *g = NULL, *j = NULL; in test_fromdata_dh_named_group()
909 OSSL_PARAM *fromdata_params = NULL; in test_fromdata_dh_named_group()
910 OSSL_PARAM_BLD *bld = NULL; in test_fromdata_dh_named_group()
952 || !TEST_ptr(pub = BN_bin2bn(pub_data, sizeof(pub_data), NULL)) in test_fromdata_dh_named_group()
953 || !TEST_ptr(priv = BN_bin2bn(priv_data, sizeof(priv_data), NULL)) in test_fromdata_dh_named_group()
964 if (!TEST_ptr(ctx = EVP_PKEY_CTX_new_from_name(NULL, "DH", NULL))) in test_fromdata_dh_named_group()
979 NULL, sizeof(name_out), in test_fromdata_dh_named_group()
1051 p = NULL; in test_fromdata_dh_named_group()
1053 q = NULL; in test_fromdata_dh_named_group()
1055 g = NULL; in test_fromdata_dh_named_group()
1057 j = NULL; in test_fromdata_dh_named_group()
1059 pub_out = NULL; in test_fromdata_dh_named_group()
1061 priv_out = NULL; in test_fromdata_dh_named_group()
1063 if (!TEST_ptr(key_ctx = EVP_PKEY_CTX_new_from_pkey(NULL, pk, ""))) in test_fromdata_dh_named_group()
1072 key_ctx = NULL; in test_fromdata_dh_named_group()
1078 copy_pk = NULL; in test_fromdata_dh_named_group()
1083 if (!ret || dup_pk != NULL) in test_fromdata_dh_named_group()
1117 EVP_PKEY_CTX *ctx = NULL, *key_ctx = NULL; in test_fromdata_dh_fips186_4()
1118 EVP_PKEY *pk = NULL, *dup_pk = NULL; in test_fromdata_dh_fips186_4()
1120 BIGNUM *pub = NULL, *priv = NULL; in test_fromdata_dh_fips186_4()
1121 BIGNUM *pub_out = NULL, *priv_out = NULL; in test_fromdata_dh_fips186_4()
1122 BIGNUM *p = NULL, *q = NULL, *g = NULL, *j = NULL; in test_fromdata_dh_fips186_4()
1123 OSSL_PARAM_BLD *bld = NULL; in test_fromdata_dh_fips186_4()
1124 OSSL_PARAM *fromdata_params = NULL; in test_fromdata_dh_fips186_4()
1167 || !TEST_ptr(pub = BN_bin2bn(pub_data, sizeof(pub_data), NULL)) in test_fromdata_dh_fips186_4()
1168 || !TEST_ptr(priv = BN_bin2bn(priv_data, sizeof(priv_data), NULL)) in test_fromdata_dh_fips186_4()
1179 if (!TEST_ptr(ctx = EVP_PKEY_CTX_new_from_name(NULL, "DH", NULL))) in test_fromdata_dh_fips186_4()
1235 p = NULL; in test_fromdata_dh_fips186_4()
1237 q = NULL; in test_fromdata_dh_fips186_4()
1239 g = NULL; in test_fromdata_dh_fips186_4()
1241 j = NULL; in test_fromdata_dh_fips186_4()
1243 pub_out = NULL; in test_fromdata_dh_fips186_4()
1245 priv_out = NULL; in test_fromdata_dh_fips186_4()
1247 if (!TEST_ptr(key_ctx = EVP_PKEY_CTX_new_from_pkey(NULL, pk, ""))) in test_fromdata_dh_fips186_4()
1256 key_ctx = NULL; in test_fromdata_dh_fips186_4()
1261 if (!ret || dup_pk != NULL) in test_fromdata_dh_fips186_4()
1315 EVP_PKEY_CTX *ctx = NULL, *ctx2 = NULL; in test_fromdata_ecx()
1316 EVP_PKEY *pk = NULL, *copy_pk = NULL, *dup_pk = NULL; in test_fromdata_ecx()
1317 const char *alg = NULL; in test_fromdata_ecx()
1438 OSSL_PARAM *fromdata_params = NULL; in test_fromdata_ecx()
1440 OSSL_PARAM *orig_fromdata_params = NULL; in test_fromdata_ecx()
1478 ctx = EVP_PKEY_CTX_new_from_name(NULL, alg, NULL); in test_fromdata_ecx()
1506 if (!TEST_ptr(ctx2 = EVP_PKEY_CTX_new_from_pkey(NULL, pk, NULL))) in test_fromdata_ecx()
1532 ctx2 = NULL; in test_fromdata_ecx()
1538 if (!TEST_ptr(ctx2 = EVP_PKEY_CTX_new_from_pkey(NULL, copy_pk, NULL)) in test_fromdata_ecx()
1543 ctx2 = NULL; in test_fromdata_ecx()
1545 copy_pk = NULL; in test_fromdata_ecx()
1553 if (!ret || dup_pk != NULL) in test_fromdata_ecx()
1578 EVP_PKEY_CTX *ctx = NULL; in test_fromdata_ec()
1579 EVP_PKEY *pk = NULL, *copy_pk = NULL, *dup_pk = NULL; in test_fromdata_ec()
1580 OSSL_PARAM_BLD *bld = NULL; in test_fromdata_ec()
1581 BIGNUM *ec_priv_bn = NULL; in test_fromdata_ec()
1582 BIGNUM *bn_priv = NULL; in test_fromdata_ec()
1583 OSSL_PARAM *fromdata_params = NULL; in test_fromdata_ec()
1619 const OSSL_PARAM *gettable = NULL; in test_fromdata_ec()
1621 EC_GROUP *group = NULL; in test_fromdata_ec()
1622 BIGNUM *group_a = NULL; in test_fromdata_ec()
1623 BIGNUM *group_b = NULL; in test_fromdata_ec()
1624 BIGNUM *group_p = NULL; in test_fromdata_ec()
1625 BIGNUM *a = NULL; in test_fromdata_ec()
1626 BIGNUM *b = NULL; in test_fromdata_ec()
1627 BIGNUM *p = NULL; in test_fromdata_ec()
1633 sizeof(ec_priv_keydata), NULL))) in test_fromdata_ec()
1655 ctx = EVP_PKEY_CTX_new_from_name(NULL, alg, NULL); in test_fromdata_ec()
1686 copy_pk = NULL; in test_fromdata_ec()
1701 || !TEST_true(EC_GROUP_get_curve(group, group_p, group_a, group_b, NULL))) in test_fromdata_ec()
1714 group = NULL; in test_fromdata_ec()
1716 group_p = NULL; in test_fromdata_ec()
1718 group_a = NULL; in test_fromdata_ec()
1720 group_b = NULL; in test_fromdata_ec()
1745 bn_priv = NULL; in test_fromdata_ec()
1750 if (!ret || dup_pk != NULL) in test_fromdata_ec()
1783 EVP_PKEY_CTX *pctx = NULL, *ctx = NULL, *kctx = NULL; in test_ec_dup_no_operation()
1784 EVP_PKEY *param = NULL, *pkey = NULL; in test_ec_dup_no_operation()
1786 if (!TEST_ptr(pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_EC, NULL)) in test_ec_dup_no_operation()
1795 pctx = NULL; in test_ec_dup_no_operation()
1797 if (!TEST_ptr(ctx = EVP_PKEY_CTX_new_from_pkey(NULL, param, NULL)) in test_ec_dup_no_operation()
1816 EVP_PKEY_CTX *pctx = NULL, *ctx = NULL, *kctx = NULL; in test_ec_dup_keygen_operation()
1817 EVP_PKEY *param = NULL, *pkey = NULL; in test_ec_dup_keygen_operation()
1819 if (!TEST_ptr(pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_EC, NULL)) in test_ec_dup_keygen_operation()
1828 pctx = NULL; in test_ec_dup_keygen_operation()
1830 if (!TEST_ptr(ctx = EVP_PKEY_CTX_new_from_pkey(NULL, param, NULL)) in test_ec_dup_keygen_operation()
1850 EVP_PKEY_CTX *ctx = NULL, *key_ctx = NULL; in test_fromdata_dsa_fips186_4()
1851 EVP_PKEY *pk = NULL, *copy_pk = NULL, *dup_pk = NULL; in test_fromdata_dsa_fips186_4()
1852 BIGNUM *pub = NULL, *priv = NULL; in test_fromdata_dsa_fips186_4()
1853 BIGNUM *p = NULL, *q = NULL, *g = NULL; in test_fromdata_dsa_fips186_4()
1854 BIGNUM *pub_out = NULL, *priv_out = NULL; in test_fromdata_dsa_fips186_4()
1855 BIGNUM *p_out = NULL, *q_out = NULL, *g_out = NULL, *j_out = NULL; in test_fromdata_dsa_fips186_4()
1860 OSSL_PARAM_BLD *bld = NULL; in test_fromdata_dsa_fips186_4()
1861 OSSL_PARAM *fromdata_params = NULL; in test_fromdata_dsa_fips186_4()
1966 || !TEST_ptr(pub = BN_bin2bn(pub_data, sizeof(pub_data), NULL)) in test_fromdata_dsa_fips186_4()
1967 || !TEST_ptr(priv = BN_bin2bn(priv_data, sizeof(priv_data), NULL)) in test_fromdata_dsa_fips186_4()
1968 || !TEST_ptr(p = BN_bin2bn(p_data, sizeof(p_data), NULL)) in test_fromdata_dsa_fips186_4()
1969 || !TEST_ptr(q = BN_bin2bn(q_data, sizeof(q_data), NULL)) in test_fromdata_dsa_fips186_4()
1970 || !TEST_ptr(g = BN_bin2bn(g_data, sizeof(g_data), NULL)) in test_fromdata_dsa_fips186_4()
1991 if (!TEST_ptr(ctx = EVP_PKEY_CTX_new_from_name(NULL, "DSA", NULL))) in test_fromdata_dsa_fips186_4()
2049 p_out = NULL; in test_fromdata_dsa_fips186_4()
2051 q_out = NULL; in test_fromdata_dsa_fips186_4()
2053 g_out = NULL; in test_fromdata_dsa_fips186_4()
2055 j_out = NULL; in test_fromdata_dsa_fips186_4()
2057 pub_out = NULL; in test_fromdata_dsa_fips186_4()
2059 priv_out = NULL; in test_fromdata_dsa_fips186_4()
2061 if (!TEST_ptr(key_ctx = EVP_PKEY_CTX_new_from_pkey(NULL, pk, ""))) in test_fromdata_dsa_fips186_4()
2070 key_ctx = NULL; in test_fromdata_dsa_fips186_4()
2076 copy_pk = NULL; in test_fromdata_dsa_fips186_4()
2081 if (!ret || dup_pk != NULL) in test_fromdata_dsa_fips186_4()
2118 EVP_PKEY_CTX *ctx = NULL; in test_check_dsa()
2120 if (!TEST_ptr(ctx = EVP_PKEY_CTX_new_from_name(NULL, "DSA", NULL)) in test_check_dsa()
2158 EVP_PKEY_CTX *pctx = NULL, *dctx = NULL; in test_evp_pkey_ctx_dup_kdf()
2159 OSSL_PARAM *params = NULL; in test_evp_pkey_ctx_dup_kdf()
2164 if (!TEST_ptr(pctx = EVP_PKEY_CTX_new_from_name(NULL, "HKDF", NULL))) in test_evp_pkey_ctx_dup_kdf()
2170 if (!TEST_int_eq(EVP_PKEY_derive(pctx, NULL, &len), 1) in test_evp_pkey_ctx_dup_kdf()
2172 || !TEST_int_eq(EVP_PKEY_derive(dctx, NULL, &dlen), 1) in test_evp_pkey_ctx_dup_kdf()