Lines Matching refs:NULL
49 static char *opt_config = NULL;
58 static CONF *conf = NULL; /* OpenSSL config file context structure */
59 static OSSL_CMP_CTX *cmp_ctx = NULL; /* the client-side CMP context */
73 static char *opt_server = NULL;
74 static char *opt_proxy = NULL;
75 static char *opt_no_proxy = NULL;
77 static char *opt_recipient = NULL;
78 static char *opt_path = NULL;
84 static char *opt_trusted = NULL;
85 static char *opt_untrusted = NULL;
86 static char *opt_srvcert = NULL;
87 static char *opt_expect_sender = NULL;
91 static char *opt_srvcertout = NULL;
92 static char *opt_extracertsout = NULL;
93 static char *opt_cacertsout = NULL;
94 static char *opt_oldwithold = NULL;
95 static char *opt_newwithnew = NULL;
96 static char *opt_newwithold = NULL;
97 static char *opt_oldwithnew = NULL;
98 static char *opt_crlcert = NULL;
99 static char *opt_oldcrl = NULL;
100 static char *opt_crlout = NULL;
101 static char *opt_template = NULL;
102 static char *opt_keyspec = NULL;
105 static char *opt_ref = NULL;
106 static char *opt_secret = NULL;
107 static char *opt_cert = NULL;
108 static char *opt_own_trusted = NULL;
109 static char *opt_key = NULL;
110 static char *opt_keypass = NULL;
111 static char *opt_digest = NULL;
112 static char *opt_mac = NULL;
113 static char *opt_extracerts = NULL;
117 static char *opt_cmd_s = NULL;
119 static char *opt_geninfo = NULL;
120 static char *opt_infotype_s = NULL;
122 static char *opt_profile = NULL;
125 static char *opt_newkey = NULL;
126 static char *opt_newkeypass = NULL;
127 static char *opt_subject = NULL;
129 static char *opt_reqexts = NULL;
130 static char *opt_sans = NULL;
132 static char *opt_policies = NULL;
133 static char *opt_policy_oids = NULL;
136 static char *opt_csr = NULL;
137 static char *opt_out_trusted = NULL;
140 static char *opt_certout = NULL;
141 static char *opt_chainout = NULL;
144 static char *opt_oldcert = NULL;
145 static char *opt_issuer = NULL;
146 static char *opt_serial = NULL;
158 static char *opt_keyform_s = NULL;
160 static char *opt_otherpass = NULL;
161 static char *opt_engine = NULL;
166 static char *opt_tls_cert = NULL;
167 static char *opt_tls_key = NULL;
168 static char *opt_tls_keypass = NULL;
169 static char *opt_tls_extra = NULL;
170 static char *opt_tls_trusted = NULL;
171 static char *opt_tls_host = NULL;
177 static char *opt_reqin = NULL;
179 static char *opt_reqout = NULL;
180 static char *opt_reqout_only = NULL;
182 static char *opt_rspin = NULL;
184 static char *opt_rspout = NULL;
189 static char *opt_port = NULL;
192 static char *opt_srv_ref = NULL;
193 static char *opt_srv_secret = NULL;
194 static char *opt_srv_cert = NULL;
195 static char *opt_srv_key = NULL;
196 static char *opt_srv_keypass = NULL;
198 static char *opt_srv_trusted = NULL;
199 static char *opt_srv_untrusted = NULL;
200 static char *opt_ref_cert = NULL;
201 static char *opt_rsp_cert = NULL;
202 static char *opt_rsp_crl = NULL;
203 static char *opt_rsp_extracerts = NULL;
204 static char *opt_rsp_capubs = NULL;
205 static char *opt_rsp_newwithnew = NULL;
206 static char *opt_rsp_newwithold = NULL;
207 static char *opt_rsp_oldwithnew = NULL;
216 static char *opt_statusstring = NULL;
224 static X509_VERIFY_PARAM *vpm = NULL;
619 {NULL}
698 {NULL}
780 if (!X509_VERIFY_PARAM_set1_host(ts_vpm, NULL, 0) in truststore_set_host_etc()
781 || !X509_VERIFY_PARAM_set1_ip(ts_vpm, NULL, 0) in truststore_set_host_etc()
782 || !X509_VERIFY_PARAM_set1_email(ts_vpm, NULL, 0)) in truststore_set_host_etc()
787 return (host != NULL && X509_VERIFY_PARAM_set1_ip_asc(ts_vpm, host)) in truststore_set_host_etc()
796 if (msg == NULL || filenames == NULL) { in write_PKIMESSAGE()
800 if (*filenames == NULL) { in write_PKIMESSAGE()
820 if (filenames == NULL || desc == NULL) { in read_PKIMESSAGE()
822 return NULL; in read_PKIMESSAGE()
824 if (*filenames == NULL) { in read_PKIMESSAGE()
826 return NULL; in read_PKIMESSAGE()
833 if (ret == NULL) in read_PKIMESSAGE()
849 OSSL_CMP_MSG *req_new = NULL; in read_write_req_resp()
850 OSSL_CMP_MSG *res = NULL; in read_write_req_resp()
854 if (opt_reqout_only != NULL) { in read_write_req_resp()
860 return NULL; /* stop at this point, not contacting any server */ in read_write_req_resp()
862 if (opt_reqout != NULL && !write_PKIMESSAGE(req, &opt_reqout)) in read_write_req_resp()
864 if (opt_reqin != NULL && opt_rspin == NULL) { in read_write_req_resp()
865 if ((req_new = read_PKIMESSAGE("actually sending", &opt_reqin)) == NULL) in read_write_req_resp()
884 if (opt_rspin != NULL) { in read_write_req_resp()
887 const OSSL_CMP_MSG *actual_req = req_new != NULL ? req_new : req; in read_write_req_resp()
895 if (opt_server == NULL) { in read_write_req_resp()
908 if (res == NULL) in read_write_req_resp()
911 if (req_new != NULL || prev_opt_rspin != NULL) { in read_write_req_resp()
922 res = NULL; in read_write_req_resp()
927 if (opt_rspout != NULL && !write_PKIMESSAGE(res, &opt_rspout)) { in read_write_req_resp()
929 res = NULL; in read_write_req_resp()
941 if (str != NULL) { in set_name()
944 if (n == NULL) in set_name()
960 for (; names != NULL; names = next) { in set_gennames()
973 n = a2i_GENERAL_NAME(NULL, NULL, NULL, GEN_IPADD, names, 0); in set_gennames()
974 if (n == NULL) in set_gennames()
975 n = a2i_GENERAL_NAME(NULL, NULL, NULL, in set_gennames()
976 strchr(names, '@') != NULL ? GEN_EMAIL : in set_gennames()
977 strchr(names, ':') != NULL ? GEN_URI : GEN_DNS, in set_gennames()
981 if (n == NULL) { in set_gennames()
999 if (ts == NULL) in load_trusted()
1000 return NULL; in load_trusted()
1005 && (for_new_cert || truststore_set_host_etc(ts, NULL))) in load_trusted()
1010 return NULL; in load_trusted()
1020 if (file == NULL) in setup_cert()
1022 if ((cert = load_cert_pwd(file, pass, desc)) == NULL) in setup_cert()
1036 if (files == NULL) in setup_certs()
1038 if ((certs = load_certs_multifile(files, opt_otherpass, desc, vpm)) == NULL) in setup_certs()
1050 if (file == NULL) in setup_mock_crlout()
1052 if ((crl = load_crl(file, FORMAT_UNDEF, 0, desc)) == NULL) in setup_mock_crlout()
1064 if (opt_cmd_s != NULL) { in transform_opts()
1092 if (opt_keyform_s != NULL in transform_opts()
1100 if (opt_certform_s != NULL in transform_opts()
1105 if (opt_crlform_s != NULL in transform_opts()
1120 if (srv_ctx == NULL) in setup_srv_ctx()
1121 return NULL; in setup_srv_ctx()
1124 if (opt_srv_ref == NULL) { in setup_srv_ctx()
1125 if (opt_srv_cert == NULL) { in setup_srv_ctx()
1136 if (opt_srv_secret != NULL) { in setup_srv_ctx()
1140 if (pass_str != NULL) { in setup_srv_ctx()
1148 } else if (opt_srv_cert == NULL) { in setup_srv_ctx()
1155 if (opt_srv_secret == NULL in setup_srv_ctx()
1156 && ((opt_srv_cert == NULL) != (opt_srv_key == NULL))) { in setup_srv_ctx()
1164 if (opt_srv_key != NULL) { in setup_srv_ctx()
1169 if (pkey == NULL || !OSSL_CMP_CTX_set1_pkey(ctx, pkey)) { in setup_srv_ctx()
1177 if (opt_srv_trusted != NULL) { in setup_srv_ctx()
1181 if (ts == NULL || !OSSL_CMP_CTX_set0_trusted(ctx, ts)) { in setup_srv_ctx()
1197 if (opt_rsp_cert == NULL) { in setup_srv_ctx()
1267 return NULL; in setup_srv_ctx()
1280 if (opt_srvcert != NULL || opt_trusted != NULL) { in setup_verification_ctx()
1281 if (opt_srvcert != NULL) { in setup_verification_ctx()
1282 if (opt_trusted != NULL) { in setup_verification_ctx()
1284 opt_trusted = NULL; in setup_verification_ctx()
1286 if (opt_recipient != NULL) { in setup_verification_ctx()
1288 opt_recipient = NULL; in setup_verification_ctx()
1295 if (opt_trusted != NULL) { in setup_verification_ctx()
1304 if (ts == NULL || !OSSL_CMP_CTX_set0_trusted(ctx, ts)) { in setup_verification_ctx()
1314 if (opt_out_trusted != NULL) { /* for use in OSSL_CMP_certConf_cb() */ in setup_verification_ctx()
1315 X509_VERIFY_PARAM *out_vpm = NULL; in setup_verification_ctx()
1320 if (out_trusted == NULL) in setup_verification_ctx()
1347 EVP_PKEY *pkey = NULL; in setup_ssl_ctx()
1348 X509_STORE *trust_store = NULL; in setup_ssl_ctx()
1353 if (ssl_ctx == NULL) in setup_ssl_ctx()
1354 return NULL; in setup_ssl_ctx()
1356 if (opt_tls_trusted != NULL) { in setup_ssl_ctx()
1358 if (trust_store == NULL) in setup_ssl_ctx()
1361 SSL_CTX_set_verify(ssl_ctx, SSL_VERIFY_PEER, NULL); in setup_ssl_ctx()
1366 if (opt_tls_cert != NULL && opt_tls_key != NULL) { in setup_ssl_ctx()
1368 STACK_OF(X509) *certs = NULL; in setup_ssl_ctx()
1399 X509_VERIFY_PARAM *tls_vpm = NULL; in setup_ssl_ctx()
1402 if (trust_store != NULL) { in setup_ssl_ctx()
1421 if (trust_store != NULL) in setup_ssl_ctx()
1426 if (opt_tls_extra != NULL) { in setup_ssl_ctx()
1433 if (tls_extra == NULL) in setup_ssl_ctx()
1452 if (pkey == NULL) in setup_ssl_ctx()
1464 pkey = NULL; /* otherwise, for some reason double free! */ in setup_ssl_ctx()
1470 pkey = NULL; /* otherwise, for some reason double free! */ in setup_ssl_ctx()
1477 if (trust_store != NULL) { in setup_ssl_ctx()
1484 opt_tls_host != NULL ? opt_tls_host : host)) in setup_ssl_ctx()
1490 return NULL; in setup_ssl_ctx()
1501 if (!opt_unprotected_requests && opt_secret == NULL && opt_key == NULL) { in setup_protection_ctx()
1506 if (opt_ref == NULL && opt_cert == NULL && opt_subject == NULL) { in setup_protection_ctx()
1511 if (opt_secret == NULL && ((opt_cert == NULL) != (opt_key == NULL))) { in setup_protection_ctx()
1515 if (opt_secret != NULL) { in setup_protection_ctx()
1519 if (pass_string != NULL) { in setup_protection_ctx()
1528 if (opt_cert != NULL || opt_key != NULL) in setup_protection_ctx()
1531 if (opt_ref != NULL in setup_protection_ctx()
1536 if (opt_key != NULL) { in setup_protection_ctx()
1540 if (pkey == NULL || !OSSL_CMP_CTX_set1_pkey(ctx, pkey)) { in setup_protection_ctx()
1546 if (opt_secret == NULL && opt_srvcert == NULL && opt_trusted == NULL) in setup_protection_ctx()
1549 if (opt_cert != NULL) { in setup_protection_ctx()
1551 STACK_OF(X509) *certs = NULL; in setup_protection_ctx()
1552 X509_STORE *own_trusted = NULL; in setup_protection_ctx()
1565 if (opt_own_trusted != NULL) { in setup_protection_ctx()
1568 ok = own_trusted != NULL; in setup_protection_ctx()
1576 } else if (opt_own_trusted != NULL) { in setup_protection_ctx()
1588 if (opt_digest != NULL) { in setup_protection_ctx()
1602 if (opt_mac != NULL) { in setup_protection_ctx()
1631 if (req == NULL) { in set_fallback_pubkey()
1636 if ((pubkey = OSSL_CMP_MSG_get0_certreq_publickey(req)) == NULL in set_fallback_pubkey()
1637 || (pkey = X509_PUBKEY_get0(pubkey)) == NULL) { in set_fallback_pubkey()
1643 if (pkey == NULL || !OSSL_CMP_CTX_set0_newPkey(ctx, 0 /* priv */, pkey1)) { in set_fallback_pubkey()
1663 X509_REQ *csr = NULL; in setup_request_ctx()
1664 X509_EXTENSIONS *exts = NULL; in setup_request_ctx()
1667 if (opt_subject == NULL in setup_request_ctx()
1668 && opt_csr == NULL && opt_oldcert == NULL && opt_cert == NULL in setup_request_ctx()
1675 if (opt_reqin == NULL && opt_newkey == NULL in setup_request_ctx()
1676 && opt_key == NULL && opt_csr == NULL && opt_oldcert == NULL) { in setup_request_ctx()
1680 if (opt_newkey == NULL in setup_request_ctx()
1683 if (opt_csr != NULL) { in setup_request_ctx()
1685 opt_key == NULL ? "" : in setup_request_ctx()
1687 if (opt_reqin != NULL) in setup_request_ctx()
1691 if (opt_key == NULL) { in setup_request_ctx()
1696 if (opt_certout == NULL && opt_reqout_only == NULL) { in setup_request_ctx()
1705 if (opt_subject != NULL) { in setup_request_ctx()
1706 if (opt_ref == NULL && opt_cert == NULL) { in setup_request_ctx()
1715 if (opt_issuer != NULL && opt_cmd != CMP_RR) in setup_request_ctx()
1717 if (opt_reqexts != NULL) in setup_request_ctx()
1721 if (opt_sans != NULL) in setup_request_ctx()
1723 if (opt_policies != NULL) in setup_request_ctx()
1725 if (opt_policy_oids != NULL) in setup_request_ctx()
1732 if (opt_certout != NULL) in setup_request_ctx()
1734 if (opt_chainout != NULL) in setup_request_ctx()
1739 char *ref_cert = opt_oldcert != NULL ? opt_oldcert : opt_cert; in setup_request_ctx()
1741 if (ref_cert == NULL && opt_csr == NULL) { in setup_request_ctx()
1745 if (opt_subject != NULL) in setup_request_ctx()
1747 opt_subject, ref_cert != NULL ? ref_cert : opt_csr); in setup_request_ctx()
1750 if (opt_issuer == NULL && opt_serial == NULL) { in setup_request_ctx()
1751 if (opt_oldcert == NULL && opt_csr == NULL) { in setup_request_ctx()
1755 if (opt_oldcert != NULL && opt_csr != NULL) in setup_request_ctx()
1759 if (opt_issuer == NULL || opt_serial == NULL) { in setup_request_ctx()
1763 if (opt_oldcert != NULL) in setup_request_ctx()
1765 if (opt_csr != NULL) in setup_request_ctx()
1768 if (opt_serial != NULL) { in setup_request_ctx()
1771 if ((sno = s2i_ASN1_INTEGER(NULL, opt_serial)) == NULL) { in setup_request_ctx()
1786 if (opt_serial != NULL) in setup_request_ctx()
1789 if (opt_cmd == CMP_P10CR && opt_csr == NULL) { in setup_request_ctx()
1794 if (opt_recipient == NULL && opt_srvcert == NULL && opt_issuer == NULL in setup_request_ctx()
1795 && opt_oldcert == NULL && opt_cert == NULL) in setup_request_ctx()
1801 if (opt_newkeypass != NULL) in setup_request_ctx()
1803 if (opt_newkey != NULL) in setup_request_ctx()
1809 if (opt_out_trusted != NULL) in setup_request_ctx()
1811 } else if (opt_newkey != NULL) { in setup_request_ctx()
1820 bio_err = NULL; /* suppress diagnostics on first try loading key */ in setup_request_ctx()
1823 if (pkey == NULL) { in setup_request_ctx()
1825 desc = opt_csr == NULL in setup_request_ctx()
1832 if (pkey == NULL || !OSSL_CMP_CTX_set0_newPkey(ctx, priv, pkey)) { in setup_request_ctx()
1836 } else if (opt_reqin != NULL in setup_request_ctx()
1837 && opt_key == NULL && opt_csr == NULL && opt_oldcert == NULL) { in setup_request_ctx()
1849 if (opt_policies != NULL && opt_policy_oids != NULL) { in setup_request_ctx()
1854 if (opt_csr != NULL) { in setup_request_ctx()
1858 csr = load_csr_autofmt(opt_csr, FORMAT_UNDEF, NULL, "PKCS#10 CSR"); in setup_request_ctx()
1859 if (csr == NULL) in setup_request_ctx()
1865 if (opt_reqexts != NULL || opt_policies != NULL) { in setup_request_ctx()
1866 if ((exts = sk_X509_EXTENSION_new_null()) == NULL) in setup_request_ctx()
1868 X509V3_set_ctx(&ext_ctx, NULL, NULL, csr, NULL, X509V3_CTX_REPLACE); in setup_request_ctx()
1870 if (opt_reqexts != NULL in setup_request_ctx()
1876 if (opt_policies != NULL in setup_request_ctx()
1887 if (OSSL_CMP_CTX_reqExtensions_have_SAN(ctx) && opt_sans != NULL) { in setup_request_ctx()
1895 if (opt_sans != NULL) in setup_request_ctx()
1902 if (opt_policy_oids == NULL) in setup_request_ctx()
1907 while (opt_policy_oids != NULL) { in setup_request_ctx()
1919 if ((pinfo = POLICYINFO_new()) == NULL) { in setup_request_ctx()
1935 if (opt_oldcert != NULL) { in setup_request_ctx()
1962 OSSL_CMP_ITAV *itav = NULL; in add_certProfile()
1966 if (ctx == NULL || name == NULL) in add_certProfile()
1969 if ((sk = sk_ASN1_UTF8STRING_new_reserve(NULL, 1)) == NULL) in add_certProfile()
1971 if ((utf8string = ASN1_UTF8STRING_new()) == NULL) in add_certProfile()
1979 if ((itav = OSSL_CMP_ITAV_new0_certProfile(sk)) == NULL) in add_certProfile()
1993 ASN1_OBJECT *obj = NULL; in handle_opt_geninfo()
1994 ASN1_TYPE *type = NULL; in handle_opt_geninfo()
1996 ASN1_INTEGER *aint = NULL; in handle_opt_geninfo()
1997 ASN1_UTF8STRING *text = NULL; in handle_opt_geninfo()
2005 if ((ptr = strchr(oid, ':')) == NULL) { in handle_opt_geninfo()
2010 if ((obj = OBJ_txt2obj(oid, 0)) == NULL) { in handle_opt_geninfo()
2016 if ((type = ASN1_TYPE_new()) == NULL) in handle_opt_geninfo()
2035 if ((aint = ASN1_INTEGER_new()) == NULL in handle_opt_geninfo()
2039 aint = NULL; in handle_opt_geninfo()
2043 if (end == NULL) in handle_opt_geninfo()
2047 if ((text = ASN1_UTF8STRING_new()) == NULL in handle_opt_geninfo()
2052 text = NULL; in handle_opt_geninfo()
2059 if ((itav = OSSL_CMP_ITAV_create(obj, type)) == NULL) { in handle_opt_geninfo()
2063 obj = NULL; in handle_opt_geninfo()
2064 type = NULL; in handle_opt_geninfo()
2093 char *host = NULL, *port = NULL, *path = NULL, *used_path = opt_path; in setup_client_ctx()
2097 const char *proxy_host = NULL; in setup_client_ctx()
2104 if (!opt_use_mock_srv && opt_rspin == NULL) { /* note: -port is not given */ in setup_client_ctx()
2106 if (opt_server == NULL && opt_reqout_only == NULL) { in setup_client_ctx()
2116 if (opt_server == NULL) { in setup_client_ctx()
2117 if (opt_proxy != NULL) in setup_client_ctx()
2119 if (opt_no_proxy != NULL) in setup_client_ctx()
2123 if (!OSSL_HTTP_parse_url(opt_server, &use_ssl, NULL /* user */, in setup_client_ctx()
2125 &path, NULL /* q */, NULL /* frag */)) { in setup_client_ctx()
2137 if (opt_path == NULL) in setup_client_ctx()
2142 if (opt_proxy != NULL && !OSSL_CMP_CTX_set1_proxy(ctx, opt_proxy)) in setup_client_ctx()
2144 if (opt_no_proxy != NULL && !OSSL_CMP_CTX_set1_no_proxy(ctx, opt_no_proxy)) in setup_client_ctx()
2151 if (proxy_host != NULL) in setup_client_ctx()
2162 if (opt_infotype_s == NULL) { in setup_client_ctx()
2179 if (opt_oldwithold != NULL) in setup_client_ctx()
2181 if (opt_newwithnew != NULL) in setup_client_ctx()
2183 if (opt_newwithold != NULL) in setup_client_ctx()
2185 if (opt_oldwithnew != NULL) in setup_client_ctx()
2191 if (opt_template != NULL) in setup_client_ctx()
2193 if (opt_keyspec != NULL) in setup_client_ctx()
2196 if (opt_template == NULL) in setup_client_ctx()
2219 if (opt_rspin != NULL) { in setup_client_ctx()
2221 if (opt_reqin != NULL) in setup_client_ctx()
2224 if (opt_reqin_new_tid && opt_reqin == NULL) in setup_client_ctx()
2226 if (opt_reqin != NULL || opt_reqout != NULL in setup_client_ctx()
2227 || opt_rspin != NULL || opt_rspout != NULL || opt_use_mock_srv) in setup_client_ctx()
2234 if (opt_tls_cert != NULL in setup_client_ctx()
2235 || opt_tls_key != NULL || opt_tls_keypass != NULL) { in setup_client_ctx()
2236 if (opt_tls_key == NULL) { in setup_client_ctx()
2239 } else if (opt_tls_cert == NULL) { in setup_client_ctx()
2245 if ((info = OPENSSL_zalloc(sizeof(*info))) == NULL) in setup_client_ctx()
2251 host = NULL; /* prevent deallocation */ in setup_client_ctx()
2252 if ((info->port = OPENSSL_strdup(server_port)) == NULL) in setup_client_ctx()
2255 info->use_proxy = proxy_host != NULL; in setup_client_ctx()
2258 if (info->ssl_ctx == NULL) in setup_client_ctx()
2275 if (opt_geninfo != NULL && !handle_opt_geninfo(ctx)) in setup_client_ctx()
2277 if (opt_profile != NULL && !add_certProfile(ctx, opt_profile)) in setup_client_ctx()
2281 if (opt_reqout_only == NULL) in setup_client_ctx()
2283 opt_rspin == NULL ? "" : in setup_client_ctx()
2338 BIO *bio = NULL; in save_free_certs()
2344 if (file == NULL) in save_free_certs()
2346 if (certs != NULL) in save_free_certs()
2352 if ((bio = BIO_new(BIO_s_file())) == NULL in save_free_certs()
2355 file, certs == NULL ? "deleting" : "writing", desc); in save_free_certs()
2377 BIO *bio = NULL; in save_crl()
2380 if (file == NULL) in save_crl()
2382 if (crl != NULL) in save_crl()
2385 if ((bio = BIO_new(BIO_s_file())) == NULL in save_crl()
2405 if (file == NULL) in delete_file()
2418 if (file == NULL) in save_cert_or_delete()
2420 if (cert == NULL) { in save_cert_or_delete()
2438 if (file == NULL) in save_crl_or_delete()
2440 return (crl == NULL) ? delete_file(file, desc) : save_crl(crl, file, desc); in save_crl_or_delete()
2447 if (bio == NULL) { in save_template()
2468 if (bio == NULL) { in save_keyspec()
2487 if (name == NULL) in nid_name()
2489 if (name == NULL) in nid_name()
2509 if (itav == NULL) { in print_itavs()
2532 return NULL; in prev_item()
2563 char *res = NULL; in conf_get_string()
2566 while ((end = prev_item(groups, end)) != NULL) { in conf_get_string()
2567 if ((res = app_conf_try_string(src_conf, opt_item, name)) != NULL) in conf_get_string()
2581 if (str == NULL || *str == '\0') in conf_get_number_e()
2601 char *txt = NULL; in read_config()
2612 opt->name != NULL; i++, opt++) in read_config()
2621 opt->name != NULL; i++, opt++) { in read_config()
2661 if (txt == NULL) { in read_config()
2717 if (txt != NULL && txt[0] == '\0') in read_config()
2718 txt = NULL; /* reset option on empty string input */ in read_config()
2735 arg = NULL; in opt_str()
3150 if (!opt_check_rest_arg(NULL)) in get_opts()
3159 BIO *cbio = NULL; in cmp_server()
3165 if ((acbio = http_server_init(prog, opt_port, opt_verbosity)) == NULL) in cmp_server()
3168 char *path = NULL; in cmp_server()
3169 OSSL_CMP_MSG *req = NULL; in cmp_server()
3170 OSSL_CMP_MSG *resp = NULL; in cmp_server()
3190 if (req != NULL) { in cmp_server()
3202 if (resp == NULL) { in cmp_server()
3217 (void)OSSL_CMP_CTX_set1_transactionID(srv_cmp_ctx, NULL); in cmp_server()
3218 (void)OSSL_CMP_CTX_set1_senderNonce(srv_cmp_ctx, NULL); in cmp_server()
3224 cbio = NULL; in cmp_server()
3242 if (keySpec == NULL) { in print_keyspec()
3248 if (mem == NULL) { in print_keyspec()
3270 if (paramtype == V_ASN1_UNDEF || alg->parameter == NULL) { in print_keyspec()
3275 0, ASN1_ITEM_rptr(X509_ALGOR), NULL); in print_keyspec()
3309 if (opt_server != NULL) { in print_status()
3324 string != NULL ? string : "<unknown PKIStatus>"); in print_status()
3331 STACK_OF(X509) *cacerts = NULL; in do_genm()
3333 if (opt_cacertsout == NULL) { in do_genm()
3342 if (cacerts == NULL) { in do_genm()
3351 X509 *oldwithold = NULL; in do_genm()
3352 X509 *newwithnew = NULL; in do_genm()
3353 X509 *newwithold = NULL; in do_genm()
3354 X509 *oldwithnew = NULL; in do_genm()
3357 if (opt_newwithnew == NULL) { in do_genm()
3361 if (opt_oldwithold == NULL) { in do_genm()
3366 if (oldwithold == NULL) in do_genm()
3374 if (newwithnew == NULL) in do_genm()
3376 else if (oldwithold == NULL && oldwithnew != NULL) in do_genm()
3394 X509_CRL *oldcrl = NULL, *crl = NULL; in do_genm()
3395 X509 *crlcert = NULL; in do_genm()
3399 if (opt_oldcrl == NULL && opt_crlcert == NULL) { in do_genm()
3403 if (opt_crlout == NULL) { in do_genm()
3408 if (opt_crlcert != NULL) { in do_genm()
3411 if (crlcert == NULL) in do_genm()
3415 if (opt_oldcrl != NULL) { in do_genm()
3418 if (oldcrl == NULL) in do_genm()
3422 if (opt_oldcrl != NULL && opt_crlcert != NULL) { in do_genm()
3432 if (crl == NULL) in do_genm()
3453 if (certTemplate == NULL) { in do_genm()
3457 if (opt_keyspec != NULL in do_genm()
3466 if (opt_keyspec != NULL) { in do_genm()
3467 if (keySpec == NULL) { in do_genm()
3489 req = OSSL_CMP_ITAV_create(OBJ_nid2obj(opt_infotype), NULL); in do_genm()
3490 if (req == NULL || !OSSL_CMP_CTX_push0_genm_ITAV(ctx, req)) { in do_genm()
3497 if ((itavs = OSSL_CMP_exec_GENM_ses(ctx)) != NULL) { in do_genm()
3540 char *configfile = NULL; in cmp_main()
3542 X509 *newcert = NULL; in cmp_main()
3543 ENGINE *engine = NULL; in cmp_main()
3544 OSSL_CMP_CTX *srv_cmp_ctx = NULL; in cmp_main()
3551 if (vpm == NULL) { in cmp_main()
3557 configfile = opt_config != NULL ? opt_config : default_config_file; in cmp_main()
3558 if (configfile != NULL && configfile[0] != '\0' /* non-empty string */ in cmp_main()
3564 if (conf == NULL) { in cmp_main()
3575 while ((end = prev_item(opt_section, end)) != NULL) { in cmp_main()
3596 if (cmp_ctx == NULL) in cmp_main()
3610 if (opt_engine != NULL) { in cmp_main()
3613 if (engine == NULL) { in cmp_main()
3626 if (opt_tls_cert == NULL && opt_tls_key == NULL && opt_tls_keypass == NULL in cmp_main()
3627 && opt_tls_extra == NULL && opt_tls_trusted == NULL in cmp_main()
3628 && opt_tls_host == NULL) { in cmp_main()
3634 if (opt_port != NULL) { in cmp_main()
3639 if (opt_server != NULL || opt_use_mock_srv) { in cmp_main()
3643 if (opt_reqin != NULL || opt_reqout != NULL) { in cmp_main()
3647 if (opt_rspin != NULL || opt_rspout != NULL) { in cmp_main()
3652 if (opt_server != NULL && opt_use_mock_srv) { in cmp_main()
3664 if (opt_reqout_only == NULL && (opt_use_mock_srv in cmp_main()
3666 || opt_port != NULL in cmp_main()
3671 if ((srv_ctx = setup_srv_ctx(engine)) == NULL) in cmp_main()
3683 if (opt_tls_used && (opt_use_mock_srv || opt_server == NULL)) { in cmp_main()
3688 if (opt_port != NULL) { /* act as very basic CMP HTTP server */ in cmp_main()
3695 if (opt_reqout_only != NULL) { in cmp_main()
3699 if (opt_server != NULL) in cmp_main()
3704 if (opt_reqout != NULL) in cmp_main()
3706 if (opt_rspin != NULL) in cmp_main()
3708 if (opt_rspout != NULL) in cmp_main()
3712 if (opt_rspin != NULL) { in cmp_main()
3713 if (opt_server != NULL) in cmp_main()
3729 if (newcert != NULL) in cmp_main()
3734 if (newcert != NULL) in cmp_main()
3739 if (newcert != NULL) in cmp_main()
3744 if (newcert != NULL) in cmp_main()
3774 if (newcert != NULL && (opt_cmd == CMP_IR || opt_cmd == CMP_CR in cmp_main()
3778 if (newcert != NULL && newchain != NULL /* NULL is on error only */ in cmp_main()
3779 && opt_certout != NULL && opt_chainout != NULL in cmp_main()
3817 if (cmp_ctx != NULL) { in cmp_main()
3821 (void)OSSL_CMP_CTX_set_http_cb_arg(cmp_ctx, NULL); in cmp_main()
3828 if (info != NULL) { in cmp_main()