73 static void print_notice(
BIO *out,
USERNOTICE *notice,
int indent);
108 }
ASN1_ADB_END(POLICYQUALINFO, 0, pqualid, 0, &policydefault_tt, NULL);
119 ASN1_OPT(USERNOTICE, exptext, DISPLAYTEXT)
146 vals = X509V3_parse_list(value);
160 if(!strcmp(pstr,
"ia5org")) {
163 }
else if(*pstr ==
'@') {
165 polsect = X509V3_get_section(ctx, pstr + 1);
172 pol = policy_section(ctx, polsect, ia5org);
181 pol = POLICYINFO_new();
185 POLICYINFO_free(pol);
204 POLICYQUALINFO *qual;
205 if(!(pol = POLICYINFO_new()))
goto merr;
208 if(!strcmp(cnf->
name,
"policyIdentifier")) {
218 if(!pol->qualifiers) pol->qualifiers =
220 if(!(qual = POLICYQUALINFO_new()))
goto merr;
226 strlen(cnf->
value)))
goto merr;
229 if(*cnf->
value !=
'@') {
234 unot = X509V3_get_section(ctx, cnf->
value + 1);
241 qual = notice_section(ctx, unot, ia5org);
244 if(!pol->qualifiers) pol->qualifiers =
266 POLICYINFO_free(pol);
272 static POLICYQUALINFO *notice_section(
X509V3_CTX *ctx,
278 POLICYQUALINFO *qual;
279 if(!(qual = POLICYQUALINFO_new()))
goto merr;
281 if(!(not = USERNOTICE_new()))
goto merr;
285 if(!strcmp(cnf->
name,
"explicitText")) {
288 strlen(cnf->
value)))
goto merr;
289 }
else if(!strcmp(cnf->
name,
"organization")) {
292 if(!(nref = NOTICEREF_new()))
goto merr;
298 strlen(cnf->
value)))
goto merr;
299 }
else if(!strcmp(cnf->
name,
"noticeNumbers")) {
303 if(!(nref = NOTICEREF_new()))
goto merr;
306 nos = X509V3_parse_list(cnf->
value);
312 ret = nref_nos(nref->noticenos, nos);
335 POLICYQUALINFO_free(qual);
366 BIO *out,
int indent)
376 if(pinfo->qualifiers)
377 print_qualifiers(out, pinfo->qualifiers, indent + 2);
382 static void print_qualifiers(
BIO *out,
STACK_OF(POLICYQUALINFO) *quals,
385 POLICYQUALINFO *qualinfo;
397 BIO_printf(out,
"%*sUser Notice:\n", indent,
"");
398 print_notice(out, qualinfo->
d.
usernotice, indent + 2);
412 static void print_notice(
BIO *out,
USERNOTICE *notice,
int indent)
418 BIO_printf(out,
"%*sOrganization: %s\n", indent,
"",
434 BIO_printf(out,
"%*sExplicit Text: %s\n", indent,
"",
448 if (dat->qualifier_set)
449 print_qualifiers(out, dat->qualifier_set, indent + 2);
451 BIO_printf(out,
"%*sNo Qualifiers\n", indent + 2,
"");