Lines Matching refs:crt

134 static int set_cn(X509 *crt, ...)  in set_cn()  argument
139 va_start(ap, crt); in set_cn()
154 if (!X509_set_subject_name(crt, n)) in set_cn()
170 static int set_altname(X509 *crt, ...) in set_altname() argument
177 va_start(ap, crt); in set_altname()
209 if (!X509_add1_ext_i2d(crt, NID_subject_alt_name, gens, 0, 0)) in set_altname()
220 static int set_cn1(X509 *crt, const char *name) in set_cn1() argument
222 return set_cn(crt, NID_commonName, name, 0); in set_cn1()
225 static int set_cn_and_email(X509 *crt, const char *name) in set_cn_and_email() argument
227 return set_cn(crt, NID_commonName, name, in set_cn_and_email()
231 static int set_cn2(X509 *crt, const char *name) in set_cn2() argument
233 return set_cn(crt, NID_commonName, "dummy value", in set_cn2()
237 static int set_cn3(X509 *crt, const char *name) in set_cn3() argument
239 return set_cn(crt, NID_commonName, name, in set_cn3()
243 static int set_email1(X509 *crt, const char *name) in set_email1() argument
245 return set_cn(crt, NID_pkcs9_emailAddress, name, 0); in set_email1()
248 static int set_email2(X509 *crt, const char *name) in set_email2() argument
250 return set_cn(crt, NID_pkcs9_emailAddress, "dummy@example.com", in set_email2()
254 static int set_email3(X509 *crt, const char *name) in set_email3() argument
256 return set_cn(crt, NID_pkcs9_emailAddress, name, in set_email3()
260 static int set_email_and_cn(X509 *crt, const char *name) in set_email_and_cn() argument
262 return set_cn(crt, NID_pkcs9_emailAddress, name, in set_email_and_cn()
266 static int set_altname_dns(X509 *crt, const char *name) in set_altname_dns() argument
268 return set_altname(crt, GEN_DNS, name, 0); in set_altname_dns()
271 static int set_altname_email(X509 *crt, const char *name) in set_altname_email() argument
273 return set_altname(crt, GEN_EMAIL, name, 0); in set_altname_email()
300 X509 *crt = NULL; in make_cert() local
302 crt = X509_new(); in make_cert()
303 if (crt == NULL) in make_cert()
305 if (!X509_set_version(crt, 3)) in make_cert()
307 ret = crt; in make_cert()
308 crt = NULL; in make_cert()
331 static void run_cert(X509 *crt, const char *nameincert, in run_cert() argument
342 ret = X509_check_host(crt, name, namelen, 0, NULL); in run_cert()
356 ret = X509_check_host(crt, name, namelen, in run_cert()
371 ret = X509_check_email(crt, name, namelen, 0); in run_cert()
394 X509 *crt = make_cert(); in main() local
395 if (crt == NULL) { in main()
399 if (!pfn->fn(crt, *pname)) { in main()
403 run_cert(crt, *pname, pfn); in main()
404 X509_free(crt); in main()