98 gnsect = X509V3_get_section(ctx, sect + 1);
100 gnsect = X509V3_parse_list(sect);
120 if (!strncmp(cnf->
name,
"fullname", 9))
122 fnm = gnames_from_sectname(ctx, cnf->
value);
126 else if (!strcmp(cnf->
name,
"relativename"))
131 nm = X509_NAME_new();
134 dnsect = X509V3_get_section(ctx, cnf->
value);
169 *pdp = DIST_POINT_NAME_new();
175 (*pdp)->name.fullname = fnm;
180 (*pdp)->name.relativename = rnm;
194 {0,
"Unused",
"unused"},
195 {1,
"Key Compromise",
"keyCompromise"},
196 {2,
"CA Compromise",
"CACompromise"},
197 {3,
"Affiliation Changed",
"affiliationChanged"},
198 {4,
"Superseded",
"superseded"},
199 {5,
"Cessation Of Operation",
"cessationOfOperation"},
200 {6,
"Certificate Hold",
"certificateHold"},
201 {7,
"Privilege Withdrawn",
"privilegeWithdrawn"},
202 {8,
"AA Compromise",
"AACompromise"},
212 rsk = X509V3_parse_list(value);
222 *preas = ASN1_BIT_STRING_new();
226 for (pbn = reason_flags; pbn->
lname; pbn++)
228 if (!strcmp(pbn->
sname, bnam))
246 static int print_reasons(
BIO *out,
const char *rname,
251 BIO_printf(out,
"%*s%s:\n%*s", indent,
"", rname, indent + 2,
"");
252 for (pbn = reason_flags; pbn->
lname; pbn++)
276 point = DIST_POINT_new();
283 ret = set_dist_point_name(&point->
distpoint, ctx, cnf);
288 if (!strcmp(cnf->
name,
"reasons"))
293 else if (!strcmp(cnf->
name,
"CRLissuer"))
296 gnames_from_sectname(ctx, cnf->
value);
307 DIST_POINT_free(point);
315 GENERAL_NAMES *gens = NULL;
326 dpsect = X509V3_get_section(ctx, cnf->
name);
329 point = crldp_from_section(ctx, dpsect);
335 DIST_POINT_free(point);
343 if(!(gens = GENERAL_NAMES_new()))
348 if(!(point = DIST_POINT_new()))
352 DIST_POINT_free(point);
355 if(!(point->
distpoint = DIST_POINT_NAME_new()))
367 GENERAL_NAME_free(gen);
368 GENERAL_NAMES_free(gens);
389 X509_NAME_free(dpn->
dpname);
420 ASN1_IMP_OPT(ISSUING_DIST_POINT, onlyuser, ASN1_FBOOLEAN, 1),
421 ASN1_IMP_OPT(ISSUING_DIST_POINT, onlyCA, ASN1_FBOOLEAN, 2),
423 ASN1_IMP_OPT(ISSUING_DIST_POINT, indirectCRL, ASN1_FBOOLEAN, 4),
424 ASN1_IMP_OPT(ISSUING_DIST_POINT, onlyattr, ASN1_FBOOLEAN, 5)
453 idp = ISSUING_DIST_POINT_new();
461 ret = set_dist_point_name(&idp->
distpoint, ctx, cnf);
466 if (!strcmp(name,
"onlyuser"))
471 else if (!strcmp(name,
"onlyCA"))
476 else if (!strcmp(name,
"onlyAA"))
481 else if (!strcmp(name,
"indirectCRL"))
486 else if (!strcmp(name,
"onlysomereasons"))
503 ISSUING_DIST_POINT_free(idp);
523 BIO_printf(out,
"%*sFull Name:\n", indent,
"");
529 ntmp.entries = dpn->
name.relativename;
531 indent,
"", indent + 2,
"");
543 print_distpoint(out, idp->
distpoint, indent);
545 BIO_printf(out,
"%*sOnly User Certificates\n", indent,
"");
547 BIO_printf(out,
"%*sOnly CA Certificates\n", indent,
"");
549 BIO_printf(out,
"%*sIndirect CRL\n", indent,
"");
551 print_reasons(out,
"Only Some Reasons",
554 BIO_printf(out,
"%*sOnly Attribute Certificates\n", indent,
"");
574 print_distpoint(out, point->
distpoint, indent);
576 print_reasons(out,
"Reasons", point->
reasons,
580 BIO_printf(out,
"%*sCRL Issuer:\n", indent,
"");
581 print_gens(out, point->
CRLissuer, indent);
592 if (!dpn || (dpn->
type != 1))
594 frag = dpn->
name.relativename;
603 X509_NAME_free(dpn->
dpname);
609 if (i2d_X509_NAME(dpn->
dpname, NULL) < 0)
611 X509_NAME_free(dpn->
dpname);