diff options
Diffstat (limited to 'src/lib/libcrypto/x509v3/x509v3.h')
-rw-r--r-- | src/lib/libcrypto/x509v3/x509v3.h | 862 |
1 files changed, 0 insertions, 862 deletions
diff --git a/src/lib/libcrypto/x509v3/x509v3.h b/src/lib/libcrypto/x509v3/x509v3.h deleted file mode 100644 index b45626a885..0000000000 --- a/src/lib/libcrypto/x509v3/x509v3.h +++ /dev/null | |||
@@ -1,862 +0,0 @@ | |||
1 | /* $OpenBSD: x509v3.h,v 1.16 2015/02/10 13:28:17 jsing Exp $ */ | ||
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | ||
3 | * project 1999. | ||
4 | */ | ||
5 | /* ==================================================================== | ||
6 | * Copyright (c) 1999-2004 The OpenSSL Project. All rights reserved. | ||
7 | * | ||
8 | * Redistribution and use in source and binary forms, with or without | ||
9 | * modification, are permitted provided that the following conditions | ||
10 | * are met: | ||
11 | * | ||
12 | * 1. Redistributions of source code must retain the above copyright | ||
13 | * notice, this list of conditions and the following disclaimer. | ||
14 | * | ||
15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
16 | * notice, this list of conditions and the following disclaimer in | ||
17 | * the documentation and/or other materials provided with the | ||
18 | * distribution. | ||
19 | * | ||
20 | * 3. All advertising materials mentioning features or use of this | ||
21 | * software must display the following acknowledgment: | ||
22 | * "This product includes software developed by the OpenSSL Project | ||
23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
24 | * | ||
25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
26 | * endorse or promote products derived from this software without | ||
27 | * prior written permission. For written permission, please contact | ||
28 | * licensing@OpenSSL.org. | ||
29 | * | ||
30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
31 | * nor may "OpenSSL" appear in their names without prior written | ||
32 | * permission of the OpenSSL Project. | ||
33 | * | ||
34 | * 6. Redistributions of any form whatsoever must retain the following | ||
35 | * acknowledgment: | ||
36 | * "This product includes software developed by the OpenSSL Project | ||
37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
38 | * | ||
39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
51 | * ==================================================================== | ||
52 | * | ||
53 | * This product includes cryptographic software written by Eric Young | ||
54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
55 | * Hudson (tjh@cryptsoft.com). | ||
56 | * | ||
57 | */ | ||
58 | #ifndef HEADER_X509V3_H | ||
59 | #define HEADER_X509V3_H | ||
60 | |||
61 | #include <openssl/opensslconf.h> | ||
62 | |||
63 | #include <openssl/bio.h> | ||
64 | #include <openssl/x509.h> | ||
65 | #include <openssl/conf.h> | ||
66 | |||
67 | #ifdef __cplusplus | ||
68 | extern "C" { | ||
69 | #endif | ||
70 | |||
71 | /* Forward reference */ | ||
72 | struct v3_ext_method; | ||
73 | struct v3_ext_ctx; | ||
74 | |||
75 | /* Useful typedefs */ | ||
76 | |||
77 | typedef void * (*X509V3_EXT_NEW)(void); | ||
78 | typedef void (*X509V3_EXT_FREE)(void *); | ||
79 | typedef void * (*X509V3_EXT_D2I)(void *, const unsigned char ** , long); | ||
80 | typedef int (*X509V3_EXT_I2D)(void *, unsigned char **); | ||
81 | typedef STACK_OF(CONF_VALUE) * | ||
82 | (*X509V3_EXT_I2V)(const struct v3_ext_method *method, void *ext, | ||
83 | STACK_OF(CONF_VALUE) *extlist); | ||
84 | typedef void * (*X509V3_EXT_V2I)(const struct v3_ext_method *method, | ||
85 | struct v3_ext_ctx *ctx, | ||
86 | STACK_OF(CONF_VALUE) *values); | ||
87 | typedef char * (*X509V3_EXT_I2S)(const struct v3_ext_method *method, void *ext); | ||
88 | typedef void * (*X509V3_EXT_S2I)(const struct v3_ext_method *method, | ||
89 | struct v3_ext_ctx *ctx, const char *str); | ||
90 | typedef int (*X509V3_EXT_I2R)(const struct v3_ext_method *method, void *ext, | ||
91 | BIO *out, int indent); | ||
92 | typedef void * (*X509V3_EXT_R2I)(const struct v3_ext_method *method, | ||
93 | struct v3_ext_ctx *ctx, const char *str); | ||
94 | |||
95 | /* V3 extension structure */ | ||
96 | |||
97 | struct v3_ext_method { | ||
98 | int ext_nid; | ||
99 | int ext_flags; | ||
100 | /* If this is set the following four fields are ignored */ | ||
101 | ASN1_ITEM_EXP *it; | ||
102 | /* Old style ASN1 calls */ | ||
103 | X509V3_EXT_NEW ext_new; | ||
104 | X509V3_EXT_FREE ext_free; | ||
105 | X509V3_EXT_D2I d2i; | ||
106 | X509V3_EXT_I2D i2d; | ||
107 | |||
108 | /* The following pair is used for string extensions */ | ||
109 | X509V3_EXT_I2S i2s; | ||
110 | X509V3_EXT_S2I s2i; | ||
111 | |||
112 | /* The following pair is used for multi-valued extensions */ | ||
113 | X509V3_EXT_I2V i2v; | ||
114 | X509V3_EXT_V2I v2i; | ||
115 | |||
116 | /* The following are used for raw extensions */ | ||
117 | X509V3_EXT_I2R i2r; | ||
118 | X509V3_EXT_R2I r2i; | ||
119 | |||
120 | void *usr_data; /* Any extension specific data */ | ||
121 | }; | ||
122 | |||
123 | typedef struct X509V3_CONF_METHOD_st { | ||
124 | char * (*get_string)(void *db, char *section, char *value); | ||
125 | STACK_OF(CONF_VALUE) * (*get_section)(void *db, char *section); | ||
126 | void (*free_string)(void *db, char * string); | ||
127 | void (*free_section)(void *db, STACK_OF(CONF_VALUE) *section); | ||
128 | } X509V3_CONF_METHOD; | ||
129 | |||
130 | /* Context specific info */ | ||
131 | struct v3_ext_ctx { | ||
132 | #define CTX_TEST 0x1 | ||
133 | int flags; | ||
134 | X509 *issuer_cert; | ||
135 | X509 *subject_cert; | ||
136 | X509_REQ *subject_req; | ||
137 | X509_CRL *crl; | ||
138 | X509V3_CONF_METHOD *db_meth; | ||
139 | void *db; | ||
140 | /* Maybe more here */ | ||
141 | }; | ||
142 | |||
143 | typedef struct v3_ext_method X509V3_EXT_METHOD; | ||
144 | |||
145 | DECLARE_STACK_OF(X509V3_EXT_METHOD) | ||
146 | |||
147 | /* ext_flags values */ | ||
148 | #define X509V3_EXT_DYNAMIC 0x1 | ||
149 | #define X509V3_EXT_CTX_DEP 0x2 | ||
150 | #define X509V3_EXT_MULTILINE 0x4 | ||
151 | |||
152 | typedef BIT_STRING_BITNAME ENUMERATED_NAMES; | ||
153 | |||
154 | typedef struct BASIC_CONSTRAINTS_st { | ||
155 | int ca; | ||
156 | ASN1_INTEGER *pathlen; | ||
157 | } BASIC_CONSTRAINTS; | ||
158 | |||
159 | |||
160 | typedef struct PKEY_USAGE_PERIOD_st { | ||
161 | ASN1_GENERALIZEDTIME *notBefore; | ||
162 | ASN1_GENERALIZEDTIME *notAfter; | ||
163 | } PKEY_USAGE_PERIOD; | ||
164 | |||
165 | typedef struct otherName_st { | ||
166 | ASN1_OBJECT *type_id; | ||
167 | ASN1_TYPE *value; | ||
168 | } OTHERNAME; | ||
169 | |||
170 | typedef struct EDIPartyName_st { | ||
171 | ASN1_STRING *nameAssigner; | ||
172 | ASN1_STRING *partyName; | ||
173 | } EDIPARTYNAME; | ||
174 | |||
175 | typedef struct GENERAL_NAME_st { | ||
176 | |||
177 | #define GEN_OTHERNAME 0 | ||
178 | #define GEN_EMAIL 1 | ||
179 | #define GEN_DNS 2 | ||
180 | #define GEN_X400 3 | ||
181 | #define GEN_DIRNAME 4 | ||
182 | #define GEN_EDIPARTY 5 | ||
183 | #define GEN_URI 6 | ||
184 | #define GEN_IPADD 7 | ||
185 | #define GEN_RID 8 | ||
186 | |||
187 | int type; | ||
188 | union { | ||
189 | char *ptr; | ||
190 | OTHERNAME *otherName; /* otherName */ | ||
191 | ASN1_IA5STRING *rfc822Name; | ||
192 | ASN1_IA5STRING *dNSName; | ||
193 | ASN1_TYPE *x400Address; | ||
194 | X509_NAME *directoryName; | ||
195 | EDIPARTYNAME *ediPartyName; | ||
196 | ASN1_IA5STRING *uniformResourceIdentifier; | ||
197 | ASN1_OCTET_STRING *iPAddress; | ||
198 | ASN1_OBJECT *registeredID; | ||
199 | |||
200 | /* Old names */ | ||
201 | ASN1_OCTET_STRING *ip; /* iPAddress */ | ||
202 | X509_NAME *dirn; /* dirn */ | ||
203 | ASN1_IA5STRING *ia5;/* rfc822Name, dNSName, uniformResourceIdentifier */ | ||
204 | ASN1_OBJECT *rid; /* registeredID */ | ||
205 | ASN1_TYPE *other; /* x400Address */ | ||
206 | } d; | ||
207 | } GENERAL_NAME; | ||
208 | |||
209 | typedef STACK_OF(GENERAL_NAME) GENERAL_NAMES; | ||
210 | |||
211 | typedef struct ACCESS_DESCRIPTION_st { | ||
212 | ASN1_OBJECT *method; | ||
213 | GENERAL_NAME *location; | ||
214 | } ACCESS_DESCRIPTION; | ||
215 | |||
216 | typedef STACK_OF(ACCESS_DESCRIPTION) AUTHORITY_INFO_ACCESS; | ||
217 | |||
218 | typedef STACK_OF(ASN1_OBJECT) EXTENDED_KEY_USAGE; | ||
219 | |||
220 | DECLARE_STACK_OF(GENERAL_NAME) | ||
221 | DECLARE_ASN1_SET_OF(GENERAL_NAME) | ||
222 | |||
223 | DECLARE_STACK_OF(ACCESS_DESCRIPTION) | ||
224 | DECLARE_ASN1_SET_OF(ACCESS_DESCRIPTION) | ||
225 | |||
226 | typedef struct DIST_POINT_NAME_st { | ||
227 | int type; | ||
228 | union { | ||
229 | GENERAL_NAMES *fullname; | ||
230 | STACK_OF(X509_NAME_ENTRY) *relativename; | ||
231 | } name; | ||
232 | /* If relativename then this contains the full distribution point name */ | ||
233 | X509_NAME *dpname; | ||
234 | } DIST_POINT_NAME; | ||
235 | /* All existing reasons */ | ||
236 | #define CRLDP_ALL_REASONS 0x807f | ||
237 | |||
238 | #define CRL_REASON_NONE -1 | ||
239 | #define CRL_REASON_UNSPECIFIED 0 | ||
240 | #define CRL_REASON_KEY_COMPROMISE 1 | ||
241 | #define CRL_REASON_CA_COMPROMISE 2 | ||
242 | #define CRL_REASON_AFFILIATION_CHANGED 3 | ||
243 | #define CRL_REASON_SUPERSEDED 4 | ||
244 | #define CRL_REASON_CESSATION_OF_OPERATION 5 | ||
245 | #define CRL_REASON_CERTIFICATE_HOLD 6 | ||
246 | #define CRL_REASON_REMOVE_FROM_CRL 8 | ||
247 | #define CRL_REASON_PRIVILEGE_WITHDRAWN 9 | ||
248 | #define CRL_REASON_AA_COMPROMISE 10 | ||
249 | |||
250 | struct DIST_POINT_st { | ||
251 | DIST_POINT_NAME *distpoint; | ||
252 | ASN1_BIT_STRING *reasons; | ||
253 | GENERAL_NAMES *CRLissuer; | ||
254 | int dp_reasons; | ||
255 | }; | ||
256 | |||
257 | typedef STACK_OF(DIST_POINT) CRL_DIST_POINTS; | ||
258 | |||
259 | DECLARE_STACK_OF(DIST_POINT) | ||
260 | DECLARE_ASN1_SET_OF(DIST_POINT) | ||
261 | |||
262 | struct AUTHORITY_KEYID_st { | ||
263 | ASN1_OCTET_STRING *keyid; | ||
264 | GENERAL_NAMES *issuer; | ||
265 | ASN1_INTEGER *serial; | ||
266 | }; | ||
267 | |||
268 | /* Strong extranet structures */ | ||
269 | |||
270 | typedef struct SXNET_ID_st { | ||
271 | ASN1_INTEGER *zone; | ||
272 | ASN1_OCTET_STRING *user; | ||
273 | } SXNETID; | ||
274 | |||
275 | DECLARE_STACK_OF(SXNETID) | ||
276 | DECLARE_ASN1_SET_OF(SXNETID) | ||
277 | |||
278 | typedef struct SXNET_st { | ||
279 | ASN1_INTEGER *version; | ||
280 | STACK_OF(SXNETID) *ids; | ||
281 | } SXNET; | ||
282 | |||
283 | typedef struct NOTICEREF_st { | ||
284 | ASN1_STRING *organization; | ||
285 | STACK_OF(ASN1_INTEGER) *noticenos; | ||
286 | } NOTICEREF; | ||
287 | |||
288 | typedef struct USERNOTICE_st { | ||
289 | NOTICEREF *noticeref; | ||
290 | ASN1_STRING *exptext; | ||
291 | } USERNOTICE; | ||
292 | |||
293 | typedef struct POLICYQUALINFO_st { | ||
294 | ASN1_OBJECT *pqualid; | ||
295 | union { | ||
296 | ASN1_IA5STRING *cpsuri; | ||
297 | USERNOTICE *usernotice; | ||
298 | ASN1_TYPE *other; | ||
299 | } d; | ||
300 | } POLICYQUALINFO; | ||
301 | |||
302 | DECLARE_STACK_OF(POLICYQUALINFO) | ||
303 | DECLARE_ASN1_SET_OF(POLICYQUALINFO) | ||
304 | |||
305 | typedef struct POLICYINFO_st { | ||
306 | ASN1_OBJECT *policyid; | ||
307 | STACK_OF(POLICYQUALINFO) *qualifiers; | ||
308 | } POLICYINFO; | ||
309 | |||
310 | typedef STACK_OF(POLICYINFO) CERTIFICATEPOLICIES; | ||
311 | |||
312 | DECLARE_STACK_OF(POLICYINFO) | ||
313 | DECLARE_ASN1_SET_OF(POLICYINFO) | ||
314 | |||
315 | typedef struct POLICY_MAPPING_st { | ||
316 | ASN1_OBJECT *issuerDomainPolicy; | ||
317 | ASN1_OBJECT *subjectDomainPolicy; | ||
318 | } POLICY_MAPPING; | ||
319 | |||
320 | DECLARE_STACK_OF(POLICY_MAPPING) | ||
321 | |||
322 | typedef STACK_OF(POLICY_MAPPING) POLICY_MAPPINGS; | ||
323 | |||
324 | typedef struct GENERAL_SUBTREE_st { | ||
325 | GENERAL_NAME *base; | ||
326 | ASN1_INTEGER *minimum; | ||
327 | ASN1_INTEGER *maximum; | ||
328 | } GENERAL_SUBTREE; | ||
329 | |||
330 | DECLARE_STACK_OF(GENERAL_SUBTREE) | ||
331 | |||
332 | struct NAME_CONSTRAINTS_st { | ||
333 | STACK_OF(GENERAL_SUBTREE) *permittedSubtrees; | ||
334 | STACK_OF(GENERAL_SUBTREE) *excludedSubtrees; | ||
335 | }; | ||
336 | |||
337 | typedef struct POLICY_CONSTRAINTS_st { | ||
338 | ASN1_INTEGER *requireExplicitPolicy; | ||
339 | ASN1_INTEGER *inhibitPolicyMapping; | ||
340 | } POLICY_CONSTRAINTS; | ||
341 | |||
342 | /* Proxy certificate structures, see RFC 3820 */ | ||
343 | typedef struct PROXY_POLICY_st | ||
344 | { | ||
345 | ASN1_OBJECT *policyLanguage; | ||
346 | ASN1_OCTET_STRING *policy; | ||
347 | } PROXY_POLICY; | ||
348 | |||
349 | typedef struct PROXY_CERT_INFO_EXTENSION_st | ||
350 | { | ||
351 | ASN1_INTEGER *pcPathLengthConstraint; | ||
352 | PROXY_POLICY *proxyPolicy; | ||
353 | } PROXY_CERT_INFO_EXTENSION; | ||
354 | |||
355 | DECLARE_ASN1_FUNCTIONS(PROXY_POLICY) | ||
356 | DECLARE_ASN1_FUNCTIONS(PROXY_CERT_INFO_EXTENSION) | ||
357 | |||
358 | struct ISSUING_DIST_POINT_st | ||
359 | { | ||
360 | DIST_POINT_NAME *distpoint; | ||
361 | int onlyuser; | ||
362 | int onlyCA; | ||
363 | ASN1_BIT_STRING *onlysomereasons; | ||
364 | int indirectCRL; | ||
365 | int onlyattr; | ||
366 | }; | ||
367 | |||
368 | /* Values in idp_flags field */ | ||
369 | /* IDP present */ | ||
370 | #define IDP_PRESENT 0x1 | ||
371 | /* IDP values inconsistent */ | ||
372 | #define IDP_INVALID 0x2 | ||
373 | /* onlyuser true */ | ||
374 | #define IDP_ONLYUSER 0x4 | ||
375 | /* onlyCA true */ | ||
376 | #define IDP_ONLYCA 0x8 | ||
377 | /* onlyattr true */ | ||
378 | #define IDP_ONLYATTR 0x10 | ||
379 | /* indirectCRL true */ | ||
380 | #define IDP_INDIRECT 0x20 | ||
381 | /* onlysomereasons present */ | ||
382 | #define IDP_REASONS 0x40 | ||
383 | |||
384 | #define X509V3_conf_err(val) ERR_asprintf_error_data( \ | ||
385 | "section:%s,name:%s,value:%s", val->section, \ | ||
386 | val->name, val->value); | ||
387 | |||
388 | #define X509V3_set_ctx_test(ctx) \ | ||
389 | X509V3_set_ctx(ctx, NULL, NULL, NULL, NULL, CTX_TEST) | ||
390 | #define X509V3_set_ctx_nodb(ctx) (ctx)->db = NULL; | ||
391 | |||
392 | #define EXT_BITSTRING(nid, table) { nid, 0, ASN1_ITEM_ref(ASN1_BIT_STRING), \ | ||
393 | 0,0,0,0, \ | ||
394 | 0,0, \ | ||
395 | (X509V3_EXT_I2V)i2v_ASN1_BIT_STRING, \ | ||
396 | (X509V3_EXT_V2I)v2i_ASN1_BIT_STRING, \ | ||
397 | NULL, NULL, \ | ||
398 | table} | ||
399 | |||
400 | #define EXT_IA5STRING(nid) { nid, 0, ASN1_ITEM_ref(ASN1_IA5STRING), \ | ||
401 | 0,0,0,0, \ | ||
402 | (X509V3_EXT_I2S)i2s_ASN1_IA5STRING, \ | ||
403 | (X509V3_EXT_S2I)s2i_ASN1_IA5STRING, \ | ||
404 | 0,0,0,0, \ | ||
405 | NULL} | ||
406 | |||
407 | #define EXT_END { -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} | ||
408 | |||
409 | |||
410 | /* X509_PURPOSE stuff */ | ||
411 | |||
412 | #define EXFLAG_BCONS 0x1 | ||
413 | #define EXFLAG_KUSAGE 0x2 | ||
414 | #define EXFLAG_XKUSAGE 0x4 | ||
415 | #define EXFLAG_NSCERT 0x8 | ||
416 | |||
417 | #define EXFLAG_CA 0x10 | ||
418 | /* Really self issued not necessarily self signed */ | ||
419 | #define EXFLAG_SI 0x20 | ||
420 | #define EXFLAG_SS 0x20 | ||
421 | #define EXFLAG_V1 0x40 | ||
422 | #define EXFLAG_INVALID 0x80 | ||
423 | #define EXFLAG_SET 0x100 | ||
424 | #define EXFLAG_CRITICAL 0x200 | ||
425 | #define EXFLAG_PROXY 0x400 | ||
426 | |||
427 | #define EXFLAG_INVALID_POLICY 0x800 | ||
428 | #define EXFLAG_FRESHEST 0x1000 | ||
429 | |||
430 | #define KU_DIGITAL_SIGNATURE 0x0080 | ||
431 | #define KU_NON_REPUDIATION 0x0040 | ||
432 | #define KU_KEY_ENCIPHERMENT 0x0020 | ||
433 | #define KU_DATA_ENCIPHERMENT 0x0010 | ||
434 | #define KU_KEY_AGREEMENT 0x0008 | ||
435 | #define KU_KEY_CERT_SIGN 0x0004 | ||
436 | #define KU_CRL_SIGN 0x0002 | ||
437 | #define KU_ENCIPHER_ONLY 0x0001 | ||
438 | #define KU_DECIPHER_ONLY 0x8000 | ||
439 | |||
440 | #define NS_SSL_CLIENT 0x80 | ||
441 | #define NS_SSL_SERVER 0x40 | ||
442 | #define NS_SMIME 0x20 | ||
443 | #define NS_OBJSIGN 0x10 | ||
444 | #define NS_SSL_CA 0x04 | ||
445 | #define NS_SMIME_CA 0x02 | ||
446 | #define NS_OBJSIGN_CA 0x01 | ||
447 | #define NS_ANY_CA (NS_SSL_CA|NS_SMIME_CA|NS_OBJSIGN_CA) | ||
448 | |||
449 | #define XKU_SSL_SERVER 0x1 | ||
450 | #define XKU_SSL_CLIENT 0x2 | ||
451 | #define XKU_SMIME 0x4 | ||
452 | #define XKU_CODE_SIGN 0x8 | ||
453 | #define XKU_SGC 0x10 | ||
454 | #define XKU_OCSP_SIGN 0x20 | ||
455 | #define XKU_TIMESTAMP 0x40 | ||
456 | #define XKU_DVCS 0x80 | ||
457 | |||
458 | #define X509_PURPOSE_DYNAMIC 0x1 | ||
459 | #define X509_PURPOSE_DYNAMIC_NAME 0x2 | ||
460 | |||
461 | typedef struct x509_purpose_st { | ||
462 | int purpose; | ||
463 | int trust; /* Default trust ID */ | ||
464 | int flags; | ||
465 | int (*check_purpose)(const struct x509_purpose_st *, | ||
466 | const X509 *, int); | ||
467 | char *name; | ||
468 | char *sname; | ||
469 | void *usr_data; | ||
470 | } X509_PURPOSE; | ||
471 | |||
472 | #define X509_PURPOSE_SSL_CLIENT 1 | ||
473 | #define X509_PURPOSE_SSL_SERVER 2 | ||
474 | #define X509_PURPOSE_NS_SSL_SERVER 3 | ||
475 | #define X509_PURPOSE_SMIME_SIGN 4 | ||
476 | #define X509_PURPOSE_SMIME_ENCRYPT 5 | ||
477 | #define X509_PURPOSE_CRL_SIGN 6 | ||
478 | #define X509_PURPOSE_ANY 7 | ||
479 | #define X509_PURPOSE_OCSP_HELPER 8 | ||
480 | #define X509_PURPOSE_TIMESTAMP_SIGN 9 | ||
481 | |||
482 | #define X509_PURPOSE_MIN 1 | ||
483 | #define X509_PURPOSE_MAX 9 | ||
484 | |||
485 | /* Flags for X509V3_EXT_print() */ | ||
486 | |||
487 | #define X509V3_EXT_UNKNOWN_MASK (0xfL << 16) | ||
488 | /* Return error for unknown extensions */ | ||
489 | #define X509V3_EXT_DEFAULT 0 | ||
490 | /* Print error for unknown extensions */ | ||
491 | #define X509V3_EXT_ERROR_UNKNOWN (1L << 16) | ||
492 | /* ASN1 parse unknown extensions */ | ||
493 | #define X509V3_EXT_PARSE_UNKNOWN (2L << 16) | ||
494 | /* BIO_dump unknown extensions */ | ||
495 | #define X509V3_EXT_DUMP_UNKNOWN (3L << 16) | ||
496 | |||
497 | /* Flags for X509V3_add1_i2d */ | ||
498 | |||
499 | #define X509V3_ADD_OP_MASK 0xfL | ||
500 | #define X509V3_ADD_DEFAULT 0L | ||
501 | #define X509V3_ADD_APPEND 1L | ||
502 | #define X509V3_ADD_REPLACE 2L | ||
503 | #define X509V3_ADD_REPLACE_EXISTING 3L | ||
504 | #define X509V3_ADD_KEEP_EXISTING 4L | ||
505 | #define X509V3_ADD_DELETE 5L | ||
506 | #define X509V3_ADD_SILENT 0x10 | ||
507 | |||
508 | DECLARE_STACK_OF(X509_PURPOSE) | ||
509 | |||
510 | DECLARE_ASN1_FUNCTIONS(BASIC_CONSTRAINTS) | ||
511 | |||
512 | DECLARE_ASN1_FUNCTIONS(SXNET) | ||
513 | DECLARE_ASN1_FUNCTIONS(SXNETID) | ||
514 | |||
515 | int SXNET_add_id_asc(SXNET **psx, char *zone, char *user, int userlen); | ||
516 | int SXNET_add_id_ulong(SXNET **psx, unsigned long lzone, char *user, int userlen); | ||
517 | int SXNET_add_id_INTEGER(SXNET **psx, ASN1_INTEGER *izone, char *user, int userlen); | ||
518 | |||
519 | ASN1_OCTET_STRING *SXNET_get_id_asc(SXNET *sx, char *zone); | ||
520 | ASN1_OCTET_STRING *SXNET_get_id_ulong(SXNET *sx, unsigned long lzone); | ||
521 | ASN1_OCTET_STRING *SXNET_get_id_INTEGER(SXNET *sx, ASN1_INTEGER *zone); | ||
522 | |||
523 | DECLARE_ASN1_FUNCTIONS(AUTHORITY_KEYID) | ||
524 | |||
525 | DECLARE_ASN1_FUNCTIONS(PKEY_USAGE_PERIOD) | ||
526 | |||
527 | DECLARE_ASN1_FUNCTIONS(GENERAL_NAME) | ||
528 | GENERAL_NAME *GENERAL_NAME_dup(GENERAL_NAME *a); | ||
529 | int GENERAL_NAME_cmp(GENERAL_NAME *a, GENERAL_NAME *b); | ||
530 | |||
531 | |||
532 | |||
533 | ASN1_BIT_STRING *v2i_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, | ||
534 | X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval); | ||
535 | STACK_OF(CONF_VALUE) *i2v_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, | ||
536 | ASN1_BIT_STRING *bits, | ||
537 | STACK_OF(CONF_VALUE) *extlist); | ||
538 | |||
539 | STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method, GENERAL_NAME *gen, STACK_OF(CONF_VALUE) *ret); | ||
540 | int GENERAL_NAME_print(BIO *out, GENERAL_NAME *gen); | ||
541 | |||
542 | DECLARE_ASN1_FUNCTIONS(GENERAL_NAMES) | ||
543 | |||
544 | STACK_OF(CONF_VALUE) *i2v_GENERAL_NAMES(X509V3_EXT_METHOD *method, | ||
545 | GENERAL_NAMES *gen, STACK_OF(CONF_VALUE) *extlist); | ||
546 | GENERAL_NAMES *v2i_GENERAL_NAMES(const X509V3_EXT_METHOD *method, | ||
547 | X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval); | ||
548 | |||
549 | DECLARE_ASN1_FUNCTIONS(OTHERNAME) | ||
550 | DECLARE_ASN1_FUNCTIONS(EDIPARTYNAME) | ||
551 | int OTHERNAME_cmp(OTHERNAME *a, OTHERNAME *b); | ||
552 | void GENERAL_NAME_set0_value(GENERAL_NAME *a, int type, void *value); | ||
553 | void *GENERAL_NAME_get0_value(GENERAL_NAME *a, int *ptype); | ||
554 | int GENERAL_NAME_set0_othername(GENERAL_NAME *gen, | ||
555 | ASN1_OBJECT *oid, ASN1_TYPE *value); | ||
556 | int GENERAL_NAME_get0_otherName(GENERAL_NAME *gen, | ||
557 | ASN1_OBJECT **poid, ASN1_TYPE **pvalue); | ||
558 | |||
559 | char *i2s_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method, ASN1_OCTET_STRING *ia5); | ||
560 | ASN1_OCTET_STRING *s2i_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, char *str); | ||
561 | |||
562 | DECLARE_ASN1_FUNCTIONS(EXTENDED_KEY_USAGE) | ||
563 | int i2a_ACCESS_DESCRIPTION(BIO *bp, ACCESS_DESCRIPTION* a); | ||
564 | |||
565 | DECLARE_ASN1_FUNCTIONS(CERTIFICATEPOLICIES) | ||
566 | DECLARE_ASN1_FUNCTIONS(POLICYINFO) | ||
567 | DECLARE_ASN1_FUNCTIONS(POLICYQUALINFO) | ||
568 | DECLARE_ASN1_FUNCTIONS(USERNOTICE) | ||
569 | DECLARE_ASN1_FUNCTIONS(NOTICEREF) | ||
570 | |||
571 | DECLARE_ASN1_FUNCTIONS(CRL_DIST_POINTS) | ||
572 | DECLARE_ASN1_FUNCTIONS(DIST_POINT) | ||
573 | DECLARE_ASN1_FUNCTIONS(DIST_POINT_NAME) | ||
574 | DECLARE_ASN1_FUNCTIONS(ISSUING_DIST_POINT) | ||
575 | |||
576 | int DIST_POINT_set_dpname(DIST_POINT_NAME *dpn, X509_NAME *iname); | ||
577 | |||
578 | int NAME_CONSTRAINTS_check(X509 *x, NAME_CONSTRAINTS *nc); | ||
579 | |||
580 | DECLARE_ASN1_FUNCTIONS(ACCESS_DESCRIPTION) | ||
581 | DECLARE_ASN1_FUNCTIONS(AUTHORITY_INFO_ACCESS) | ||
582 | |||
583 | DECLARE_ASN1_ITEM(POLICY_MAPPING) | ||
584 | DECLARE_ASN1_ALLOC_FUNCTIONS(POLICY_MAPPING) | ||
585 | DECLARE_ASN1_ITEM(POLICY_MAPPINGS) | ||
586 | |||
587 | DECLARE_ASN1_ITEM(GENERAL_SUBTREE) | ||
588 | DECLARE_ASN1_ALLOC_FUNCTIONS(GENERAL_SUBTREE) | ||
589 | |||
590 | DECLARE_ASN1_ITEM(NAME_CONSTRAINTS) | ||
591 | DECLARE_ASN1_ALLOC_FUNCTIONS(NAME_CONSTRAINTS) | ||
592 | |||
593 | DECLARE_ASN1_ALLOC_FUNCTIONS(POLICY_CONSTRAINTS) | ||
594 | DECLARE_ASN1_ITEM(POLICY_CONSTRAINTS) | ||
595 | |||
596 | GENERAL_NAME *a2i_GENERAL_NAME(GENERAL_NAME *out, | ||
597 | const X509V3_EXT_METHOD *method, X509V3_CTX *ctx, | ||
598 | int gen_type, char *value, int is_nc); | ||
599 | |||
600 | #ifdef HEADER_CONF_H | ||
601 | GENERAL_NAME *v2i_GENERAL_NAME(const X509V3_EXT_METHOD *method, X509V3_CTX *ctx, | ||
602 | CONF_VALUE *cnf); | ||
603 | GENERAL_NAME *v2i_GENERAL_NAME_ex(GENERAL_NAME *out, | ||
604 | const X509V3_EXT_METHOD *method, | ||
605 | X509V3_CTX *ctx, CONF_VALUE *cnf, int is_nc); | ||
606 | void X509V3_conf_free(CONF_VALUE *val); | ||
607 | |||
608 | X509_EXTENSION *X509V3_EXT_nconf_nid(CONF *conf, X509V3_CTX *ctx, int ext_nid, char *value); | ||
609 | X509_EXTENSION *X509V3_EXT_nconf(CONF *conf, X509V3_CTX *ctx, char *name, char *value); | ||
610 | int X509V3_EXT_add_nconf_sk(CONF *conf, X509V3_CTX *ctx, char *section, STACK_OF(X509_EXTENSION) **sk); | ||
611 | int X509V3_EXT_add_nconf(CONF *conf, X509V3_CTX *ctx, char *section, X509 *cert); | ||
612 | int X509V3_EXT_REQ_add_nconf(CONF *conf, X509V3_CTX *ctx, char *section, X509_REQ *req); | ||
613 | int X509V3_EXT_CRL_add_nconf(CONF *conf, X509V3_CTX *ctx, char *section, X509_CRL *crl); | ||
614 | |||
615 | X509_EXTENSION *X509V3_EXT_conf_nid(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, | ||
616 | int ext_nid, char *value); | ||
617 | X509_EXTENSION *X509V3_EXT_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, | ||
618 | char *name, char *value); | ||
619 | int X509V3_EXT_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, | ||
620 | char *section, X509 *cert); | ||
621 | int X509V3_EXT_REQ_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, | ||
622 | char *section, X509_REQ *req); | ||
623 | int X509V3_EXT_CRL_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, | ||
624 | char *section, X509_CRL *crl); | ||
625 | |||
626 | int X509V3_add_value_bool_nf(char *name, int asn1_bool, | ||
627 | STACK_OF(CONF_VALUE) **extlist); | ||
628 | int X509V3_get_value_bool(CONF_VALUE *value, int *asn1_bool); | ||
629 | int X509V3_get_value_int(CONF_VALUE *value, ASN1_INTEGER **aint); | ||
630 | void X509V3_set_nconf(X509V3_CTX *ctx, CONF *conf); | ||
631 | void X509V3_set_conf_lhash(X509V3_CTX *ctx, LHASH_OF(CONF_VALUE) *lhash); | ||
632 | #endif | ||
633 | |||
634 | char * X509V3_get_string(X509V3_CTX *ctx, char *name, char *section); | ||
635 | STACK_OF(CONF_VALUE) * X509V3_get_section(X509V3_CTX *ctx, char *section); | ||
636 | void X509V3_string_free(X509V3_CTX *ctx, char *str); | ||
637 | void X509V3_section_free( X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *section); | ||
638 | void X509V3_set_ctx(X509V3_CTX *ctx, X509 *issuer, X509 *subject, | ||
639 | X509_REQ *req, X509_CRL *crl, int flags); | ||
640 | |||
641 | int X509V3_add_value(const char *name, const char *value, | ||
642 | STACK_OF(CONF_VALUE) **extlist); | ||
643 | int X509V3_add_value_uchar(const char *name, const unsigned char *value, | ||
644 | STACK_OF(CONF_VALUE) **extlist); | ||
645 | int X509V3_add_value_bool(const char *name, int asn1_bool, | ||
646 | STACK_OF(CONF_VALUE) **extlist); | ||
647 | int X509V3_add_value_int(const char *name, ASN1_INTEGER *aint, | ||
648 | STACK_OF(CONF_VALUE) **extlist); | ||
649 | char * i2s_ASN1_INTEGER(X509V3_EXT_METHOD *meth, ASN1_INTEGER *aint); | ||
650 | ASN1_INTEGER * s2i_ASN1_INTEGER(X509V3_EXT_METHOD *meth, char *value); | ||
651 | char * i2s_ASN1_ENUMERATED(X509V3_EXT_METHOD *meth, ASN1_ENUMERATED *aint); | ||
652 | char * i2s_ASN1_ENUMERATED_TABLE(X509V3_EXT_METHOD *meth, ASN1_ENUMERATED *aint); | ||
653 | int X509V3_EXT_add(X509V3_EXT_METHOD *ext); | ||
654 | int X509V3_EXT_add_list(X509V3_EXT_METHOD *extlist); | ||
655 | int X509V3_EXT_add_alias(int nid_to, int nid_from); | ||
656 | void X509V3_EXT_cleanup(void); | ||
657 | |||
658 | const X509V3_EXT_METHOD *X509V3_EXT_get(X509_EXTENSION *ext); | ||
659 | const X509V3_EXT_METHOD *X509V3_EXT_get_nid(int nid); | ||
660 | int X509V3_add_standard_extensions(void); | ||
661 | STACK_OF(CONF_VALUE) *X509V3_parse_list(const char *line); | ||
662 | void *X509V3_EXT_d2i(X509_EXTENSION *ext); | ||
663 | void *X509V3_get_d2i(STACK_OF(X509_EXTENSION) *x, int nid, int *crit, int *idx); | ||
664 | |||
665 | |||
666 | X509_EXTENSION *X509V3_EXT_i2d(int ext_nid, int crit, void *ext_struc); | ||
667 | int X509V3_add1_i2d(STACK_OF(X509_EXTENSION) **x, int nid, void *value, int crit, unsigned long flags); | ||
668 | |||
669 | char *hex_to_string(const unsigned char *buffer, long len); | ||
670 | unsigned char *string_to_hex(const char *str, long *len); | ||
671 | int name_cmp(const char *name, const char *cmp); | ||
672 | |||
673 | void X509V3_EXT_val_prn(BIO *out, STACK_OF(CONF_VALUE) *val, int indent, | ||
674 | int ml); | ||
675 | int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, unsigned long flag, int indent); | ||
676 | int X509V3_EXT_print_fp(FILE *out, X509_EXTENSION *ext, int flag, int indent); | ||
677 | |||
678 | int X509V3_extensions_print(BIO *out, char *title, STACK_OF(X509_EXTENSION) *exts, unsigned long flag, int indent); | ||
679 | |||
680 | int X509_check_ca(X509 *x); | ||
681 | int X509_check_purpose(X509 *x, int id, int ca); | ||
682 | int X509_supported_extension(X509_EXTENSION *ex); | ||
683 | int X509_PURPOSE_set(int *p, int purpose); | ||
684 | int X509_check_issued(X509 *issuer, X509 *subject); | ||
685 | int X509_check_akid(X509 *issuer, AUTHORITY_KEYID *akid); | ||
686 | int X509_PURPOSE_get_count(void); | ||
687 | X509_PURPOSE * X509_PURPOSE_get0(int idx); | ||
688 | int X509_PURPOSE_get_by_sname(char *sname); | ||
689 | int X509_PURPOSE_get_by_id(int id); | ||
690 | int X509_PURPOSE_add(int id, int trust, int flags, | ||
691 | int (*ck)(const X509_PURPOSE *, const X509 *, int), | ||
692 | char *name, char *sname, void *arg); | ||
693 | char *X509_PURPOSE_get0_name(X509_PURPOSE *xp); | ||
694 | char *X509_PURPOSE_get0_sname(X509_PURPOSE *xp); | ||
695 | int X509_PURPOSE_get_trust(X509_PURPOSE *xp); | ||
696 | void X509_PURPOSE_cleanup(void); | ||
697 | int X509_PURPOSE_get_id(X509_PURPOSE *); | ||
698 | |||
699 | STACK_OF(OPENSSL_STRING) *X509_get1_email(X509 *x); | ||
700 | STACK_OF(OPENSSL_STRING) *X509_REQ_get1_email(X509_REQ *x); | ||
701 | void X509_email_free(STACK_OF(OPENSSL_STRING) *sk); | ||
702 | STACK_OF(OPENSSL_STRING) *X509_get1_ocsp(X509 *x); | ||
703 | |||
704 | ASN1_OCTET_STRING *a2i_IPADDRESS(const char *ipasc); | ||
705 | ASN1_OCTET_STRING *a2i_IPADDRESS_NC(const char *ipasc); | ||
706 | int a2i_ipadd(unsigned char *ipout, const char *ipasc); | ||
707 | int X509V3_NAME_from_section(X509_NAME *nm, STACK_OF(CONF_VALUE)*dn_sk, | ||
708 | unsigned long chtype); | ||
709 | |||
710 | void X509_POLICY_NODE_print(BIO *out, X509_POLICY_NODE *node, int indent); | ||
711 | DECLARE_STACK_OF(X509_POLICY_NODE) | ||
712 | |||
713 | |||
714 | /* BEGIN ERROR CODES */ | ||
715 | /* The following lines are auto generated by the script mkerr.pl. Any changes | ||
716 | * made after this point may be overwritten when the script is next run. | ||
717 | */ | ||
718 | void ERR_load_X509V3_strings(void); | ||
719 | |||
720 | /* Error codes for the X509V3 functions. */ | ||
721 | |||
722 | /* Function codes. */ | ||
723 | #define X509V3_F_A2I_GENERAL_NAME 164 | ||
724 | #define X509V3_F_ASIDENTIFIERCHOICE_CANONIZE 161 | ||
725 | #define X509V3_F_ASIDENTIFIERCHOICE_IS_CANONICAL 162 | ||
726 | #define X509V3_F_COPY_EMAIL 122 | ||
727 | #define X509V3_F_COPY_ISSUER 123 | ||
728 | #define X509V3_F_DO_DIRNAME 144 | ||
729 | #define X509V3_F_DO_EXT_CONF 124 | ||
730 | #define X509V3_F_DO_EXT_I2D 135 | ||
731 | #define X509V3_F_DO_EXT_NCONF 151 | ||
732 | #define X509V3_F_DO_I2V_NAME_CONSTRAINTS 148 | ||
733 | #define X509V3_F_GNAMES_FROM_SECTNAME 156 | ||
734 | #define X509V3_F_HEX_TO_STRING 111 | ||
735 | #define X509V3_F_I2S_ASN1_ENUMERATED 121 | ||
736 | #define X509V3_F_I2S_ASN1_IA5STRING 149 | ||
737 | #define X509V3_F_I2S_ASN1_INTEGER 120 | ||
738 | #define X509V3_F_I2V_AUTHORITY_INFO_ACCESS 138 | ||
739 | #define X509V3_F_NOTICE_SECTION 132 | ||
740 | #define X509V3_F_NREF_NOS 133 | ||
741 | #define X509V3_F_POLICY_SECTION 131 | ||
742 | #define X509V3_F_PROCESS_PCI_VALUE 150 | ||
743 | #define X509V3_F_R2I_CERTPOL 130 | ||
744 | #define X509V3_F_R2I_PCI 155 | ||
745 | #define X509V3_F_S2I_ASN1_IA5STRING 100 | ||
746 | #define X509V3_F_S2I_ASN1_INTEGER 108 | ||
747 | #define X509V3_F_S2I_ASN1_OCTET_STRING 112 | ||
748 | #define X509V3_F_S2I_ASN1_SKEY_ID 114 | ||
749 | #define X509V3_F_S2I_SKEY_ID 115 | ||
750 | #define X509V3_F_SET_DIST_POINT_NAME 158 | ||
751 | #define X509V3_F_STRING_TO_HEX 113 | ||
752 | #define X509V3_F_SXNET_ADD_ID_ASC 125 | ||
753 | #define X509V3_F_SXNET_ADD_ID_INTEGER 126 | ||
754 | #define X509V3_F_SXNET_ADD_ID_ULONG 127 | ||
755 | #define X509V3_F_SXNET_GET_ID_ASC 128 | ||
756 | #define X509V3_F_SXNET_GET_ID_ULONG 129 | ||
757 | #define X509V3_F_V2I_ASIDENTIFIERS 163 | ||
758 | #define X509V3_F_V2I_ASN1_BIT_STRING 101 | ||
759 | #define X509V3_F_V2I_AUTHORITY_INFO_ACCESS 139 | ||
760 | #define X509V3_F_V2I_AUTHORITY_KEYID 119 | ||
761 | #define X509V3_F_V2I_BASIC_CONSTRAINTS 102 | ||
762 | #define X509V3_F_V2I_CRLD 134 | ||
763 | #define X509V3_F_V2I_EXTENDED_KEY_USAGE 103 | ||
764 | #define X509V3_F_V2I_GENERAL_NAMES 118 | ||
765 | #define X509V3_F_V2I_GENERAL_NAME_EX 117 | ||
766 | #define X509V3_F_V2I_IDP 157 | ||
767 | #define X509V3_F_V2I_IPADDRBLOCKS 159 | ||
768 | #define X509V3_F_V2I_ISSUER_ALT 153 | ||
769 | #define X509V3_F_V2I_NAME_CONSTRAINTS 147 | ||
770 | #define X509V3_F_V2I_POLICY_CONSTRAINTS 146 | ||
771 | #define X509V3_F_V2I_POLICY_MAPPINGS 145 | ||
772 | #define X509V3_F_V2I_SUBJECT_ALT 154 | ||
773 | #define X509V3_F_V3_ADDR_VALIDATE_PATH_INTERNAL 160 | ||
774 | #define X509V3_F_V3_GENERIC_EXTENSION 116 | ||
775 | #define X509V3_F_X509V3_ADD1_I2D 140 | ||
776 | #define X509V3_F_X509V3_ADD_VALUE 105 | ||
777 | #define X509V3_F_X509V3_EXT_ADD 104 | ||
778 | #define X509V3_F_X509V3_EXT_ADD_ALIAS 106 | ||
779 | #define X509V3_F_X509V3_EXT_CONF 107 | ||
780 | #define X509V3_F_X509V3_EXT_I2D 136 | ||
781 | #define X509V3_F_X509V3_EXT_NCONF 152 | ||
782 | #define X509V3_F_X509V3_GET_SECTION 142 | ||
783 | #define X509V3_F_X509V3_GET_STRING 143 | ||
784 | #define X509V3_F_X509V3_GET_VALUE_BOOL 110 | ||
785 | #define X509V3_F_X509V3_PARSE_LIST 109 | ||
786 | #define X509V3_F_X509_PURPOSE_ADD 137 | ||
787 | #define X509V3_F_X509_PURPOSE_SET 141 | ||
788 | |||
789 | /* Reason codes. */ | ||
790 | #define X509V3_R_BAD_IP_ADDRESS 118 | ||
791 | #define X509V3_R_BAD_OBJECT 119 | ||
792 | #define X509V3_R_BN_DEC2BN_ERROR 100 | ||
793 | #define X509V3_R_BN_TO_ASN1_INTEGER_ERROR 101 | ||
794 | #define X509V3_R_DIRNAME_ERROR 149 | ||
795 | #define X509V3_R_DISTPOINT_ALREADY_SET 160 | ||
796 | #define X509V3_R_DUPLICATE_ZONE_ID 133 | ||
797 | #define X509V3_R_ERROR_CONVERTING_ZONE 131 | ||
798 | #define X509V3_R_ERROR_CREATING_EXTENSION 144 | ||
799 | #define X509V3_R_ERROR_IN_EXTENSION 128 | ||
800 | #define X509V3_R_EXPECTED_A_SECTION_NAME 137 | ||
801 | #define X509V3_R_EXTENSION_EXISTS 145 | ||
802 | #define X509V3_R_EXTENSION_NAME_ERROR 115 | ||
803 | #define X509V3_R_EXTENSION_NOT_FOUND 102 | ||
804 | #define X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED 103 | ||
805 | #define X509V3_R_EXTENSION_VALUE_ERROR 116 | ||
806 | #define X509V3_R_ILLEGAL_EMPTY_EXTENSION 151 | ||
807 | #define X509V3_R_ILLEGAL_HEX_DIGIT 113 | ||
808 | #define X509V3_R_INCORRECT_POLICY_SYNTAX_TAG 152 | ||
809 | #define X509V3_R_INVALID_MULTIPLE_RDNS 161 | ||
810 | #define X509V3_R_INVALID_ASNUMBER 162 | ||
811 | #define X509V3_R_INVALID_ASRANGE 163 | ||
812 | #define X509V3_R_INVALID_BOOLEAN_STRING 104 | ||
813 | #define X509V3_R_INVALID_EXTENSION_STRING 105 | ||
814 | #define X509V3_R_INVALID_INHERITANCE 165 | ||
815 | #define X509V3_R_INVALID_IPADDRESS 166 | ||
816 | #define X509V3_R_INVALID_NAME 106 | ||
817 | #define X509V3_R_INVALID_NULL_ARGUMENT 107 | ||
818 | #define X509V3_R_INVALID_NULL_NAME 108 | ||
819 | #define X509V3_R_INVALID_NULL_VALUE 109 | ||
820 | #define X509V3_R_INVALID_NUMBER 140 | ||
821 | #define X509V3_R_INVALID_NUMBERS 141 | ||
822 | #define X509V3_R_INVALID_OBJECT_IDENTIFIER 110 | ||
823 | #define X509V3_R_INVALID_OPTION 138 | ||
824 | #define X509V3_R_INVALID_POLICY_IDENTIFIER 134 | ||
825 | #define X509V3_R_INVALID_PROXY_POLICY_SETTING 153 | ||
826 | #define X509V3_R_INVALID_PURPOSE 146 | ||
827 | #define X509V3_R_INVALID_SAFI 164 | ||
828 | #define X509V3_R_INVALID_SECTION 135 | ||
829 | #define X509V3_R_INVALID_SYNTAX 143 | ||
830 | #define X509V3_R_ISSUER_DECODE_ERROR 126 | ||
831 | #define X509V3_R_MISSING_VALUE 124 | ||
832 | #define X509V3_R_NEED_ORGANIZATION_AND_NUMBERS 142 | ||
833 | #define X509V3_R_NO_CONFIG_DATABASE 136 | ||
834 | #define X509V3_R_NO_ISSUER_CERTIFICATE 121 | ||
835 | #define X509V3_R_NO_ISSUER_DETAILS 127 | ||
836 | #define X509V3_R_NO_POLICY_IDENTIFIER 139 | ||
837 | #define X509V3_R_NO_PROXY_CERT_POLICY_LANGUAGE_DEFINED 154 | ||
838 | #define X509V3_R_NO_PUBLIC_KEY 114 | ||
839 | #define X509V3_R_NO_SUBJECT_DETAILS 125 | ||
840 | #define X509V3_R_ODD_NUMBER_OF_DIGITS 112 | ||
841 | #define X509V3_R_OPERATION_NOT_DEFINED 148 | ||
842 | #define X509V3_R_OTHERNAME_ERROR 147 | ||
843 | #define X509V3_R_POLICY_LANGUAGE_ALREADY_DEFINED 155 | ||
844 | #define X509V3_R_POLICY_PATH_LENGTH 156 | ||
845 | #define X509V3_R_POLICY_PATH_LENGTH_ALREADY_DEFINED 157 | ||
846 | #define X509V3_R_POLICY_SYNTAX_NOT_CURRENTLY_SUPPORTED 158 | ||
847 | #define X509V3_R_POLICY_WHEN_PROXY_LANGUAGE_REQUIRES_NO_POLICY 159 | ||
848 | #define X509V3_R_SECTION_NOT_FOUND 150 | ||
849 | #define X509V3_R_UNABLE_TO_GET_ISSUER_DETAILS 122 | ||
850 | #define X509V3_R_UNABLE_TO_GET_ISSUER_KEYID 123 | ||
851 | #define X509V3_R_UNKNOWN_BIT_STRING_ARGUMENT 111 | ||
852 | #define X509V3_R_UNKNOWN_EXTENSION 129 | ||
853 | #define X509V3_R_UNKNOWN_EXTENSION_NAME 130 | ||
854 | #define X509V3_R_UNKNOWN_OPTION 120 | ||
855 | #define X509V3_R_UNSUPPORTED_OPTION 117 | ||
856 | #define X509V3_R_UNSUPPORTED_TYPE 167 | ||
857 | #define X509V3_R_USER_TOO_LONG 132 | ||
858 | |||
859 | #ifdef __cplusplus | ||
860 | } | ||
861 | #endif | ||
862 | #endif | ||