diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/asn1.h')
-rw-r--r-- | src/lib/libcrypto/asn1/asn1.h | 247 |
1 files changed, 160 insertions, 87 deletions
diff --git a/src/lib/libcrypto/asn1/asn1.h b/src/lib/libcrypto/asn1/asn1.h index e3385226d4..f7718b5a94 100644 --- a/src/lib/libcrypto/asn1/asn1.h +++ b/src/lib/libcrypto/asn1/asn1.h | |||
@@ -213,7 +213,7 @@ typedef struct asn1_object_st | |||
213 | const char *sn,*ln; | 213 | const char *sn,*ln; |
214 | int nid; | 214 | int nid; |
215 | int length; | 215 | int length; |
216 | unsigned char *data; | 216 | const unsigned char *data; /* data remains const after init */ |
217 | int flags; /* Should we free this one */ | 217 | int flags; /* Should we free this one */ |
218 | } ASN1_OBJECT; | 218 | } ASN1_OBJECT; |
219 | 219 | ||
@@ -228,8 +228,12 @@ typedef struct asn1_object_st | |||
228 | * complete and is a place holder for content when it had all been | 228 | * complete and is a place holder for content when it had all been |
229 | * accessed. The flag will be reset when content has been written to it. | 229 | * accessed. The flag will be reset when content has been written to it. |
230 | */ | 230 | */ |
231 | #define ASN1_STRING_FLAG_CONT 0x020 | ||
232 | 231 | ||
232 | #define ASN1_STRING_FLAG_CONT 0x020 | ||
233 | /* This flag is used by ASN1 code to indicate an ASN1_STRING is an MSTRING | ||
234 | * type. | ||
235 | */ | ||
236 | #define ASN1_STRING_FLAG_MSTRING 0x040 | ||
233 | /* This is the base type that holds just about everything :-) */ | 237 | /* This is the base type that holds just about everything :-) */ |
234 | typedef struct asn1_string_st | 238 | typedef struct asn1_string_st |
235 | { | 239 | { |
@@ -330,6 +334,13 @@ typedef struct ASN1_VALUE_st ASN1_VALUE; | |||
330 | type *name##_new(void); \ | 334 | type *name##_new(void); \ |
331 | void name##_free(type *a); | 335 | void name##_free(type *a); |
332 | 336 | ||
337 | #define DECLARE_ASN1_PRINT_FUNCTION(stname) \ | ||
338 | DECLARE_ASN1_PRINT_FUNCTION_fname(stname, stname) | ||
339 | |||
340 | #define DECLARE_ASN1_PRINT_FUNCTION_fname(stname, fname) \ | ||
341 | int fname##_print_ctx(BIO *out, stname *x, int indent, \ | ||
342 | const ASN1_PCTX *pctx); | ||
343 | |||
333 | #define D2I_OF(type) type *(*)(type **,const unsigned char **,long) | 344 | #define D2I_OF(type) type *(*)(type **,const unsigned char **,long) |
334 | #define I2D_OF(type) int (*)(type *,unsigned char **) | 345 | #define I2D_OF(type) int (*)(type *,unsigned char **) |
335 | #define I2D_OF_const(type) int (*)(const type *,unsigned char **) | 346 | #define I2D_OF_const(type) int (*)(const type *,unsigned char **) |
@@ -534,28 +545,23 @@ typedef struct asn1_type_st | |||
534 | * contain the set or sequence bytes */ | 545 | * contain the set or sequence bytes */ |
535 | ASN1_STRING * set; | 546 | ASN1_STRING * set; |
536 | ASN1_STRING * sequence; | 547 | ASN1_STRING * sequence; |
537 | ASN1_VALUE * asn1_value; | 548 | ASN1_VALUE * asn1_value; |
538 | } value; | 549 | } value; |
539 | } ASN1_TYPE; | 550 | } ASN1_TYPE; |
540 | 551 | ||
541 | DECLARE_STACK_OF(ASN1_TYPE) | 552 | DECLARE_STACK_OF(ASN1_TYPE) |
542 | DECLARE_ASN1_SET_OF(ASN1_TYPE) | 553 | DECLARE_ASN1_SET_OF(ASN1_TYPE) |
543 | 554 | ||
544 | typedef struct asn1_method_st | 555 | typedef STACK_OF(ASN1_TYPE) ASN1_SEQUENCE_ANY; |
545 | { | 556 | |
546 | i2d_of_void *i2d; | 557 | DECLARE_ASN1_ENCODE_FUNCTIONS_const(ASN1_SEQUENCE_ANY, ASN1_SEQUENCE_ANY) |
547 | d2i_of_void *d2i; | 558 | DECLARE_ASN1_ENCODE_FUNCTIONS_const(ASN1_SEQUENCE_ANY, ASN1_SET_ANY) |
548 | void *(*create)(void); | 559 | |
549 | void (*destroy)(void *); | 560 | typedef struct NETSCAPE_X509_st |
550 | } ASN1_METHOD; | ||
551 | |||
552 | /* This is used when parsing some Netscape objects */ | ||
553 | typedef struct asn1_header_st | ||
554 | { | 561 | { |
555 | ASN1_OCTET_STRING *header; | 562 | ASN1_OCTET_STRING *header; |
556 | void *data; | 563 | X509 *cert; |
557 | ASN1_METHOD *meth; | 564 | } NETSCAPE_X509; |
558 | } ASN1_HEADER; | ||
559 | 565 | ||
560 | /* This is used to contain a list of bit names */ | 566 | /* This is used to contain a list of bit names */ |
561 | typedef struct BIT_STRING_BITNAME_st { | 567 | typedef struct BIT_STRING_BITNAME_st { |
@@ -575,32 +581,34 @@ typedef struct BIT_STRING_BITNAME_st { | |||
575 | ASN1_STRING_type_new(V_ASN1_BIT_STRING) | 581 | ASN1_STRING_type_new(V_ASN1_BIT_STRING) |
576 | #define M_ASN1_BIT_STRING_free(a) ASN1_STRING_free((ASN1_STRING *)a) | 582 | #define M_ASN1_BIT_STRING_free(a) ASN1_STRING_free((ASN1_STRING *)a) |
577 | #define M_ASN1_BIT_STRING_dup(a) (ASN1_BIT_STRING *)\ | 583 | #define M_ASN1_BIT_STRING_dup(a) (ASN1_BIT_STRING *)\ |
578 | ASN1_STRING_dup((ASN1_STRING *)a) | 584 | ASN1_STRING_dup((const ASN1_STRING *)a) |
579 | #define M_ASN1_BIT_STRING_cmp(a,b) ASN1_STRING_cmp(\ | 585 | #define M_ASN1_BIT_STRING_cmp(a,b) ASN1_STRING_cmp(\ |
580 | (ASN1_STRING *)a,(ASN1_STRING *)b) | 586 | (const ASN1_STRING *)a,(const ASN1_STRING *)b) |
581 | #define M_ASN1_BIT_STRING_set(a,b,c) ASN1_STRING_set((ASN1_STRING *)a,b,c) | 587 | #define M_ASN1_BIT_STRING_set(a,b,c) ASN1_STRING_set((ASN1_STRING *)a,b,c) |
582 | 588 | ||
583 | #define M_ASN1_INTEGER_new() (ASN1_INTEGER *)\ | 589 | #define M_ASN1_INTEGER_new() (ASN1_INTEGER *)\ |
584 | ASN1_STRING_type_new(V_ASN1_INTEGER) | 590 | ASN1_STRING_type_new(V_ASN1_INTEGER) |
585 | #define M_ASN1_INTEGER_free(a) ASN1_STRING_free((ASN1_STRING *)a) | 591 | #define M_ASN1_INTEGER_free(a) ASN1_STRING_free((ASN1_STRING *)a) |
586 | #define M_ASN1_INTEGER_dup(a) (ASN1_INTEGER *)ASN1_STRING_dup((ASN1_STRING *)a) | 592 | #define M_ASN1_INTEGER_dup(a) (ASN1_INTEGER *)\ |
593 | ASN1_STRING_dup((const ASN1_STRING *)a) | ||
587 | #define M_ASN1_INTEGER_cmp(a,b) ASN1_STRING_cmp(\ | 594 | #define M_ASN1_INTEGER_cmp(a,b) ASN1_STRING_cmp(\ |
588 | (ASN1_STRING *)a,(ASN1_STRING *)b) | 595 | (const ASN1_STRING *)a,(const ASN1_STRING *)b) |
589 | 596 | ||
590 | #define M_ASN1_ENUMERATED_new() (ASN1_ENUMERATED *)\ | 597 | #define M_ASN1_ENUMERATED_new() (ASN1_ENUMERATED *)\ |
591 | ASN1_STRING_type_new(V_ASN1_ENUMERATED) | 598 | ASN1_STRING_type_new(V_ASN1_ENUMERATED) |
592 | #define M_ASN1_ENUMERATED_free(a) ASN1_STRING_free((ASN1_STRING *)a) | 599 | #define M_ASN1_ENUMERATED_free(a) ASN1_STRING_free((ASN1_STRING *)a) |
593 | #define M_ASN1_ENUMERATED_dup(a) (ASN1_ENUMERATED *)ASN1_STRING_dup((ASN1_STRING *)a) | 600 | #define M_ASN1_ENUMERATED_dup(a) (ASN1_ENUMERATED *)\ |
601 | ASN1_STRING_dup((const ASN1_STRING *)a) | ||
594 | #define M_ASN1_ENUMERATED_cmp(a,b) ASN1_STRING_cmp(\ | 602 | #define M_ASN1_ENUMERATED_cmp(a,b) ASN1_STRING_cmp(\ |
595 | (ASN1_STRING *)a,(ASN1_STRING *)b) | 603 | (const ASN1_STRING *)a,(const ASN1_STRING *)b) |
596 | 604 | ||
597 | #define M_ASN1_OCTET_STRING_new() (ASN1_OCTET_STRING *)\ | 605 | #define M_ASN1_OCTET_STRING_new() (ASN1_OCTET_STRING *)\ |
598 | ASN1_STRING_type_new(V_ASN1_OCTET_STRING) | 606 | ASN1_STRING_type_new(V_ASN1_OCTET_STRING) |
599 | #define M_ASN1_OCTET_STRING_free(a) ASN1_STRING_free((ASN1_STRING *)a) | 607 | #define M_ASN1_OCTET_STRING_free(a) ASN1_STRING_free((ASN1_STRING *)a) |
600 | #define M_ASN1_OCTET_STRING_dup(a) (ASN1_OCTET_STRING *)\ | 608 | #define M_ASN1_OCTET_STRING_dup(a) (ASN1_OCTET_STRING *)\ |
601 | ASN1_STRING_dup((ASN1_STRING *)a) | 609 | ASN1_STRING_dup((const ASN1_STRING *)a) |
602 | #define M_ASN1_OCTET_STRING_cmp(a,b) ASN1_STRING_cmp(\ | 610 | #define M_ASN1_OCTET_STRING_cmp(a,b) ASN1_STRING_cmp(\ |
603 | (ASN1_STRING *)a,(ASN1_STRING *)b) | 611 | (const ASN1_STRING *)a,(const ASN1_STRING *)b) |
604 | #define M_ASN1_OCTET_STRING_set(a,b,c) ASN1_STRING_set((ASN1_STRING *)a,b,c) | 612 | #define M_ASN1_OCTET_STRING_set(a,b,c) ASN1_STRING_set((ASN1_STRING *)a,b,c) |
605 | #define M_ASN1_OCTET_STRING_print(a,b) ASN1_STRING_print(a,(ASN1_STRING *)b) | 613 | #define M_ASN1_OCTET_STRING_print(a,b) ASN1_STRING_print(a,(ASN1_STRING *)b) |
606 | #define M_i2d_ASN1_OCTET_STRING(a,pp) \ | 614 | #define M_i2d_ASN1_OCTET_STRING(a,pp) \ |
@@ -684,7 +692,7 @@ typedef struct BIT_STRING_BITNAME_st { | |||
684 | ASN1_STRING_type_new(V_ASN1_IA5STRING) | 692 | ASN1_STRING_type_new(V_ASN1_IA5STRING) |
685 | #define M_ASN1_IA5STRING_free(a) ASN1_STRING_free((ASN1_STRING *)a) | 693 | #define M_ASN1_IA5STRING_free(a) ASN1_STRING_free((ASN1_STRING *)a) |
686 | #define M_ASN1_IA5STRING_dup(a) \ | 694 | #define M_ASN1_IA5STRING_dup(a) \ |
687 | (ASN1_IA5STRING *)ASN1_STRING_dup((ASN1_STRING *)a) | 695 | (ASN1_IA5STRING *)ASN1_STRING_dup((const ASN1_STRING *)a) |
688 | #define M_i2d_ASN1_IA5STRING(a,pp) \ | 696 | #define M_i2d_ASN1_IA5STRING(a,pp) \ |
689 | i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_IA5STRING,\ | 697 | i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_IA5STRING,\ |
690 | V_ASN1_UNIVERSAL) | 698 | V_ASN1_UNIVERSAL) |
@@ -695,18 +703,20 @@ typedef struct BIT_STRING_BITNAME_st { | |||
695 | #define M_ASN1_UTCTIME_new() (ASN1_UTCTIME *)\ | 703 | #define M_ASN1_UTCTIME_new() (ASN1_UTCTIME *)\ |
696 | ASN1_STRING_type_new(V_ASN1_UTCTIME) | 704 | ASN1_STRING_type_new(V_ASN1_UTCTIME) |
697 | #define M_ASN1_UTCTIME_free(a) ASN1_STRING_free((ASN1_STRING *)a) | 705 | #define M_ASN1_UTCTIME_free(a) ASN1_STRING_free((ASN1_STRING *)a) |
698 | #define M_ASN1_UTCTIME_dup(a) (ASN1_UTCTIME *)ASN1_STRING_dup((ASN1_STRING *)a) | 706 | #define M_ASN1_UTCTIME_dup(a) (ASN1_UTCTIME *)\ |
707 | ASN1_STRING_dup((const ASN1_STRING *)a) | ||
699 | 708 | ||
700 | #define M_ASN1_GENERALIZEDTIME_new() (ASN1_GENERALIZEDTIME *)\ | 709 | #define M_ASN1_GENERALIZEDTIME_new() (ASN1_GENERALIZEDTIME *)\ |
701 | ASN1_STRING_type_new(V_ASN1_GENERALIZEDTIME) | 710 | ASN1_STRING_type_new(V_ASN1_GENERALIZEDTIME) |
702 | #define M_ASN1_GENERALIZEDTIME_free(a) ASN1_STRING_free((ASN1_STRING *)a) | 711 | #define M_ASN1_GENERALIZEDTIME_free(a) ASN1_STRING_free((ASN1_STRING *)a) |
703 | #define M_ASN1_GENERALIZEDTIME_dup(a) (ASN1_GENERALIZEDTIME *)ASN1_STRING_dup(\ | 712 | #define M_ASN1_GENERALIZEDTIME_dup(a) (ASN1_GENERALIZEDTIME *)ASN1_STRING_dup(\ |
704 | (ASN1_STRING *)a) | 713 | (const ASN1_STRING *)a) |
705 | 714 | ||
706 | #define M_ASN1_TIME_new() (ASN1_TIME *)\ | 715 | #define M_ASN1_TIME_new() (ASN1_TIME *)\ |
707 | ASN1_STRING_type_new(V_ASN1_UTCTIME) | 716 | ASN1_STRING_type_new(V_ASN1_UTCTIME) |
708 | #define M_ASN1_TIME_free(a) ASN1_STRING_free((ASN1_STRING *)a) | 717 | #define M_ASN1_TIME_free(a) ASN1_STRING_free((ASN1_STRING *)a) |
709 | #define M_ASN1_TIME_dup(a) (ASN1_TIME *)ASN1_STRING_dup((ASN1_STRING *)a) | 718 | #define M_ASN1_TIME_dup(a) (ASN1_TIME *)\ |
719 | ASN1_STRING_dup((const ASN1_STRING *)a) | ||
710 | 720 | ||
711 | #define M_ASN1_GENERALSTRING_new() (ASN1_GENERALSTRING *)\ | 721 | #define M_ASN1_GENERALSTRING_new() (ASN1_GENERALSTRING *)\ |
712 | ASN1_STRING_type_new(V_ASN1_GENERALSTRING) | 722 | ASN1_STRING_type_new(V_ASN1_GENERALSTRING) |
@@ -767,6 +777,7 @@ DECLARE_ASN1_FUNCTIONS_fname(ASN1_TYPE, ASN1_ANY, ASN1_TYPE) | |||
767 | int ASN1_TYPE_get(ASN1_TYPE *a); | 777 | int ASN1_TYPE_get(ASN1_TYPE *a); |
768 | void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value); | 778 | void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value); |
769 | int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value); | 779 | int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value); |
780 | int ASN1_TYPE_cmp(ASN1_TYPE *a, ASN1_TYPE *b); | ||
770 | 781 | ||
771 | ASN1_OBJECT * ASN1_OBJECT_new(void ); | 782 | ASN1_OBJECT * ASN1_OBJECT_new(void ); |
772 | void ASN1_OBJECT_free(ASN1_OBJECT *a); | 783 | void ASN1_OBJECT_free(ASN1_OBJECT *a); |
@@ -783,14 +794,15 @@ DECLARE_ASN1_SET_OF(ASN1_OBJECT) | |||
783 | 794 | ||
784 | ASN1_STRING * ASN1_STRING_new(void); | 795 | ASN1_STRING * ASN1_STRING_new(void); |
785 | void ASN1_STRING_free(ASN1_STRING *a); | 796 | void ASN1_STRING_free(ASN1_STRING *a); |
786 | ASN1_STRING * ASN1_STRING_dup(ASN1_STRING *a); | 797 | int ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *str); |
798 | ASN1_STRING * ASN1_STRING_dup(const ASN1_STRING *a); | ||
787 | ASN1_STRING * ASN1_STRING_type_new(int type ); | 799 | ASN1_STRING * ASN1_STRING_type_new(int type ); |
788 | int ASN1_STRING_cmp(ASN1_STRING *a, ASN1_STRING *b); | 800 | int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b); |
789 | /* Since this is used to store all sorts of things, via macros, for now, make | 801 | /* Since this is used to store all sorts of things, via macros, for now, make |
790 | its data void * */ | 802 | its data void * */ |
791 | int ASN1_STRING_set(ASN1_STRING *str, const void *data, int len); | 803 | int ASN1_STRING_set(ASN1_STRING *str, const void *data, int len); |
792 | void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len); | 804 | void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len); |
793 | int ASN1_STRING_length(ASN1_STRING *x); | 805 | int ASN1_STRING_length(const ASN1_STRING *x); |
794 | void ASN1_STRING_length_set(ASN1_STRING *x, int n); | 806 | void ASN1_STRING_length_set(ASN1_STRING *x, int n); |
795 | int ASN1_STRING_type(ASN1_STRING *x); | 807 | int ASN1_STRING_type(ASN1_STRING *x); |
796 | unsigned char * ASN1_STRING_data(ASN1_STRING *x); | 808 | unsigned char * ASN1_STRING_data(ASN1_STRING *x); |
@@ -803,6 +815,8 @@ int ASN1_BIT_STRING_set(ASN1_BIT_STRING *a, unsigned char *d, | |||
803 | int length ); | 815 | int length ); |
804 | int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value); | 816 | int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value); |
805 | int ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, int n); | 817 | int ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, int n); |
818 | int ASN1_BIT_STRING_check(ASN1_BIT_STRING *a, | ||
819 | unsigned char *flags, int flags_len); | ||
806 | 820 | ||
807 | #ifndef OPENSSL_NO_BIO | 821 | #ifndef OPENSSL_NO_BIO |
808 | int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs, | 822 | int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs, |
@@ -821,13 +835,15 @@ ASN1_INTEGER *c2i_ASN1_INTEGER(ASN1_INTEGER **a,const unsigned char **pp, | |||
821 | long length); | 835 | long length); |
822 | ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a,const unsigned char **pp, | 836 | ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a,const unsigned char **pp, |
823 | long length); | 837 | long length); |
824 | ASN1_INTEGER * ASN1_INTEGER_dup(ASN1_INTEGER *x); | 838 | ASN1_INTEGER * ASN1_INTEGER_dup(const ASN1_INTEGER *x); |
825 | int ASN1_INTEGER_cmp(ASN1_INTEGER *x, ASN1_INTEGER *y); | 839 | int ASN1_INTEGER_cmp(const ASN1_INTEGER *x, const ASN1_INTEGER *y); |
826 | 840 | ||
827 | DECLARE_ASN1_FUNCTIONS(ASN1_ENUMERATED) | 841 | DECLARE_ASN1_FUNCTIONS(ASN1_ENUMERATED) |
828 | 842 | ||
829 | int ASN1_UTCTIME_check(ASN1_UTCTIME *a); | 843 | int ASN1_UTCTIME_check(ASN1_UTCTIME *a); |
830 | ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s,time_t t); | 844 | ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s,time_t t); |
845 | ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t, | ||
846 | int offset_day, long offset_sec); | ||
831 | int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str); | 847 | int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str); |
832 | int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t); | 848 | int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t); |
833 | #if 0 | 849 | #if 0 |
@@ -836,11 +852,13 @@ time_t ASN1_UTCTIME_get(const ASN1_UTCTIME *s); | |||
836 | 852 | ||
837 | int ASN1_GENERALIZEDTIME_check(ASN1_GENERALIZEDTIME *a); | 853 | int ASN1_GENERALIZEDTIME_check(ASN1_GENERALIZEDTIME *a); |
838 | ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,time_t t); | 854 | ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,time_t t); |
855 | ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s, | ||
856 | time_t t, int offset_day, long offset_sec); | ||
839 | int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str); | 857 | int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str); |
840 | 858 | ||
841 | DECLARE_ASN1_FUNCTIONS(ASN1_OCTET_STRING) | 859 | DECLARE_ASN1_FUNCTIONS(ASN1_OCTET_STRING) |
842 | ASN1_OCTET_STRING * ASN1_OCTET_STRING_dup(ASN1_OCTET_STRING *a); | 860 | ASN1_OCTET_STRING * ASN1_OCTET_STRING_dup(const ASN1_OCTET_STRING *a); |
843 | int ASN1_OCTET_STRING_cmp(ASN1_OCTET_STRING *a, ASN1_OCTET_STRING *b); | 861 | int ASN1_OCTET_STRING_cmp(const ASN1_OCTET_STRING *a, const ASN1_OCTET_STRING *b); |
844 | int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str, const unsigned char *data, int len); | 862 | int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str, const unsigned char *data, int len); |
845 | 863 | ||
846 | DECLARE_ASN1_FUNCTIONS(ASN1_VISIBLESTRING) | 864 | DECLARE_ASN1_FUNCTIONS(ASN1_VISIBLESTRING) |
@@ -867,14 +885,20 @@ DECLARE_ASN1_FUNCTIONS(ASN1_TIME) | |||
867 | DECLARE_ASN1_ITEM(ASN1_OCTET_STRING_NDEF) | 885 | DECLARE_ASN1_ITEM(ASN1_OCTET_STRING_NDEF) |
868 | 886 | ||
869 | ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s,time_t t); | 887 | ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s,time_t t); |
888 | ASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s,time_t t, | ||
889 | int offset_day, long offset_sec); | ||
870 | int ASN1_TIME_check(ASN1_TIME *t); | 890 | int ASN1_TIME_check(ASN1_TIME *t); |
871 | ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME **out); | 891 | ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME **out); |
892 | int ASN1_TIME_set_string(ASN1_TIME *s, const char *str); | ||
872 | 893 | ||
873 | int i2d_ASN1_SET(STACK *a, unsigned char **pp, | 894 | int i2d_ASN1_SET(STACK_OF(OPENSSL_BLOCK) *a, unsigned char **pp, |
874 | i2d_of_void *i2d, int ex_tag, int ex_class, int is_set); | 895 | i2d_of_void *i2d, int ex_tag, int ex_class, |
875 | STACK * d2i_ASN1_SET(STACK **a, const unsigned char **pp, long length, | 896 | int is_set); |
876 | d2i_of_void *d2i, void (*free_func)(void *), | 897 | STACK_OF(OPENSSL_BLOCK) *d2i_ASN1_SET(STACK_OF(OPENSSL_BLOCK) **a, |
877 | int ex_tag, int ex_class); | 898 | const unsigned char **pp, |
899 | long length, d2i_of_void *d2i, | ||
900 | void (*free_func)(OPENSSL_BLOCK), int ex_tag, | ||
901 | int ex_class); | ||
878 | 902 | ||
879 | #ifndef OPENSSL_NO_BIO | 903 | #ifndef OPENSSL_NO_BIO |
880 | int i2a_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *a); | 904 | int i2a_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *a); |
@@ -892,9 +916,9 @@ ASN1_OBJECT *ASN1_OBJECT_create(int nid, unsigned char *data,int len, | |||
892 | const char *sn, const char *ln); | 916 | const char *sn, const char *ln); |
893 | 917 | ||
894 | int ASN1_INTEGER_set(ASN1_INTEGER *a, long v); | 918 | int ASN1_INTEGER_set(ASN1_INTEGER *a, long v); |
895 | long ASN1_INTEGER_get(ASN1_INTEGER *a); | 919 | long ASN1_INTEGER_get(const ASN1_INTEGER *a); |
896 | ASN1_INTEGER *BN_to_ASN1_INTEGER(BIGNUM *bn, ASN1_INTEGER *ai); | 920 | ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai); |
897 | BIGNUM *ASN1_INTEGER_to_BN(ASN1_INTEGER *ai,BIGNUM *bn); | 921 | BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai,BIGNUM *bn); |
898 | 922 | ||
899 | int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v); | 923 | int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v); |
900 | long ASN1_ENUMERATED_get(ASN1_ENUMERATED *a); | 924 | long ASN1_ENUMERATED_get(ASN1_ENUMERATED *a); |
@@ -928,7 +952,7 @@ int ASN1_put_eoc(unsigned char **pp); | |||
928 | int ASN1_object_size(int constructed, int length, int tag); | 952 | int ASN1_object_size(int constructed, int length, int tag); |
929 | 953 | ||
930 | /* Used to implement other functions */ | 954 | /* Used to implement other functions */ |
931 | void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, char *x); | 955 | void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, void *x); |
932 | 956 | ||
933 | #define ASN1_dup_of(type,i2d,d2i,x) \ | 957 | #define ASN1_dup_of(type,i2d,d2i,x) \ |
934 | ((type*)ASN1_dup(CHECKED_I2D_OF(type, i2d), \ | 958 | ((type*)ASN1_dup(CHECKED_I2D_OF(type, i2d), \ |
@@ -999,29 +1023,23 @@ int ASN1_i2d_bio(i2d_of_void *i2d,BIO *out, unsigned char *x); | |||
999 | CHECKED_PTR_OF(const type, x))) | 1023 | CHECKED_PTR_OF(const type, x))) |
1000 | 1024 | ||
1001 | int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, void *x); | 1025 | int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, void *x); |
1002 | int ASN1_UTCTIME_print(BIO *fp,ASN1_UTCTIME *a); | 1026 | int ASN1_UTCTIME_print(BIO *fp, const ASN1_UTCTIME *a); |
1003 | int ASN1_GENERALIZEDTIME_print(BIO *fp,ASN1_GENERALIZEDTIME *a); | 1027 | int ASN1_GENERALIZEDTIME_print(BIO *fp, const ASN1_GENERALIZEDTIME *a); |
1004 | int ASN1_TIME_print(BIO *fp,ASN1_TIME *a); | 1028 | int ASN1_TIME_print(BIO *fp, const ASN1_TIME *a); |
1005 | int ASN1_STRING_print(BIO *bp,ASN1_STRING *v); | 1029 | int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v); |
1006 | int ASN1_STRING_print_ex(BIO *out, ASN1_STRING *str, unsigned long flags); | 1030 | int ASN1_STRING_print_ex(BIO *out, ASN1_STRING *str, unsigned long flags); |
1031 | int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num, | ||
1032 | unsigned char *buf, int off); | ||
1007 | int ASN1_parse(BIO *bp,const unsigned char *pp,long len,int indent); | 1033 | int ASN1_parse(BIO *bp,const unsigned char *pp,long len,int indent); |
1008 | int ASN1_parse_dump(BIO *bp,const unsigned char *pp,long len,int indent,int dump); | 1034 | int ASN1_parse_dump(BIO *bp,const unsigned char *pp,long len,int indent,int dump); |
1009 | #endif | 1035 | #endif |
1010 | const char *ASN1_tag2str(int tag); | 1036 | const char *ASN1_tag2str(int tag); |
1011 | 1037 | ||
1012 | /* Used to load and write netscape format cert/key */ | 1038 | /* Used to load and write netscape format cert */ |
1013 | int i2d_ASN1_HEADER(ASN1_HEADER *a,unsigned char **pp); | ||
1014 | ASN1_HEADER *d2i_ASN1_HEADER(ASN1_HEADER **a,const unsigned char **pp, long length); | ||
1015 | ASN1_HEADER *ASN1_HEADER_new(void ); | ||
1016 | void ASN1_HEADER_free(ASN1_HEADER *a); | ||
1017 | 1039 | ||
1018 | int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s); | 1040 | DECLARE_ASN1_FUNCTIONS(NETSCAPE_X509) |
1019 | 1041 | ||
1020 | /* Not used that much at this point, except for the first two */ | 1042 | int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s); |
1021 | ASN1_METHOD *X509_asn1_meth(void); | ||
1022 | ASN1_METHOD *RSAPrivateKey_asn1_meth(void); | ||
1023 | ASN1_METHOD *ASN1_IA5STRING_asn1_meth(void); | ||
1024 | ASN1_METHOD *ASN1_BIT_STRING_asn1_meth(void); | ||
1025 | 1043 | ||
1026 | int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, | 1044 | int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, |
1027 | unsigned char *data, int len); | 1045 | unsigned char *data, int len); |
@@ -1032,9 +1050,9 @@ int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num, | |||
1032 | int ASN1_TYPE_get_int_octetstring(ASN1_TYPE *a,long *num, | 1050 | int ASN1_TYPE_get_int_octetstring(ASN1_TYPE *a,long *num, |
1033 | unsigned char *data, int max_len); | 1051 | unsigned char *data, int max_len); |
1034 | 1052 | ||
1035 | STACK *ASN1_seq_unpack(const unsigned char *buf, int len, | 1053 | STACK_OF(OPENSSL_BLOCK) *ASN1_seq_unpack(const unsigned char *buf, int len, |
1036 | d2i_of_void *d2i, void (*free_func)(void *)); | 1054 | d2i_of_void *d2i, void (*free_func)(OPENSSL_BLOCK)); |
1037 | unsigned char *ASN1_seq_pack(STACK *safes, i2d_of_void *i2d, | 1055 | unsigned char *ASN1_seq_pack(STACK_OF(OPENSSL_BLOCK) *safes, i2d_of_void *i2d, |
1038 | unsigned char **buf, int *len ); | 1056 | unsigned char **buf, int *len ); |
1039 | void *ASN1_unpack_string(ASN1_STRING *oct, d2i_of_void *d2i); | 1057 | void *ASN1_unpack_string(ASN1_STRING *oct, d2i_of_void *d2i); |
1040 | void *ASN1_item_unpack(ASN1_STRING *oct, const ASN1_ITEM *it); | 1058 | void *ASN1_item_unpack(ASN1_STRING *oct, const ASN1_ITEM *it); |
@@ -1077,15 +1095,58 @@ void ASN1_add_oid_module(void); | |||
1077 | ASN1_TYPE *ASN1_generate_nconf(char *str, CONF *nconf); | 1095 | ASN1_TYPE *ASN1_generate_nconf(char *str, CONF *nconf); |
1078 | ASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf); | 1096 | ASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf); |
1079 | 1097 | ||
1080 | typedef int asn1_output_data_fn(BIO *out, BIO *data, ASN1_VALUE *val, int flags, | 1098 | /* ASN1 Print flags */ |
1081 | const ASN1_ITEM *it); | 1099 | |
1082 | 1100 | /* Indicate missing OPTIONAL fields */ | |
1083 | int int_smime_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags, | 1101 | #define ASN1_PCTX_FLAGS_SHOW_ABSENT 0x001 |
1102 | /* Mark start and end of SEQUENCE */ | ||
1103 | #define ASN1_PCTX_FLAGS_SHOW_SEQUENCE 0x002 | ||
1104 | /* Mark start and end of SEQUENCE/SET OF */ | ||
1105 | #define ASN1_PCTX_FLAGS_SHOW_SSOF 0x004 | ||
1106 | /* Show the ASN1 type of primitives */ | ||
1107 | #define ASN1_PCTX_FLAGS_SHOW_TYPE 0x008 | ||
1108 | /* Don't show ASN1 type of ANY */ | ||
1109 | #define ASN1_PCTX_FLAGS_NO_ANY_TYPE 0x010 | ||
1110 | /* Don't show ASN1 type of MSTRINGs */ | ||
1111 | #define ASN1_PCTX_FLAGS_NO_MSTRING_TYPE 0x020 | ||
1112 | /* Don't show field names in SEQUENCE */ | ||
1113 | #define ASN1_PCTX_FLAGS_NO_FIELD_NAME 0x040 | ||
1114 | /* Show structure names of each SEQUENCE field */ | ||
1115 | #define ASN1_PCTX_FLAGS_SHOW_FIELD_STRUCT_NAME 0x080 | ||
1116 | /* Don't show structure name even at top level */ | ||
1117 | #define ASN1_PCTX_FLAGS_NO_STRUCT_NAME 0x100 | ||
1118 | |||
1119 | int ASN1_item_print(BIO *out, ASN1_VALUE *ifld, int indent, | ||
1120 | const ASN1_ITEM *it, const ASN1_PCTX *pctx); | ||
1121 | ASN1_PCTX *ASN1_PCTX_new(void); | ||
1122 | void ASN1_PCTX_free(ASN1_PCTX *p); | ||
1123 | unsigned long ASN1_PCTX_get_flags(ASN1_PCTX *p); | ||
1124 | void ASN1_PCTX_set_flags(ASN1_PCTX *p, unsigned long flags); | ||
1125 | unsigned long ASN1_PCTX_get_nm_flags(ASN1_PCTX *p); | ||
1126 | void ASN1_PCTX_set_nm_flags(ASN1_PCTX *p, unsigned long flags); | ||
1127 | unsigned long ASN1_PCTX_get_cert_flags(ASN1_PCTX *p); | ||
1128 | void ASN1_PCTX_set_cert_flags(ASN1_PCTX *p, unsigned long flags); | ||
1129 | unsigned long ASN1_PCTX_get_oid_flags(ASN1_PCTX *p); | ||
1130 | void ASN1_PCTX_set_oid_flags(ASN1_PCTX *p, unsigned long flags); | ||
1131 | unsigned long ASN1_PCTX_get_str_flags(ASN1_PCTX *p); | ||
1132 | void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags); | ||
1133 | |||
1134 | BIO_METHOD *BIO_f_asn1(void); | ||
1135 | |||
1136 | BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it); | ||
1137 | |||
1138 | int i2d_ASN1_bio_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags, | ||
1139 | const ASN1_ITEM *it); | ||
1140 | int PEM_write_bio_ASN1_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags, | ||
1141 | const char *hdr, | ||
1142 | const ASN1_ITEM *it); | ||
1143 | int SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags, | ||
1084 | int ctype_nid, int econt_nid, | 1144 | int ctype_nid, int econt_nid, |
1085 | STACK_OF(X509_ALGOR) *mdalgs, | 1145 | STACK_OF(X509_ALGOR) *mdalgs, |
1086 | asn1_output_data_fn *data_fn, | ||
1087 | const ASN1_ITEM *it); | 1146 | const ASN1_ITEM *it); |
1088 | ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it); | 1147 | ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it); |
1148 | int SMIME_crlf_copy(BIO *in, BIO *out, int flags); | ||
1149 | int SMIME_text(BIO *in, BIO *out); | ||
1089 | 1150 | ||
1090 | /* BEGIN ERROR CODES */ | 1151 | /* BEGIN ERROR CODES */ |
1091 | /* The following lines are auto generated by the script mkerr.pl. Any changes | 1152 | /* The following lines are auto generated by the script mkerr.pl. Any changes |
@@ -1116,6 +1177,7 @@ void ERR_load_ASN1_strings(void); | |||
1116 | #define ASN1_F_ASN1_ENUMERATED_TO_BN 113 | 1177 | #define ASN1_F_ASN1_ENUMERATED_TO_BN 113 |
1117 | #define ASN1_F_ASN1_EX_C2I 204 | 1178 | #define ASN1_F_ASN1_EX_C2I 204 |
1118 | #define ASN1_F_ASN1_FIND_END 190 | 1179 | #define ASN1_F_ASN1_FIND_END 190 |
1180 | #define ASN1_F_ASN1_GENERALIZEDTIME_ADJ 216 | ||
1119 | #define ASN1_F_ASN1_GENERALIZEDTIME_SET 185 | 1181 | #define ASN1_F_ASN1_GENERALIZEDTIME_SET 185 |
1120 | #define ASN1_F_ASN1_GENERATE_V3 178 | 1182 | #define ASN1_F_ASN1_GENERATE_V3 178 |
1121 | #define ASN1_F_ASN1_GET_OBJECT 114 | 1183 | #define ASN1_F_ASN1_GET_OBJECT 114 |
@@ -1136,7 +1198,7 @@ void ERR_load_ASN1_strings(void); | |||
1136 | #define ASN1_F_ASN1_ITEM_VERIFY 197 | 1198 | #define ASN1_F_ASN1_ITEM_VERIFY 197 |
1137 | #define ASN1_F_ASN1_MBSTRING_NCOPY 122 | 1199 | #define ASN1_F_ASN1_MBSTRING_NCOPY 122 |
1138 | #define ASN1_F_ASN1_OBJECT_NEW 123 | 1200 | #define ASN1_F_ASN1_OBJECT_NEW 123 |
1139 | #define ASN1_F_ASN1_OUTPUT_DATA 207 | 1201 | #define ASN1_F_ASN1_OUTPUT_DATA 214 |
1140 | #define ASN1_F_ASN1_PACK_STRING 124 | 1202 | #define ASN1_F_ASN1_PACK_STRING 124 |
1141 | #define ASN1_F_ASN1_PCTX_NEW 205 | 1203 | #define ASN1_F_ASN1_PCTX_NEW 205 |
1142 | #define ASN1_F_ASN1_PKCS5_PBE_SET 125 | 1204 | #define ASN1_F_ASN1_PKCS5_PBE_SET 125 |
@@ -1150,14 +1212,17 @@ void ERR_load_ASN1_strings(void); | |||
1150 | #define ASN1_F_ASN1_TEMPLATE_EX_D2I 132 | 1212 | #define ASN1_F_ASN1_TEMPLATE_EX_D2I 132 |
1151 | #define ASN1_F_ASN1_TEMPLATE_NEW 133 | 1213 | #define ASN1_F_ASN1_TEMPLATE_NEW 133 |
1152 | #define ASN1_F_ASN1_TEMPLATE_NOEXP_D2I 131 | 1214 | #define ASN1_F_ASN1_TEMPLATE_NOEXP_D2I 131 |
1215 | #define ASN1_F_ASN1_TIME_ADJ 217 | ||
1153 | #define ASN1_F_ASN1_TIME_SET 175 | 1216 | #define ASN1_F_ASN1_TIME_SET 175 |
1154 | #define ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING 134 | 1217 | #define ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING 134 |
1155 | #define ASN1_F_ASN1_TYPE_GET_OCTETSTRING 135 | 1218 | #define ASN1_F_ASN1_TYPE_GET_OCTETSTRING 135 |
1156 | #define ASN1_F_ASN1_UNPACK_STRING 136 | 1219 | #define ASN1_F_ASN1_UNPACK_STRING 136 |
1220 | #define ASN1_F_ASN1_UTCTIME_ADJ 218 | ||
1157 | #define ASN1_F_ASN1_UTCTIME_SET 187 | 1221 | #define ASN1_F_ASN1_UTCTIME_SET 187 |
1158 | #define ASN1_F_ASN1_VERIFY 137 | 1222 | #define ASN1_F_ASN1_VERIFY 137 |
1159 | #define ASN1_F_B64_READ_ASN1 208 | 1223 | #define ASN1_F_B64_READ_ASN1 209 |
1160 | #define ASN1_F_B64_WRITE_ASN1 209 | 1224 | #define ASN1_F_B64_WRITE_ASN1 210 |
1225 | #define ASN1_F_BIO_NEW_NDEF 208 | ||
1161 | #define ASN1_F_BITSTR_CB 180 | 1226 | #define ASN1_F_BITSTR_CB 180 |
1162 | #define ASN1_F_BN_TO_ASN1_ENUMERATED 138 | 1227 | #define ASN1_F_BN_TO_ASN1_ENUMERATED 138 |
1163 | #define ASN1_F_BN_TO_ASN1_INTEGER 139 | 1228 | #define ASN1_F_BN_TO_ASN1_INTEGER 139 |
@@ -1176,6 +1241,7 @@ void ERR_load_ASN1_strings(void); | |||
1176 | #define ASN1_F_D2I_ASN1_TYPE_BYTES 149 | 1241 | #define ASN1_F_D2I_ASN1_TYPE_BYTES 149 |
1177 | #define ASN1_F_D2I_ASN1_UINTEGER 150 | 1242 | #define ASN1_F_D2I_ASN1_UINTEGER 150 |
1178 | #define ASN1_F_D2I_ASN1_UTCTIME 151 | 1243 | #define ASN1_F_D2I_ASN1_UTCTIME 151 |
1244 | #define ASN1_F_D2I_AUTOPRIVATEKEY 207 | ||
1179 | #define ASN1_F_D2I_NETSCAPE_RSA 152 | 1245 | #define ASN1_F_D2I_NETSCAPE_RSA 152 |
1180 | #define ASN1_F_D2I_NETSCAPE_RSA_2 153 | 1246 | #define ASN1_F_D2I_NETSCAPE_RSA_2 153 |
1181 | #define ASN1_F_D2I_PRIVATEKEY 154 | 1247 | #define ASN1_F_D2I_PRIVATEKEY 154 |
@@ -1185,6 +1251,7 @@ void ERR_load_ASN1_strings(void); | |||
1185 | #define ASN1_F_D2I_X509 156 | 1251 | #define ASN1_F_D2I_X509 156 |
1186 | #define ASN1_F_D2I_X509_CINF 157 | 1252 | #define ASN1_F_D2I_X509_CINF 157 |
1187 | #define ASN1_F_D2I_X509_PKEY 159 | 1253 | #define ASN1_F_D2I_X509_PKEY 159 |
1254 | #define ASN1_F_I2D_ASN1_BIO_STREAM 211 | ||
1188 | #define ASN1_F_I2D_ASN1_SET 188 | 1255 | #define ASN1_F_I2D_ASN1_SET 188 |
1189 | #define ASN1_F_I2D_ASN1_TIME 160 | 1256 | #define ASN1_F_I2D_ASN1_TIME 160 |
1190 | #define ASN1_F_I2D_DSA_PUBKEY 161 | 1257 | #define ASN1_F_I2D_DSA_PUBKEY 161 |
@@ -1196,10 +1263,11 @@ void ERR_load_ASN1_strings(void); | |||
1196 | #define ASN1_F_LONG_C2I 166 | 1263 | #define ASN1_F_LONG_C2I 166 |
1197 | #define ASN1_F_OID_MODULE_INIT 174 | 1264 | #define ASN1_F_OID_MODULE_INIT 174 |
1198 | #define ASN1_F_PARSE_TAGGING 182 | 1265 | #define ASN1_F_PARSE_TAGGING 182 |
1199 | #define ASN1_F_PKCS5_PBE2_SET 167 | 1266 | #define ASN1_F_PKCS5_PBE2_SET_IV 167 |
1200 | #define ASN1_F_PKCS5_PBE_SET 202 | 1267 | #define ASN1_F_PKCS5_PBE_SET 202 |
1201 | #define ASN1_F_SMIME_READ_ASN1 210 | 1268 | #define ASN1_F_PKCS5_PBE_SET0_ALGOR 215 |
1202 | #define ASN1_F_SMIME_TEXT 211 | 1269 | #define ASN1_F_SMIME_READ_ASN1 212 |
1270 | #define ASN1_F_SMIME_TEXT 213 | ||
1203 | #define ASN1_F_X509_CINF_NEW 168 | 1271 | #define ASN1_F_X509_CINF_NEW 168 |
1204 | #define ASN1_F_X509_CRL_ADD0_REVOKED 169 | 1272 | #define ASN1_F_X509_CRL_ADD0_REVOKED 169 |
1205 | #define ASN1_F_X509_INFO_NEW 170 | 1273 | #define ASN1_F_X509_INFO_NEW 170 |
@@ -1211,14 +1279,14 @@ void ERR_load_ASN1_strings(void); | |||
1211 | 1279 | ||
1212 | /* Reason codes. */ | 1280 | /* Reason codes. */ |
1213 | #define ASN1_R_ADDING_OBJECT 171 | 1281 | #define ASN1_R_ADDING_OBJECT 171 |
1214 | #define ASN1_R_ASN1_PARSE_ERROR 198 | 1282 | #define ASN1_R_ASN1_PARSE_ERROR 203 |
1215 | #define ASN1_R_ASN1_SIG_PARSE_ERROR 199 | 1283 | #define ASN1_R_ASN1_SIG_PARSE_ERROR 204 |
1216 | #define ASN1_R_AUX_ERROR 100 | 1284 | #define ASN1_R_AUX_ERROR 100 |
1217 | #define ASN1_R_BAD_CLASS 101 | 1285 | #define ASN1_R_BAD_CLASS 101 |
1218 | #define ASN1_R_BAD_OBJECT_HEADER 102 | 1286 | #define ASN1_R_BAD_OBJECT_HEADER 102 |
1219 | #define ASN1_R_BAD_PASSWORD_READ 103 | 1287 | #define ASN1_R_BAD_PASSWORD_READ 103 |
1220 | #define ASN1_R_BAD_TAG 104 | 1288 | #define ASN1_R_BAD_TAG 104 |
1221 | #define ASN1_R_BMPSTRING_IS_WRONG_LENGTH 210 | 1289 | #define ASN1_R_BMPSTRING_IS_WRONG_LENGTH 214 |
1222 | #define ASN1_R_BN_LIB 105 | 1290 | #define ASN1_R_BN_LIB 105 |
1223 | #define ASN1_R_BOOLEAN_IS_WRONG_LENGTH 106 | 1291 | #define ASN1_R_BOOLEAN_IS_WRONG_LENGTH 106 |
1224 | #define ASN1_R_BUFFER_TOO_SMALL 107 | 1292 | #define ASN1_R_BUFFER_TOO_SMALL 107 |
@@ -1227,6 +1295,7 @@ void ERR_load_ASN1_strings(void); | |||
1227 | #define ASN1_R_DECODE_ERROR 110 | 1295 | #define ASN1_R_DECODE_ERROR 110 |
1228 | #define ASN1_R_DECODING_ERROR 111 | 1296 | #define ASN1_R_DECODING_ERROR 111 |
1229 | #define ASN1_R_DEPTH_EXCEEDED 174 | 1297 | #define ASN1_R_DEPTH_EXCEEDED 174 |
1298 | #define ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED 198 | ||
1230 | #define ASN1_R_ENCODE_ERROR 112 | 1299 | #define ASN1_R_ENCODE_ERROR 112 |
1231 | #define ASN1_R_ERROR_GETTING_TIME 173 | 1300 | #define ASN1_R_ERROR_GETTING_TIME 173 |
1232 | #define ASN1_R_ERROR_LOADING_SECTION 172 | 1301 | #define ASN1_R_ERROR_LOADING_SECTION 172 |
@@ -1260,9 +1329,10 @@ void ERR_load_ASN1_strings(void); | |||
1260 | #define ASN1_R_INTEGER_TOO_LARGE_FOR_LONG 128 | 1329 | #define ASN1_R_INTEGER_TOO_LARGE_FOR_LONG 128 |
1261 | #define ASN1_R_INVALID_BMPSTRING_LENGTH 129 | 1330 | #define ASN1_R_INVALID_BMPSTRING_LENGTH 129 |
1262 | #define ASN1_R_INVALID_DIGIT 130 | 1331 | #define ASN1_R_INVALID_DIGIT 130 |
1263 | #define ASN1_R_INVALID_MIME_TYPE 200 | 1332 | #define ASN1_R_INVALID_MIME_TYPE 205 |
1264 | #define ASN1_R_INVALID_MODIFIER 186 | 1333 | #define ASN1_R_INVALID_MODIFIER 186 |
1265 | #define ASN1_R_INVALID_NUMBER 187 | 1334 | #define ASN1_R_INVALID_NUMBER 187 |
1335 | #define ASN1_R_INVALID_OBJECT_ENCODING 216 | ||
1266 | #define ASN1_R_INVALID_SEPARATOR 131 | 1336 | #define ASN1_R_INVALID_SEPARATOR 131 |
1267 | #define ASN1_R_INVALID_TIME_FORMAT 132 | 1337 | #define ASN1_R_INVALID_TIME_FORMAT 132 |
1268 | #define ASN1_R_INVALID_UNIVERSALSTRING_LENGTH 133 | 1338 | #define ASN1_R_INVALID_UNIVERSALSTRING_LENGTH 133 |
@@ -1270,9 +1340,9 @@ void ERR_load_ASN1_strings(void); | |||
1270 | #define ASN1_R_IV_TOO_LARGE 135 | 1340 | #define ASN1_R_IV_TOO_LARGE 135 |
1271 | #define ASN1_R_LENGTH_ERROR 136 | 1341 | #define ASN1_R_LENGTH_ERROR 136 |
1272 | #define ASN1_R_LIST_ERROR 188 | 1342 | #define ASN1_R_LIST_ERROR 188 |
1273 | #define ASN1_R_MIME_NO_CONTENT_TYPE 201 | 1343 | #define ASN1_R_MIME_NO_CONTENT_TYPE 206 |
1274 | #define ASN1_R_MIME_PARSE_ERROR 202 | 1344 | #define ASN1_R_MIME_PARSE_ERROR 207 |
1275 | #define ASN1_R_MIME_SIG_PARSE_ERROR 203 | 1345 | #define ASN1_R_MIME_SIG_PARSE_ERROR 208 |
1276 | #define ASN1_R_MISSING_EOC 137 | 1346 | #define ASN1_R_MISSING_EOC 137 |
1277 | #define ASN1_R_MISSING_SECOND_NUMBER 138 | 1347 | #define ASN1_R_MISSING_SECOND_NUMBER 138 |
1278 | #define ASN1_R_MISSING_VALUE 189 | 1348 | #define ASN1_R_MISSING_VALUE 189 |
@@ -1282,11 +1352,12 @@ void ERR_load_ASN1_strings(void); | |||
1282 | #define ASN1_R_NON_HEX_CHARACTERS 141 | 1352 | #define ASN1_R_NON_HEX_CHARACTERS 141 |
1283 | #define ASN1_R_NOT_ASCII_FORMAT 190 | 1353 | #define ASN1_R_NOT_ASCII_FORMAT 190 |
1284 | #define ASN1_R_NOT_ENOUGH_DATA 142 | 1354 | #define ASN1_R_NOT_ENOUGH_DATA 142 |
1285 | #define ASN1_R_NO_CONTENT_TYPE 204 | 1355 | #define ASN1_R_NO_CONTENT_TYPE 209 |
1356 | #define ASN1_R_NO_DEFAULT_DIGEST 201 | ||
1286 | #define ASN1_R_NO_MATCHING_CHOICE_TYPE 143 | 1357 | #define ASN1_R_NO_MATCHING_CHOICE_TYPE 143 |
1287 | #define ASN1_R_NO_MULTIPART_BODY_FAILURE 205 | 1358 | #define ASN1_R_NO_MULTIPART_BODY_FAILURE 210 |
1288 | #define ASN1_R_NO_MULTIPART_BOUNDARY 206 | 1359 | #define ASN1_R_NO_MULTIPART_BOUNDARY 211 |
1289 | #define ASN1_R_NO_SIG_CONTENT_TYPE 207 | 1360 | #define ASN1_R_NO_SIG_CONTENT_TYPE 212 |
1290 | #define ASN1_R_NULL_IS_WRONG_LENGTH 144 | 1361 | #define ASN1_R_NULL_IS_WRONG_LENGTH 144 |
1291 | #define ASN1_R_OBJECT_NOT_ASCII_FORMAT 191 | 1362 | #define ASN1_R_OBJECT_NOT_ASCII_FORMAT 191 |
1292 | #define ASN1_R_ODD_NUMBER_OF_CHARS 145 | 1363 | #define ASN1_R_ODD_NUMBER_OF_CHARS 145 |
@@ -1296,8 +1367,8 @@ void ERR_load_ASN1_strings(void); | |||
1296 | #define ASN1_R_SEQUENCE_NOT_CONSTRUCTED 149 | 1367 | #define ASN1_R_SEQUENCE_NOT_CONSTRUCTED 149 |
1297 | #define ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG 192 | 1368 | #define ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG 192 |
1298 | #define ASN1_R_SHORT_LINE 150 | 1369 | #define ASN1_R_SHORT_LINE 150 |
1299 | #define ASN1_R_SIG_INVALID_MIME_TYPE 208 | 1370 | #define ASN1_R_SIG_INVALID_MIME_TYPE 213 |
1300 | #define ASN1_R_STREAMING_NOT_SUPPORTED 209 | 1371 | #define ASN1_R_STREAMING_NOT_SUPPORTED 202 |
1301 | #define ASN1_R_STRING_TOO_LONG 151 | 1372 | #define ASN1_R_STRING_TOO_LONG 151 |
1302 | #define ASN1_R_STRING_TOO_SHORT 152 | 1373 | #define ASN1_R_STRING_TOO_SHORT 152 |
1303 | #define ASN1_R_TAG_VALUE_TOO_HIGH 153 | 1374 | #define ASN1_R_TAG_VALUE_TOO_HIGH 153 |
@@ -1308,11 +1379,12 @@ void ERR_load_ASN1_strings(void); | |||
1308 | #define ASN1_R_UNABLE_TO_DECODE_RSA_KEY 157 | 1379 | #define ASN1_R_UNABLE_TO_DECODE_RSA_KEY 157 |
1309 | #define ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY 158 | 1380 | #define ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY 158 |
1310 | #define ASN1_R_UNEXPECTED_EOC 159 | 1381 | #define ASN1_R_UNEXPECTED_EOC 159 |
1311 | #define ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH 211 | 1382 | #define ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH 215 |
1312 | #define ASN1_R_UNKNOWN_FORMAT 160 | 1383 | #define ASN1_R_UNKNOWN_FORMAT 160 |
1313 | #define ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM 161 | 1384 | #define ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM 161 |
1314 | #define ASN1_R_UNKNOWN_OBJECT_TYPE 162 | 1385 | #define ASN1_R_UNKNOWN_OBJECT_TYPE 162 |
1315 | #define ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE 163 | 1386 | #define ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE 163 |
1387 | #define ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM 199 | ||
1316 | #define ASN1_R_UNKNOWN_TAG 194 | 1388 | #define ASN1_R_UNKNOWN_TAG 194 |
1317 | #define ASN1_R_UNKOWN_FORMAT 195 | 1389 | #define ASN1_R_UNKOWN_FORMAT 195 |
1318 | #define ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE 164 | 1390 | #define ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE 164 |
@@ -1320,6 +1392,7 @@ void ERR_load_ASN1_strings(void); | |||
1320 | #define ASN1_R_UNSUPPORTED_ENCRYPTION_ALGORITHM 166 | 1392 | #define ASN1_R_UNSUPPORTED_ENCRYPTION_ALGORITHM 166 |
1321 | #define ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE 167 | 1393 | #define ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE 167 |
1322 | #define ASN1_R_UNSUPPORTED_TYPE 196 | 1394 | #define ASN1_R_UNSUPPORTED_TYPE 196 |
1395 | #define ASN1_R_WRONG_PUBLIC_KEY_TYPE 200 | ||
1323 | #define ASN1_R_WRONG_TAG 168 | 1396 | #define ASN1_R_WRONG_TAG 168 |
1324 | #define ASN1_R_WRONG_TYPE 169 | 1397 | #define ASN1_R_WRONG_TYPE 169 |
1325 | 1398 | ||