Add algorithm specific signature printing. An individual ASN1 method can
[openssl.git] / crypto / asn1 / asn1.h
index 8f5b0517e94bc047ff815421199f94c95a6e2c58..6c94696ae8304d62927f0fe0e85535b7d2d13178 100644 (file)
@@ -230,8 +230,12 @@ typedef struct asn1_object_st
  */
 
 #define ASN1_STRING_FLAG_CONT 0x020 
+/* This flag is used by ASN1 code to indicate an ASN1_STRING is an MSTRING
+ * type.
+ */
+#define ASN1_STRING_FLAG_MSTRING 0x040 
 /* This is the base type that holds just about everything :-) */
-typedef struct asn1_string_st
+struct asn1_string_st
        {
        int length;
        int type;
@@ -241,7 +245,7 @@ typedef struct asn1_string_st
         * input data has a non-zero 'unused bits' value, it will be
         * handled correctly */
        long flags;
-       } ASN1_STRING;
+       };
 
 /* ASN1_ENCODING structure: this is used to save the received
  * encoding of an ASN1 type. This is useful to get round
@@ -887,12 +891,13 @@ int ASN1_TIME_check(ASN1_TIME *t);
 ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME **out);
 int ASN1_TIME_set_string(ASN1_TIME *s, const char *str);
 
-int i2d_ASN1_SET(STACK_OF(BLOCK) *a, unsigned char **pp,
+int i2d_ASN1_SET(STACK_OF(OPENSSL_BLOCK) *a, unsigned char **pp,
                 i2d_of_void *i2d, int ex_tag, int ex_class,
                 int is_set);
-STACK_OF(BLOCK) *d2i_ASN1_SET(STACK_OF(BLOCK) **a, const unsigned char **pp,
+STACK_OF(OPENSSL_BLOCK) *d2i_ASN1_SET(STACK_OF(OPENSSL_BLOCK) **a,
+                             const unsigned char **pp,
                              long length, d2i_of_void *d2i,
-                             void (*free_func)(BLOCK), int ex_tag,
+                             void (*free_func)(OPENSSL_BLOCK), int ex_tag,
                              int ex_class);
 
 #ifndef OPENSSL_NO_BIO
@@ -947,7 +952,7 @@ int ASN1_put_eoc(unsigned char **pp);
 int ASN1_object_size(int constructed, int length, int tag);
 
 /* Used to implement other functions */
-void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, char *x);
+void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, void *x);
 
 #define ASN1_dup_of(type,i2d,d2i,x) \
     ((type*)ASN1_dup(CHECKED_I2D_OF(type, i2d), \
@@ -1045,9 +1050,9 @@ int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num,
 int ASN1_TYPE_get_int_octetstring(ASN1_TYPE *a,long *num,
        unsigned char *data, int max_len);
 
-STACK_OF(BLOCK) *ASN1_seq_unpack(const unsigned char *buf, int len,
-                                d2i_of_void *d2i, void (*free_func)(BLOCK));
-unsigned char *ASN1_seq_pack(STACK_OF(BLOCK) *safes, i2d_of_void *i2d,
+STACK_OF(OPENSSL_BLOCK) *ASN1_seq_unpack(const unsigned char *buf, int len,
+                                d2i_of_void *d2i, void (*free_func)(OPENSSL_BLOCK));
+unsigned char *ASN1_seq_pack(STACK_OF(OPENSSL_BLOCK) *safes, i2d_of_void *i2d,
                             unsigned char **buf, int *len );
 void *ASN1_unpack_string(ASN1_STRING *oct, d2i_of_void *d2i);
 void *ASN1_item_unpack(ASN1_STRING *oct, const ASN1_ITEM *it);
@@ -1172,6 +1177,7 @@ void ERR_load_ASN1_strings(void);
 #define ASN1_F_ASN1_ENUMERATED_TO_BN                    113
 #define ASN1_F_ASN1_EX_C2I                              204
 #define ASN1_F_ASN1_FIND_END                            190
+#define ASN1_F_ASN1_GENERALIZEDTIME_ADJ                         216
 #define ASN1_F_ASN1_GENERALIZEDTIME_SET                         185
 #define ASN1_F_ASN1_GENERATE_V3                                 178
 #define ASN1_F_ASN1_GET_OBJECT                          114
@@ -1206,10 +1212,12 @@ void ERR_load_ASN1_strings(void);
 #define ASN1_F_ASN1_TEMPLATE_EX_D2I                     132
 #define ASN1_F_ASN1_TEMPLATE_NEW                        133
 #define ASN1_F_ASN1_TEMPLATE_NOEXP_D2I                  131
+#define ASN1_F_ASN1_TIME_ADJ                            217
 #define ASN1_F_ASN1_TIME_SET                            175
 #define ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING            134
 #define ASN1_F_ASN1_TYPE_GET_OCTETSTRING                135
 #define ASN1_F_ASN1_UNPACK_STRING                       136
+#define ASN1_F_ASN1_UTCTIME_ADJ                                 218
 #define ASN1_F_ASN1_UTCTIME_SET                                 187
 #define ASN1_F_ASN1_VERIFY                              137
 #define ASN1_F_B64_READ_ASN1                            209
@@ -1258,6 +1266,7 @@ void ERR_load_ASN1_strings(void);
 #define ASN1_F_PKCS5_PBE2_SET_IV                        167
 #define ASN1_F_PKCS5_PBE_SET                            202
 #define ASN1_F_PKCS5_PBE_SET0_ALGOR                     215
+#define ASN1_F_PKCS5_PBKDF2_SET                                 219
 #define ASN1_F_SMIME_READ_ASN1                          212
 #define ASN1_F_SMIME_TEXT                               213
 #define ASN1_F_X509_CINF_NEW                            168
@@ -1324,6 +1333,7 @@ void ERR_load_ASN1_strings(void);
 #define ASN1_R_INVALID_MIME_TYPE                        205
 #define ASN1_R_INVALID_MODIFIER                                 186
 #define ASN1_R_INVALID_NUMBER                           187
+#define ASN1_R_INVALID_OBJECT_ENCODING                  216
 #define ASN1_R_INVALID_SEPARATOR                        131
 #define ASN1_R_INVALID_TIME_FORMAT                      132
 #define ASN1_R_INVALID_UNIVERSALSTRING_LENGTH           133