Lines Matching refs:crt

122 static int set_cn(X509 *crt, ...)  in set_cn()  argument
127 va_start(ap, crt); in set_cn()
143 if (!X509_set_subject_name(crt, n)) in set_cn()
159 static int set_altname(X509 *crt, ...) in set_altname() argument
166 va_start(ap, crt); in set_altname()
199 if (!X509_add1_ext_i2d(crt, NID_subject_alt_name, gens, 0, 0)) in set_altname()
210 static int set_cn1(X509 *crt, const char *name) in set_cn1() argument
212 return set_cn(crt, NID_commonName, name, 0); in set_cn1()
216 static int set_cn_and_email(X509 *crt, const char *name) in set_cn_and_email() argument
218 return set_cn(crt, NID_commonName, name, in set_cn_and_email()
222 static int set_cn2(X509 *crt, const char *name) in set_cn2() argument
224 return set_cn(crt, NID_commonName, "dummy value", in set_cn2()
228 static int set_cn3(X509 *crt, const char *name) in set_cn3() argument
230 return set_cn(crt, NID_commonName, name, in set_cn3()
234 static int set_email1(X509 *crt, const char *name) in set_email1() argument
236 return set_cn(crt, NID_pkcs9_emailAddress, name, 0); in set_email1()
239 static int set_email2(X509 *crt, const char *name) in set_email2() argument
241 return set_cn(crt, NID_pkcs9_emailAddress, "dummy@example.com", in set_email2()
245 static int set_email3(X509 *crt, const char *name) in set_email3() argument
247 return set_cn(crt, NID_pkcs9_emailAddress, name, in set_email3()
251 static int set_email_and_cn(X509 *crt, const char *name) in set_email_and_cn() argument
253 return set_cn(crt, NID_pkcs9_emailAddress, name, in set_email_and_cn()
257 static int set_altname_dns(X509 *crt, const char *name) in set_altname_dns() argument
259 return set_altname(crt, GEN_DNS, name, 0); in set_altname_dns()
262 static int set_altname_email(X509 *crt, const char *name) in set_altname_email() argument
264 return set_altname(crt, GEN_EMAIL, name, 0); in set_altname_email()
293 X509 *crt = NULL; in make_cert() local
295 crt = X509_new(); in make_cert()
296 if (crt == NULL) in make_cert()
298 if (!X509_set_version(crt, 3)) in make_cert()
300 ret = crt; in make_cert()
301 crt = NULL; in make_cert()
324 static void run_cert(X509 *crt, const char *nameincert, in run_cert() argument
336 ret = X509_check_host(crt, name, namelen, 0, NULL); in run_cert()
354 ret = X509_check_host(crt, name, namelen, in run_cert()
374 ret = X509_check_email(crt, name, namelen, 0); in run_cert()
401 X509 *crt = make_cert(); in main() local
402 if (crt == NULL) in main()
407 if (!pfn->fn(crt, *pname)) in main()
412 run_cert(crt, *pname, pfn); in main()
413 X509_free(crt); in main()