diff options
Diffstat (limited to 'src/lib/libcrypto/x509v3/x509v3.h')
-rw-r--r-- | src/lib/libcrypto/x509v3/x509v3.h | 173 |
1 files changed, 129 insertions, 44 deletions
diff --git a/src/lib/libcrypto/x509v3/x509v3.h b/src/lib/libcrypto/x509v3/x509v3.h index 9ef83da755..b308abe7cd 100644 --- a/src/lib/libcrypto/x509v3/x509v3.h +++ b/src/lib/libcrypto/x509v3/x509v3.h | |||
@@ -76,12 +76,19 @@ typedef void * (*X509V3_EXT_NEW)(void); | |||
76 | typedef void (*X509V3_EXT_FREE)(void *); | 76 | typedef void (*X509V3_EXT_FREE)(void *); |
77 | typedef void * (*X509V3_EXT_D2I)(void *, const unsigned char ** , long); | 77 | typedef void * (*X509V3_EXT_D2I)(void *, const unsigned char ** , long); |
78 | typedef int (*X509V3_EXT_I2D)(void *, unsigned char **); | 78 | typedef int (*X509V3_EXT_I2D)(void *, unsigned char **); |
79 | typedef STACK_OF(CONF_VALUE) * (*X509V3_EXT_I2V)(struct v3_ext_method *method, void *ext, STACK_OF(CONF_VALUE) *extlist); | 79 | typedef STACK_OF(CONF_VALUE) * |
80 | typedef void * (*X509V3_EXT_V2I)(struct v3_ext_method *method, struct v3_ext_ctx *ctx, STACK_OF(CONF_VALUE) *values); | 80 | (*X509V3_EXT_I2V)(const struct v3_ext_method *method, void *ext, |
81 | typedef char * (*X509V3_EXT_I2S)(struct v3_ext_method *method, void *ext); | 81 | STACK_OF(CONF_VALUE) *extlist); |
82 | typedef void * (*X509V3_EXT_S2I)(struct v3_ext_method *method, struct v3_ext_ctx *ctx, const char *str); | 82 | typedef void * (*X509V3_EXT_V2I)(const struct v3_ext_method *method, |
83 | typedef int (*X509V3_EXT_I2R)(struct v3_ext_method *method, void *ext, BIO *out, int indent); | 83 | struct v3_ext_ctx *ctx, |
84 | typedef void * (*X509V3_EXT_R2I)(struct v3_ext_method *method, struct v3_ext_ctx *ctx, const char *str); | 84 | STACK_OF(CONF_VALUE) *values); |
85 | typedef char * (*X509V3_EXT_I2S)(const struct v3_ext_method *method, void *ext); | ||
86 | typedef void * (*X509V3_EXT_S2I)(const struct v3_ext_method *method, | ||
87 | struct v3_ext_ctx *ctx, const char *str); | ||
88 | typedef int (*X509V3_EXT_I2R)(const struct v3_ext_method *method, void *ext, | ||
89 | BIO *out, int indent); | ||
90 | typedef void * (*X509V3_EXT_R2I)(const struct v3_ext_method *method, | ||
91 | struct v3_ext_ctx *ctx, const char *str); | ||
85 | 92 | ||
86 | /* V3 extension structure */ | 93 | /* V3 extension structure */ |
87 | 94 | ||
@@ -220,24 +227,41 @@ union { | |||
220 | GENERAL_NAMES *fullname; | 227 | GENERAL_NAMES *fullname; |
221 | STACK_OF(X509_NAME_ENTRY) *relativename; | 228 | STACK_OF(X509_NAME_ENTRY) *relativename; |
222 | } name; | 229 | } name; |
230 | /* If relativename then this contains the full distribution point name */ | ||
231 | X509_NAME *dpname; | ||
223 | } DIST_POINT_NAME; | 232 | } DIST_POINT_NAME; |
224 | 233 | /* All existing reasons */ | |
225 | typedef struct DIST_POINT_st { | 234 | #define CRLDP_ALL_REASONS 0x807f |
235 | |||
236 | #define CRL_REASON_NONE -1 | ||
237 | #define CRL_REASON_UNSPECIFIED 0 | ||
238 | #define CRL_REASON_KEY_COMPROMISE 1 | ||
239 | #define CRL_REASON_CA_COMPROMISE 2 | ||
240 | #define CRL_REASON_AFFILIATION_CHANGED 3 | ||
241 | #define CRL_REASON_SUPERSEDED 4 | ||
242 | #define CRL_REASON_CESSATION_OF_OPERATION 5 | ||
243 | #define CRL_REASON_CERTIFICATE_HOLD 6 | ||
244 | #define CRL_REASON_REMOVE_FROM_CRL 8 | ||
245 | #define CRL_REASON_PRIVILEGE_WITHDRAWN 9 | ||
246 | #define CRL_REASON_AA_COMPROMISE 10 | ||
247 | |||
248 | struct DIST_POINT_st { | ||
226 | DIST_POINT_NAME *distpoint; | 249 | DIST_POINT_NAME *distpoint; |
227 | ASN1_BIT_STRING *reasons; | 250 | ASN1_BIT_STRING *reasons; |
228 | GENERAL_NAMES *CRLissuer; | 251 | GENERAL_NAMES *CRLissuer; |
229 | } DIST_POINT; | 252 | int dp_reasons; |
253 | }; | ||
230 | 254 | ||
231 | typedef STACK_OF(DIST_POINT) CRL_DIST_POINTS; | 255 | typedef STACK_OF(DIST_POINT) CRL_DIST_POINTS; |
232 | 256 | ||
233 | DECLARE_STACK_OF(DIST_POINT) | 257 | DECLARE_STACK_OF(DIST_POINT) |
234 | DECLARE_ASN1_SET_OF(DIST_POINT) | 258 | DECLARE_ASN1_SET_OF(DIST_POINT) |
235 | 259 | ||
236 | typedef struct AUTHORITY_KEYID_st { | 260 | struct AUTHORITY_KEYID_st { |
237 | ASN1_OCTET_STRING *keyid; | 261 | ASN1_OCTET_STRING *keyid; |
238 | GENERAL_NAMES *issuer; | 262 | GENERAL_NAMES *issuer; |
239 | ASN1_INTEGER *serial; | 263 | ASN1_INTEGER *serial; |
240 | } AUTHORITY_KEYID; | 264 | }; |
241 | 265 | ||
242 | /* Strong extranet structures */ | 266 | /* Strong extranet structures */ |
243 | 267 | ||
@@ -303,10 +327,10 @@ typedef struct GENERAL_SUBTREE_st { | |||
303 | 327 | ||
304 | DECLARE_STACK_OF(GENERAL_SUBTREE) | 328 | DECLARE_STACK_OF(GENERAL_SUBTREE) |
305 | 329 | ||
306 | typedef struct NAME_CONSTRAINTS_st { | 330 | struct NAME_CONSTRAINTS_st { |
307 | STACK_OF(GENERAL_SUBTREE) *permittedSubtrees; | 331 | STACK_OF(GENERAL_SUBTREE) *permittedSubtrees; |
308 | STACK_OF(GENERAL_SUBTREE) *excludedSubtrees; | 332 | STACK_OF(GENERAL_SUBTREE) *excludedSubtrees; |
309 | } NAME_CONSTRAINTS; | 333 | }; |
310 | 334 | ||
311 | typedef struct POLICY_CONSTRAINTS_st { | 335 | typedef struct POLICY_CONSTRAINTS_st { |
312 | ASN1_INTEGER *requireExplicitPolicy; | 336 | ASN1_INTEGER *requireExplicitPolicy; |
@@ -329,6 +353,31 @@ typedef struct PROXY_CERT_INFO_EXTENSION_st | |||
329 | DECLARE_ASN1_FUNCTIONS(PROXY_POLICY) | 353 | DECLARE_ASN1_FUNCTIONS(PROXY_POLICY) |
330 | DECLARE_ASN1_FUNCTIONS(PROXY_CERT_INFO_EXTENSION) | 354 | DECLARE_ASN1_FUNCTIONS(PROXY_CERT_INFO_EXTENSION) |
331 | 355 | ||
356 | struct ISSUING_DIST_POINT_st | ||
357 | { | ||
358 | DIST_POINT_NAME *distpoint; | ||
359 | int onlyuser; | ||
360 | int onlyCA; | ||
361 | ASN1_BIT_STRING *onlysomereasons; | ||
362 | int indirectCRL; | ||
363 | int onlyattr; | ||
364 | }; | ||
365 | |||
366 | /* Values in idp_flags field */ | ||
367 | /* IDP present */ | ||
368 | #define IDP_PRESENT 0x1 | ||
369 | /* IDP values inconsistent */ | ||
370 | #define IDP_INVALID 0x2 | ||
371 | /* onlyuser true */ | ||
372 | #define IDP_ONLYUSER 0x4 | ||
373 | /* onlyCA true */ | ||
374 | #define IDP_ONLYCA 0x8 | ||
375 | /* onlyattr true */ | ||
376 | #define IDP_ONLYATTR 0x10 | ||
377 | /* indirectCRL true */ | ||
378 | #define IDP_INDIRECT 0x20 | ||
379 | /* onlysomereasons present */ | ||
380 | #define IDP_REASONS 0x40 | ||
332 | 381 | ||
333 | #define X509V3_conf_err(val) ERR_add_error_data(6, "section:", val->section, \ | 382 | #define X509V3_conf_err(val) ERR_add_error_data(6, "section:", val->section, \ |
334 | ",name:", val->name, ",value:", val->value); | 383 | ",name:", val->name, ",value:", val->value); |
@@ -373,6 +422,7 @@ DECLARE_ASN1_FUNCTIONS(PROXY_CERT_INFO_EXTENSION) | |||
373 | #define EXFLAG_PROXY 0x400 | 422 | #define EXFLAG_PROXY 0x400 |
374 | 423 | ||
375 | #define EXFLAG_INVALID_POLICY 0x800 | 424 | #define EXFLAG_INVALID_POLICY 0x800 |
425 | #define EXFLAG_FRESHEST 0x1000 | ||
376 | 426 | ||
377 | #define KU_DIGITAL_SIGNATURE 0x0080 | 427 | #define KU_DIGITAL_SIGNATURE 0x0080 |
378 | #define KU_NON_REPUDIATION 0x0040 | 428 | #define KU_NON_REPUDIATION 0x0040 |
@@ -424,9 +474,10 @@ typedef struct x509_purpose_st { | |||
424 | #define X509_PURPOSE_CRL_SIGN 6 | 474 | #define X509_PURPOSE_CRL_SIGN 6 |
425 | #define X509_PURPOSE_ANY 7 | 475 | #define X509_PURPOSE_ANY 7 |
426 | #define X509_PURPOSE_OCSP_HELPER 8 | 476 | #define X509_PURPOSE_OCSP_HELPER 8 |
477 | #define X509_PURPOSE_TIMESTAMP_SIGN 9 | ||
427 | 478 | ||
428 | #define X509_PURPOSE_MIN 1 | 479 | #define X509_PURPOSE_MIN 1 |
429 | #define X509_PURPOSE_MAX 8 | 480 | #define X509_PURPOSE_MAX 9 |
430 | 481 | ||
431 | /* Flags for X509V3_EXT_print() */ | 482 | /* Flags for X509V3_EXT_print() */ |
432 | 483 | ||
@@ -471,6 +522,9 @@ DECLARE_ASN1_FUNCTIONS(AUTHORITY_KEYID) | |||
471 | DECLARE_ASN1_FUNCTIONS(PKEY_USAGE_PERIOD) | 522 | DECLARE_ASN1_FUNCTIONS(PKEY_USAGE_PERIOD) |
472 | 523 | ||
473 | DECLARE_ASN1_FUNCTIONS(GENERAL_NAME) | 524 | DECLARE_ASN1_FUNCTIONS(GENERAL_NAME) |
525 | GENERAL_NAME *GENERAL_NAME_dup(GENERAL_NAME *a); | ||
526 | int GENERAL_NAME_cmp(GENERAL_NAME *a, GENERAL_NAME *b); | ||
527 | |||
474 | 528 | ||
475 | 529 | ||
476 | ASN1_BIT_STRING *v2i_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, | 530 | ASN1_BIT_STRING *v2i_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, |
@@ -486,11 +540,18 @@ DECLARE_ASN1_FUNCTIONS(GENERAL_NAMES) | |||
486 | 540 | ||
487 | STACK_OF(CONF_VALUE) *i2v_GENERAL_NAMES(X509V3_EXT_METHOD *method, | 541 | STACK_OF(CONF_VALUE) *i2v_GENERAL_NAMES(X509V3_EXT_METHOD *method, |
488 | GENERAL_NAMES *gen, STACK_OF(CONF_VALUE) *extlist); | 542 | GENERAL_NAMES *gen, STACK_OF(CONF_VALUE) *extlist); |
489 | GENERAL_NAMES *v2i_GENERAL_NAMES(X509V3_EXT_METHOD *method, | 543 | GENERAL_NAMES *v2i_GENERAL_NAMES(const X509V3_EXT_METHOD *method, |
490 | X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval); | 544 | X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval); |
491 | 545 | ||
492 | DECLARE_ASN1_FUNCTIONS(OTHERNAME) | 546 | DECLARE_ASN1_FUNCTIONS(OTHERNAME) |
493 | DECLARE_ASN1_FUNCTIONS(EDIPARTYNAME) | 547 | DECLARE_ASN1_FUNCTIONS(EDIPARTYNAME) |
548 | int OTHERNAME_cmp(OTHERNAME *a, OTHERNAME *b); | ||
549 | void GENERAL_NAME_set0_value(GENERAL_NAME *a, int type, void *value); | ||
550 | void *GENERAL_NAME_get0_value(GENERAL_NAME *a, int *ptype); | ||
551 | int GENERAL_NAME_set0_othername(GENERAL_NAME *gen, | ||
552 | ASN1_OBJECT *oid, ASN1_TYPE *value); | ||
553 | int GENERAL_NAME_get0_otherName(GENERAL_NAME *gen, | ||
554 | ASN1_OBJECT **poid, ASN1_TYPE **pvalue); | ||
494 | 555 | ||
495 | char *i2s_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method, ASN1_OCTET_STRING *ia5); | 556 | char *i2s_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method, ASN1_OCTET_STRING *ia5); |
496 | ASN1_OCTET_STRING *s2i_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, char *str); | 557 | ASN1_OCTET_STRING *s2i_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, char *str); |
@@ -507,6 +568,11 @@ DECLARE_ASN1_FUNCTIONS(NOTICEREF) | |||
507 | DECLARE_ASN1_FUNCTIONS(CRL_DIST_POINTS) | 568 | DECLARE_ASN1_FUNCTIONS(CRL_DIST_POINTS) |
508 | DECLARE_ASN1_FUNCTIONS(DIST_POINT) | 569 | DECLARE_ASN1_FUNCTIONS(DIST_POINT) |
509 | DECLARE_ASN1_FUNCTIONS(DIST_POINT_NAME) | 570 | DECLARE_ASN1_FUNCTIONS(DIST_POINT_NAME) |
571 | DECLARE_ASN1_FUNCTIONS(ISSUING_DIST_POINT) | ||
572 | |||
573 | int DIST_POINT_set_dpname(DIST_POINT_NAME *dpn, X509_NAME *iname); | ||
574 | |||
575 | int NAME_CONSTRAINTS_check(X509 *x, NAME_CONSTRAINTS *nc); | ||
510 | 576 | ||
511 | DECLARE_ASN1_FUNCTIONS(ACCESS_DESCRIPTION) | 577 | DECLARE_ASN1_FUNCTIONS(ACCESS_DESCRIPTION) |
512 | DECLARE_ASN1_FUNCTIONS(AUTHORITY_INFO_ACCESS) | 578 | DECLARE_ASN1_FUNCTIONS(AUTHORITY_INFO_ACCESS) |
@@ -524,11 +590,16 @@ DECLARE_ASN1_ALLOC_FUNCTIONS(NAME_CONSTRAINTS) | |||
524 | DECLARE_ASN1_ALLOC_FUNCTIONS(POLICY_CONSTRAINTS) | 590 | DECLARE_ASN1_ALLOC_FUNCTIONS(POLICY_CONSTRAINTS) |
525 | DECLARE_ASN1_ITEM(POLICY_CONSTRAINTS) | 591 | DECLARE_ASN1_ITEM(POLICY_CONSTRAINTS) |
526 | 592 | ||
593 | GENERAL_NAME *a2i_GENERAL_NAME(GENERAL_NAME *out, | ||
594 | const X509V3_EXT_METHOD *method, X509V3_CTX *ctx, | ||
595 | int gen_type, char *value, int is_nc); | ||
596 | |||
527 | #ifdef HEADER_CONF_H | 597 | #ifdef HEADER_CONF_H |
528 | GENERAL_NAME *v2i_GENERAL_NAME(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, | 598 | GENERAL_NAME *v2i_GENERAL_NAME(const X509V3_EXT_METHOD *method, X509V3_CTX *ctx, |
529 | CONF_VALUE *cnf); | 599 | CONF_VALUE *cnf); |
530 | GENERAL_NAME *v2i_GENERAL_NAME_ex(GENERAL_NAME *out, X509V3_EXT_METHOD *method, | 600 | GENERAL_NAME *v2i_GENERAL_NAME_ex(GENERAL_NAME *out, |
531 | X509V3_CTX *ctx, CONF_VALUE *cnf, int is_nc); | 601 | const X509V3_EXT_METHOD *method, |
602 | X509V3_CTX *ctx, CONF_VALUE *cnf, int is_nc); | ||
532 | void X509V3_conf_free(CONF_VALUE *val); | 603 | void X509V3_conf_free(CONF_VALUE *val); |
533 | 604 | ||
534 | X509_EXTENSION *X509V3_EXT_nconf_nid(CONF *conf, X509V3_CTX *ctx, int ext_nid, char *value); | 605 | X509_EXTENSION *X509V3_EXT_nconf_nid(CONF *conf, X509V3_CTX *ctx, int ext_nid, char *value); |
@@ -538,18 +609,23 @@ int X509V3_EXT_add_nconf(CONF *conf, X509V3_CTX *ctx, char *section, X509 *cert) | |||
538 | int X509V3_EXT_REQ_add_nconf(CONF *conf, X509V3_CTX *ctx, char *section, X509_REQ *req); | 609 | int X509V3_EXT_REQ_add_nconf(CONF *conf, X509V3_CTX *ctx, char *section, X509_REQ *req); |
539 | int X509V3_EXT_CRL_add_nconf(CONF *conf, X509V3_CTX *ctx, char *section, X509_CRL *crl); | 610 | int X509V3_EXT_CRL_add_nconf(CONF *conf, X509V3_CTX *ctx, char *section, X509_CRL *crl); |
540 | 611 | ||
541 | X509_EXTENSION *X509V3_EXT_conf_nid(LHASH *conf, X509V3_CTX *ctx, int ext_nid, char *value); | 612 | X509_EXTENSION *X509V3_EXT_conf_nid(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, |
542 | X509_EXTENSION *X509V3_EXT_conf(LHASH *conf, X509V3_CTX *ctx, char *name, char *value); | 613 | int ext_nid, char *value); |
543 | int X509V3_EXT_add_conf(LHASH *conf, X509V3_CTX *ctx, char *section, X509 *cert); | 614 | X509_EXTENSION *X509V3_EXT_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, |
544 | int X509V3_EXT_REQ_add_conf(LHASH *conf, X509V3_CTX *ctx, char *section, X509_REQ *req); | 615 | char *name, char *value); |
545 | int X509V3_EXT_CRL_add_conf(LHASH *conf, X509V3_CTX *ctx, char *section, X509_CRL *crl); | 616 | int X509V3_EXT_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, |
617 | char *section, X509 *cert); | ||
618 | int X509V3_EXT_REQ_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, | ||
619 | char *section, X509_REQ *req); | ||
620 | int X509V3_EXT_CRL_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, | ||
621 | char *section, X509_CRL *crl); | ||
546 | 622 | ||
547 | int X509V3_add_value_bool_nf(char *name, int asn1_bool, | 623 | int X509V3_add_value_bool_nf(char *name, int asn1_bool, |
548 | STACK_OF(CONF_VALUE) **extlist); | 624 | STACK_OF(CONF_VALUE) **extlist); |
549 | int X509V3_get_value_bool(CONF_VALUE *value, int *asn1_bool); | 625 | int X509V3_get_value_bool(CONF_VALUE *value, int *asn1_bool); |
550 | int X509V3_get_value_int(CONF_VALUE *value, ASN1_INTEGER **aint); | 626 | int X509V3_get_value_int(CONF_VALUE *value, ASN1_INTEGER **aint); |
551 | void X509V3_set_nconf(X509V3_CTX *ctx, CONF *conf); | 627 | void X509V3_set_nconf(X509V3_CTX *ctx, CONF *conf); |
552 | void X509V3_set_conf_lhash(X509V3_CTX *ctx, LHASH *lhash); | 628 | void X509V3_set_conf_lhash(X509V3_CTX *ctx, LHASH_OF(CONF_VALUE) *lhash); |
553 | #endif | 629 | #endif |
554 | 630 | ||
555 | char * X509V3_get_string(X509V3_CTX *ctx, char *name, char *section); | 631 | char * X509V3_get_string(X509V3_CTX *ctx, char *name, char *section); |
@@ -576,8 +652,8 @@ int X509V3_EXT_add_list(X509V3_EXT_METHOD *extlist); | |||
576 | int X509V3_EXT_add_alias(int nid_to, int nid_from); | 652 | int X509V3_EXT_add_alias(int nid_to, int nid_from); |
577 | void X509V3_EXT_cleanup(void); | 653 | void X509V3_EXT_cleanup(void); |
578 | 654 | ||
579 | X509V3_EXT_METHOD *X509V3_EXT_get(X509_EXTENSION *ext); | 655 | const X509V3_EXT_METHOD *X509V3_EXT_get(X509_EXTENSION *ext); |
580 | X509V3_EXT_METHOD *X509V3_EXT_get_nid(int nid); | 656 | const X509V3_EXT_METHOD *X509V3_EXT_get_nid(int nid); |
581 | int X509V3_add_standard_extensions(void); | 657 | int X509V3_add_standard_extensions(void); |
582 | STACK_OF(CONF_VALUE) *X509V3_parse_list(const char *line); | 658 | STACK_OF(CONF_VALUE) *X509V3_parse_list(const char *line); |
583 | void *X509V3_EXT_d2i(X509_EXTENSION *ext); | 659 | void *X509V3_EXT_d2i(X509_EXTENSION *ext); |
@@ -587,8 +663,8 @@ void *X509V3_get_d2i(STACK_OF(X509_EXTENSION) *x, int nid, int *crit, int *idx); | |||
587 | X509_EXTENSION *X509V3_EXT_i2d(int ext_nid, int crit, void *ext_struc); | 663 | X509_EXTENSION *X509V3_EXT_i2d(int ext_nid, int crit, void *ext_struc); |
588 | int X509V3_add1_i2d(STACK_OF(X509_EXTENSION) **x, int nid, void *value, int crit, unsigned long flags); | 664 | int X509V3_add1_i2d(STACK_OF(X509_EXTENSION) **x, int nid, void *value, int crit, unsigned long flags); |
589 | 665 | ||
590 | char *hex_to_string(unsigned char *buffer, long len); | 666 | char *hex_to_string(const unsigned char *buffer, long len); |
591 | unsigned char *string_to_hex(char *str, long *len); | 667 | unsigned char *string_to_hex(const char *str, long *len); |
592 | int name_cmp(const char *name, const char *cmp); | 668 | int name_cmp(const char *name, const char *cmp); |
593 | 669 | ||
594 | void X509V3_EXT_val_prn(BIO *out, STACK_OF(CONF_VALUE) *val, int indent, | 670 | void X509V3_EXT_val_prn(BIO *out, STACK_OF(CONF_VALUE) *val, int indent, |
@@ -603,6 +679,7 @@ int X509_check_purpose(X509 *x, int id, int ca); | |||
603 | int X509_supported_extension(X509_EXTENSION *ex); | 679 | int X509_supported_extension(X509_EXTENSION *ex); |
604 | int X509_PURPOSE_set(int *p, int purpose); | 680 | int X509_PURPOSE_set(int *p, int purpose); |
605 | int X509_check_issued(X509 *issuer, X509 *subject); | 681 | int X509_check_issued(X509 *issuer, X509 *subject); |
682 | int X509_check_akid(X509 *issuer, AUTHORITY_KEYID *akid); | ||
606 | int X509_PURPOSE_get_count(void); | 683 | int X509_PURPOSE_get_count(void); |
607 | X509_PURPOSE * X509_PURPOSE_get0(int idx); | 684 | X509_PURPOSE * X509_PURPOSE_get0(int idx); |
608 | int X509_PURPOSE_get_by_sname(char *sname); | 685 | int X509_PURPOSE_get_by_sname(char *sname); |
@@ -616,10 +693,10 @@ int X509_PURPOSE_get_trust(X509_PURPOSE *xp); | |||
616 | void X509_PURPOSE_cleanup(void); | 693 | void X509_PURPOSE_cleanup(void); |
617 | int X509_PURPOSE_get_id(X509_PURPOSE *); | 694 | int X509_PURPOSE_get_id(X509_PURPOSE *); |
618 | 695 | ||
619 | STACK *X509_get1_email(X509 *x); | 696 | STACK_OF(OPENSSL_STRING) *X509_get1_email(X509 *x); |
620 | STACK *X509_REQ_get1_email(X509_REQ *x); | 697 | STACK_OF(OPENSSL_STRING) *X509_REQ_get1_email(X509_REQ *x); |
621 | void X509_email_free(STACK *sk); | 698 | void X509_email_free(STACK_OF(OPENSSL_STRING) *sk); |
622 | STACK *X509_get1_ocsp(X509 *x); | 699 | STACK_OF(OPENSSL_STRING) *X509_get1_ocsp(X509 *x); |
623 | 700 | ||
624 | ASN1_OCTET_STRING *a2i_IPADDRESS(const char *ipasc); | 701 | ASN1_OCTET_STRING *a2i_IPADDRESS(const char *ipasc); |
625 | ASN1_OCTET_STRING *a2i_IPADDRESS_NC(const char *ipasc); | 702 | ASN1_OCTET_STRING *a2i_IPADDRESS_NC(const char *ipasc); |
@@ -628,6 +705,7 @@ int X509V3_NAME_from_section(X509_NAME *nm, STACK_OF(CONF_VALUE)*dn_sk, | |||
628 | unsigned long chtype); | 705 | unsigned long chtype); |
629 | 706 | ||
630 | void X509_POLICY_NODE_print(BIO *out, X509_POLICY_NODE *node, int indent); | 707 | void X509_POLICY_NODE_print(BIO *out, X509_POLICY_NODE *node, int indent); |
708 | DECLARE_STACK_OF(X509_POLICY_NODE) | ||
631 | 709 | ||
632 | #ifndef OPENSSL_NO_RFC3779 | 710 | #ifndef OPENSSL_NO_RFC3779 |
633 | 711 | ||
@@ -787,8 +865,9 @@ void ERR_load_X509V3_strings(void); | |||
787 | /* Error codes for the X509V3 functions. */ | 865 | /* Error codes for the X509V3 functions. */ |
788 | 866 | ||
789 | /* Function codes. */ | 867 | /* Function codes. */ |
790 | #define X509V3_F_ASIDENTIFIERCHOICE_CANONIZE 156 | 868 | #define X509V3_F_A2I_GENERAL_NAME 164 |
791 | #define X509V3_F_ASIDENTIFIERCHOICE_IS_CANONICAL 157 | 869 | #define X509V3_F_ASIDENTIFIERCHOICE_CANONIZE 161 |
870 | #define X509V3_F_ASIDENTIFIERCHOICE_IS_CANONICAL 162 | ||
792 | #define X509V3_F_COPY_EMAIL 122 | 871 | #define X509V3_F_COPY_EMAIL 122 |
793 | #define X509V3_F_COPY_ISSUER 123 | 872 | #define X509V3_F_COPY_ISSUER 123 |
794 | #define X509V3_F_DO_DIRNAME 144 | 873 | #define X509V3_F_DO_DIRNAME 144 |
@@ -796,6 +875,7 @@ void ERR_load_X509V3_strings(void); | |||
796 | #define X509V3_F_DO_EXT_I2D 135 | 875 | #define X509V3_F_DO_EXT_I2D 135 |
797 | #define X509V3_F_DO_EXT_NCONF 151 | 876 | #define X509V3_F_DO_EXT_NCONF 151 |
798 | #define X509V3_F_DO_I2V_NAME_CONSTRAINTS 148 | 877 | #define X509V3_F_DO_I2V_NAME_CONSTRAINTS 148 |
878 | #define X509V3_F_GNAMES_FROM_SECTNAME 156 | ||
799 | #define X509V3_F_HEX_TO_STRING 111 | 879 | #define X509V3_F_HEX_TO_STRING 111 |
800 | #define X509V3_F_I2S_ASN1_ENUMERATED 121 | 880 | #define X509V3_F_I2S_ASN1_ENUMERATED 121 |
801 | #define X509V3_F_I2S_ASN1_IA5STRING 149 | 881 | #define X509V3_F_I2S_ASN1_IA5STRING 149 |
@@ -812,13 +892,14 @@ void ERR_load_X509V3_strings(void); | |||
812 | #define X509V3_F_S2I_ASN1_OCTET_STRING 112 | 892 | #define X509V3_F_S2I_ASN1_OCTET_STRING 112 |
813 | #define X509V3_F_S2I_ASN1_SKEY_ID 114 | 893 | #define X509V3_F_S2I_ASN1_SKEY_ID 114 |
814 | #define X509V3_F_S2I_SKEY_ID 115 | 894 | #define X509V3_F_S2I_SKEY_ID 115 |
895 | #define X509V3_F_SET_DIST_POINT_NAME 158 | ||
815 | #define X509V3_F_STRING_TO_HEX 113 | 896 | #define X509V3_F_STRING_TO_HEX 113 |
816 | #define X509V3_F_SXNET_ADD_ID_ASC 125 | 897 | #define X509V3_F_SXNET_ADD_ID_ASC 125 |
817 | #define X509V3_F_SXNET_ADD_ID_INTEGER 126 | 898 | #define X509V3_F_SXNET_ADD_ID_INTEGER 126 |
818 | #define X509V3_F_SXNET_ADD_ID_ULONG 127 | 899 | #define X509V3_F_SXNET_ADD_ID_ULONG 127 |
819 | #define X509V3_F_SXNET_GET_ID_ASC 128 | 900 | #define X509V3_F_SXNET_GET_ID_ASC 128 |
820 | #define X509V3_F_SXNET_GET_ID_ULONG 129 | 901 | #define X509V3_F_SXNET_GET_ID_ULONG 129 |
821 | #define X509V3_F_V2I_ASIDENTIFIERS 158 | 902 | #define X509V3_F_V2I_ASIDENTIFIERS 163 |
822 | #define X509V3_F_V2I_ASN1_BIT_STRING 101 | 903 | #define X509V3_F_V2I_ASN1_BIT_STRING 101 |
823 | #define X509V3_F_V2I_AUTHORITY_INFO_ACCESS 139 | 904 | #define X509V3_F_V2I_AUTHORITY_INFO_ACCESS 139 |
824 | #define X509V3_F_V2I_AUTHORITY_KEYID 119 | 905 | #define X509V3_F_V2I_AUTHORITY_KEYID 119 |
@@ -827,6 +908,7 @@ void ERR_load_X509V3_strings(void); | |||
827 | #define X509V3_F_V2I_EXTENDED_KEY_USAGE 103 | 908 | #define X509V3_F_V2I_EXTENDED_KEY_USAGE 103 |
828 | #define X509V3_F_V2I_GENERAL_NAMES 118 | 909 | #define X509V3_F_V2I_GENERAL_NAMES 118 |
829 | #define X509V3_F_V2I_GENERAL_NAME_EX 117 | 910 | #define X509V3_F_V2I_GENERAL_NAME_EX 117 |
911 | #define X509V3_F_V2I_IDP 157 | ||
830 | #define X509V3_F_V2I_IPADDRBLOCKS 159 | 912 | #define X509V3_F_V2I_IPADDRBLOCKS 159 |
831 | #define X509V3_F_V2I_ISSUER_ALT 153 | 913 | #define X509V3_F_V2I_ISSUER_ALT 153 |
832 | #define X509V3_F_V2I_NAME_CONSTRAINTS 147 | 914 | #define X509V3_F_V2I_NAME_CONSTRAINTS 147 |
@@ -855,6 +937,7 @@ void ERR_load_X509V3_strings(void); | |||
855 | #define X509V3_R_BN_DEC2BN_ERROR 100 | 937 | #define X509V3_R_BN_DEC2BN_ERROR 100 |
856 | #define X509V3_R_BN_TO_ASN1_INTEGER_ERROR 101 | 938 | #define X509V3_R_BN_TO_ASN1_INTEGER_ERROR 101 |
857 | #define X509V3_R_DIRNAME_ERROR 149 | 939 | #define X509V3_R_DIRNAME_ERROR 149 |
940 | #define X509V3_R_DISTPOINT_ALREADY_SET 160 | ||
858 | #define X509V3_R_DUPLICATE_ZONE_ID 133 | 941 | #define X509V3_R_DUPLICATE_ZONE_ID 133 |
859 | #define X509V3_R_ERROR_CONVERTING_ZONE 131 | 942 | #define X509V3_R_ERROR_CONVERTING_ZONE 131 |
860 | #define X509V3_R_ERROR_CREATING_EXTENSION 144 | 943 | #define X509V3_R_ERROR_CREATING_EXTENSION 144 |
@@ -868,12 +951,13 @@ void ERR_load_X509V3_strings(void); | |||
868 | #define X509V3_R_ILLEGAL_EMPTY_EXTENSION 151 | 951 | #define X509V3_R_ILLEGAL_EMPTY_EXTENSION 151 |
869 | #define X509V3_R_ILLEGAL_HEX_DIGIT 113 | 952 | #define X509V3_R_ILLEGAL_HEX_DIGIT 113 |
870 | #define X509V3_R_INCORRECT_POLICY_SYNTAX_TAG 152 | 953 | #define X509V3_R_INCORRECT_POLICY_SYNTAX_TAG 152 |
871 | #define X509V3_R_INVALID_ASNUMBER 160 | 954 | #define X509V3_R_INVALID_MULTIPLE_RDNS 161 |
872 | #define X509V3_R_INVALID_ASRANGE 161 | 955 | #define X509V3_R_INVALID_ASNUMBER 162 |
956 | #define X509V3_R_INVALID_ASRANGE 163 | ||
873 | #define X509V3_R_INVALID_BOOLEAN_STRING 104 | 957 | #define X509V3_R_INVALID_BOOLEAN_STRING 104 |
874 | #define X509V3_R_INVALID_EXTENSION_STRING 105 | 958 | #define X509V3_R_INVALID_EXTENSION_STRING 105 |
875 | #define X509V3_R_INVALID_INHERITANCE 162 | 959 | #define X509V3_R_INVALID_INHERITANCE 165 |
876 | #define X509V3_R_INVALID_IPADDRESS 163 | 960 | #define X509V3_R_INVALID_IPADDRESS 166 |
877 | #define X509V3_R_INVALID_NAME 106 | 961 | #define X509V3_R_INVALID_NAME 106 |
878 | #define X509V3_R_INVALID_NULL_ARGUMENT 107 | 962 | #define X509V3_R_INVALID_NULL_ARGUMENT 107 |
879 | #define X509V3_R_INVALID_NULL_NAME 108 | 963 | #define X509V3_R_INVALID_NULL_NAME 108 |
@@ -901,9 +985,9 @@ void ERR_load_X509V3_strings(void); | |||
901 | #define X509V3_R_ODD_NUMBER_OF_DIGITS 112 | 985 | #define X509V3_R_ODD_NUMBER_OF_DIGITS 112 |
902 | #define X509V3_R_OPERATION_NOT_DEFINED 148 | 986 | #define X509V3_R_OPERATION_NOT_DEFINED 148 |
903 | #define X509V3_R_OTHERNAME_ERROR 147 | 987 | #define X509V3_R_OTHERNAME_ERROR 147 |
904 | #define X509V3_R_POLICY_LANGUAGE_ALREADTY_DEFINED 155 | 988 | #define X509V3_R_POLICY_LANGUAGE_ALREADY_DEFINED 155 |
905 | #define X509V3_R_POLICY_PATH_LENGTH 156 | 989 | #define X509V3_R_POLICY_PATH_LENGTH 156 |
906 | #define X509V3_R_POLICY_PATH_LENGTH_ALREADTY_DEFINED 157 | 990 | #define X509V3_R_POLICY_PATH_LENGTH_ALREADY_DEFINED 157 |
907 | #define X509V3_R_POLICY_SYNTAX_NOT_CURRENTLY_SUPPORTED 158 | 991 | #define X509V3_R_POLICY_SYNTAX_NOT_CURRENTLY_SUPPORTED 158 |
908 | #define X509V3_R_POLICY_WHEN_PROXY_LANGUAGE_REQUIRES_NO_POLICY 159 | 992 | #define X509V3_R_POLICY_WHEN_PROXY_LANGUAGE_REQUIRES_NO_POLICY 159 |
909 | #define X509V3_R_SECTION_NOT_FOUND 150 | 993 | #define X509V3_R_SECTION_NOT_FOUND 150 |
@@ -914,6 +998,7 @@ void ERR_load_X509V3_strings(void); | |||
914 | #define X509V3_R_UNKNOWN_EXTENSION_NAME 130 | 998 | #define X509V3_R_UNKNOWN_EXTENSION_NAME 130 |
915 | #define X509V3_R_UNKNOWN_OPTION 120 | 999 | #define X509V3_R_UNKNOWN_OPTION 120 |
916 | #define X509V3_R_UNSUPPORTED_OPTION 117 | 1000 | #define X509V3_R_UNSUPPORTED_OPTION 117 |
1001 | #define X509V3_R_UNSUPPORTED_TYPE 167 | ||
917 | #define X509V3_R_USER_TOO_LONG 132 | 1002 | #define X509V3_R_USER_TOO_LONG 132 |
918 | 1003 | ||
919 | #ifdef __cplusplus | 1004 | #ifdef __cplusplus |