69 void *
a,
BIO *
bp,
int ind);
72 BIO *
bp,
int ind,
char *name);
87 0, v2i_NAME_CONSTRAINTS,
88 i2r_NAME_CONSTRAINTS,0,
117 ncons = NAME_CONSTRAINTS_new();
123 if (!strncmp(val->
name,
"permitted", 9) && val->
name[9])
125 ptree = &ncons->permittedSubtrees;
128 else if (!strncmp(val->
name,
"excluded", 8) && val->
name[8])
130 ptree = &ncons->excludedSubtrees;
139 sub = GENERAL_SUBTREE_new();
155 NAME_CONSTRAINTS_free(ncons);
157 GENERAL_SUBTREE_free(sub);
169 do_i2r_name_constraints(method, ncons->permittedSubtrees,
170 bp, ind,
"Permitted");
171 do_i2r_name_constraints(method, ncons->excludedSubtrees,
172 bp, ind,
"Excluded");
178 BIO *
bp,
int ind,
char *name)
189 print_nc_ipadd(bp, tree->
base->
d.
ip);
207 p[0], p[1], p[2], p[3],
208 p[4], p[5], p[6], p[7]);
212 for (i = 0; i < 16; i++)
252 r = nc_match(&gntmp, nc);
275 r = nc_match(&gntmp, nc);
286 r = nc_match(gen, nc);
316 r = nc_match_single(gen, sub->
base);
336 r = nc_match_single(gen, sub->
base);
379 if (nm->
modified && i2d_X509_NAME(nm, NULL) < 0)
381 if (base->
modified && i2d_X509_NAME(base, NULL) < 0)
392 char *baseptr = (
char *)base->
data;
393 char *dnsptr = (
char *)dns->
data;
404 if (dnsptr[-1] !=
'.')
408 if (strcasecmp(baseptr, dnsptr))
417 const char *baseptr = (
char *)base->
data;
418 const char *emlptr = (
char *)eml->
data;
420 const char *baseat = strchr(baseptr,
'@');
421 const char *emlat = strchr(emlptr,
'@');
425 if (!baseat && (*baseptr ==
'.'))
430 if (!strcasecmp(baseptr, emlptr))
440 if (baseat != baseptr)
442 if ((baseat - baseptr) != (emlat - emlptr))
445 if (strncmp(baseptr, emlptr, emlat - emlptr))
449 baseptr = baseat + 1;
453 if (strcasecmp(baseptr, emlptr))
462 const char *baseptr = (
char *)base->
data;
463 const char *hostptr = (
char *)uri->
data;
464 const char *p = strchr(hostptr,
':');
467 if (!p || (p[1] !=
'/') || (p[2] !=
'/'))
475 p = strchr(hostptr,
':');
478 p = strchr(hostptr,
'/');
481 hostlen = strlen(hostptr);
483 hostlen = p - hostptr;
491 if (hostlen > base->
length)
493 p = hostptr + hostlen - base->
length;
494 if (!strncasecmp(p, baseptr, base->
length))
500 if ((base->
length != (
int)hostlen) || strncasecmp(hostptr, baseptr, hostlen))