43 BIO *out,
int indent);
60 BIO_printf(out,
"%*sPath Length Constraint: ", indent,
"");
66 BIO_printf(out,
"%*sPolicy Language: ", indent,
"");
70 BIO_printf(out,
"%*sPolicy Text: %s\n", indent,
"",
81 if (strcmp(val->
name,
"language") == 0)
96 else if (strcmp(val->
name,
"pathlen") == 0)
111 else if (strcmp(val->
name,
"policy") == 0)
113 unsigned char *tmp_data = NULL;
117 *policy = ASN1_OCTET_STRING_new();
126 if (strncmp(val->
value,
"hex:", 4) == 0)
128 unsigned char *tmp_data2 =
139 (*policy)->length + val_len + 1);
142 (*policy)->data = tmp_data;
143 memcpy(&(*policy)->data[(*policy)->length],
145 (*policy)->length += val_len;
146 (*policy)->data[(*policy)->length] =
'\0';
152 (*policy)->data = NULL;
153 (*policy)->length = 0;
160 else if (strncmp(val->
value,
"file:", 5) == 0)
162 unsigned char buf[2048];
171 while((n =
BIO_read(b, buf,
sizeof(buf))) > 0
177 (*policy)->length + n + 1);
182 (*policy)->data = tmp_data;
183 memcpy(&(*policy)->data[(*policy)->length],
185 (*policy)->length += n;
186 (*policy)->data[(*policy)->length] =
'\0';
197 else if (strncmp(val->
value,
"text:", 5) == 0)
199 val_len = strlen(val->
value + 5);
201 (*policy)->length + val_len + 1);
204 (*policy)->data = tmp_data;
205 memcpy(&(*policy)->data[(*policy)->length],
206 val->
value + 5, val_len);
207 (*policy)->length += val_len;
208 (*policy)->data[(*policy)->length] =
'\0';
213 (*policy)->data = NULL;
214 (*policy)->length = 0;
237 ASN1_OCTET_STRING_free(*policy);
253 vals = X509V3_parse_list(value);
263 if (*cnf->
name ==
'@')
268 sect = X509V3_get_section(ctx, cnf->
name + 1);
279 &language, &pathlen, &policy);
287 if (!process_pci_value(cnf,
288 &language, &pathlen, &policy))
309 pci = PROXY_CERT_INFO_EXTENSION_new();
322 if (pathlen) { ASN1_INTEGER_free(pathlen); pathlen = NULL; }
323 if (policy) { ASN1_OCTET_STRING_free(policy); policy = NULL; }
324 if (pci) { PROXY_CERT_INFO_EXTENSION_free(pci); pci = NULL; }