Some more prototype fixes.
[openssl.git] / crypto / asn1 / asn1.h
index a3b992ff93f52727eec6f1a3f807dd3019a08067..303fe5da8b6bc7f014b9a5984ef7b1da03424cbb 100644 (file)
@@ -71,6 +71,7 @@
 #include <openssl/symhacks.h>
 
 #include <openssl/e_os2.h>
 #include <openssl/symhacks.h>
 
 #include <openssl/e_os2.h>
+#include <openssl/ossl_typ.h>
 
 #ifdef OPENSSL_BUILD_SHLIBCRYPTO
 # undef OPENSSL_EXTERN
 
 #ifdef OPENSSL_BUILD_SHLIBCRYPTO
 # undef OPENSSL_EXTERN
@@ -246,44 +247,6 @@ DECLARE_STACK_OF(ASN1_STRING_TABLE)
 #define ub_title                       64
 #define ub_email_address               128
 
 #define ub_title                       64
 #define ub_email_address               128
 
-#ifdef NO_ASN1_TYPEDEFS
-#define ASN1_INTEGER           ASN1_STRING
-#define ASN1_ENUMERATED                ASN1_STRING
-#define ASN1_BIT_STRING                ASN1_STRING
-#define ASN1_OCTET_STRING      ASN1_STRING
-#define ASN1_PRINTABLESTRING   ASN1_STRING
-#define ASN1_T61STRING         ASN1_STRING
-#define ASN1_IA5STRING         ASN1_STRING
-#define ASN1_UTCTIME           ASN1_STRING
-#define ASN1_GENERALIZEDTIME   ASN1_STRING
-#define ASN1_TIME              ASN1_STRING
-#define ASN1_GENERALSTRING     ASN1_STRING
-#define ASN1_UNIVERSALSTRING   ASN1_STRING
-#define ASN1_BMPSTRING         ASN1_STRING
-#define ASN1_VISIBLESTRING     ASN1_STRING
-#define ASN1_UTF8STRING                ASN1_STRING
-#define ASN1_BOOLEAN           int
-#define ASN1_NULL              int
-#else
-typedef struct asn1_string_st ASN1_INTEGER;
-typedef struct asn1_string_st ASN1_ENUMERATED;
-typedef struct asn1_string_st ASN1_BIT_STRING;
-typedef struct asn1_string_st ASN1_OCTET_STRING;
-typedef struct asn1_string_st ASN1_PRINTABLESTRING;
-typedef struct asn1_string_st ASN1_T61STRING;
-typedef struct asn1_string_st ASN1_IA5STRING;
-typedef struct asn1_string_st ASN1_GENERALSTRING;
-typedef struct asn1_string_st ASN1_UNIVERSALSTRING;
-typedef struct asn1_string_st ASN1_BMPSTRING;
-typedef struct asn1_string_st ASN1_UTCTIME;
-typedef struct asn1_string_st ASN1_TIME;
-typedef struct asn1_string_st ASN1_GENERALIZEDTIME;
-typedef struct asn1_string_st ASN1_VISIBLESTRING;
-typedef struct asn1_string_st ASN1_UTF8STRING;
-typedef int ASN1_BOOLEAN;
-typedef int ASN1_NULL;
-#endif
-
 /* Declarations for template structures: for full definitions
  * see asn1t.h
  */
 /* Declarations for template structures: for full definitions
  * see asn1t.h
  */
@@ -357,7 +320,7 @@ typedef struct ASN1_VALUE_st ASN1_VALUE;
  *
  */
 
  *
  */
 
-#ifndef ASN1_ITEM_FUNCTIONS
+#ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION
 
 /* ASN1_ITEM pointer exported type */
 typedef const ASN1_ITEM ASN1_ITEM_EXP;
 
 /* ASN1_ITEM pointer exported type */
 typedef const ASN1_ITEM ASN1_ITEM_EXP;
@@ -477,6 +440,8 @@ typedef const ASN1_ITEM * ASN1_ITEM_EXP(void);
 DECLARE_STACK_OF(ASN1_INTEGER)
 DECLARE_ASN1_SET_OF(ASN1_INTEGER)
 
 DECLARE_STACK_OF(ASN1_INTEGER)
 DECLARE_ASN1_SET_OF(ASN1_INTEGER)
 
+DECLARE_STACK_OF(ASN1_GENERALSTRING)
+
 typedef struct asn1_type_st
        {
        int type;
 typedef struct asn1_type_st
        {
        int type;
@@ -808,6 +773,7 @@ int         ASN1_OCTET_STRING_cmp(ASN1_OCTET_STRING *a, ASN1_OCTET_STRING *b);
 int    ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str, unsigned char *data, int len);
 
 DECLARE_ASN1_FUNCTIONS(ASN1_VISIBLESTRING)
 int    ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str, unsigned char *data, int len);
 
 DECLARE_ASN1_FUNCTIONS(ASN1_VISIBLESTRING)
+DECLARE_ASN1_FUNCTIONS(ASN1_UNIVERSALSTRING)
 DECLARE_ASN1_FUNCTIONS(ASN1_UTF8STRING)
 DECLARE_ASN1_FUNCTIONS(ASN1_NULL)
 DECLARE_ASN1_FUNCTIONS(ASN1_BMPSTRING)
 DECLARE_ASN1_FUNCTIONS(ASN1_UTF8STRING)
 DECLARE_ASN1_FUNCTIONS(ASN1_NULL)
 DECLARE_ASN1_FUNCTIONS(ASN1_BMPSTRING)
@@ -822,6 +788,7 @@ DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, DISPLAYTEXT)
 DECLARE_ASN1_FUNCTIONS(ASN1_PRINTABLESTRING)
 DECLARE_ASN1_FUNCTIONS(ASN1_T61STRING)
 DECLARE_ASN1_FUNCTIONS(ASN1_IA5STRING)
 DECLARE_ASN1_FUNCTIONS(ASN1_PRINTABLESTRING)
 DECLARE_ASN1_FUNCTIONS(ASN1_T61STRING)
 DECLARE_ASN1_FUNCTIONS(ASN1_IA5STRING)
+DECLARE_ASN1_FUNCTIONS(ASN1_GENERALSTRING)
 DECLARE_ASN1_FUNCTIONS(ASN1_UTCTIME)
 DECLARE_ASN1_FUNCTIONS(ASN1_GENERALIZEDTIME)
 DECLARE_ASN1_FUNCTIONS(ASN1_TIME)
 DECLARE_ASN1_FUNCTIONS(ASN1_UTCTIME)
 DECLARE_ASN1_FUNCTIONS(ASN1_GENERALIZEDTIME)
 DECLARE_ASN1_FUNCTIONS(ASN1_TIME)
@@ -922,8 +889,6 @@ void ASN1_HEADER_free(ASN1_HEADER *a);
 
 int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s);
 
 
 int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s);
 
-void ERR_load_ASN1_strings(void);
-
 /* Not used that much at this point, except for the first two */
 ASN1_METHOD *X509_asn1_meth(void);
 ASN1_METHOD *RSAPrivateKey_asn1_meth(void);
 /* Not used that much at this point, except for the first two */
 ASN1_METHOD *X509_asn1_meth(void);
 ASN1_METHOD *RSAPrivateKey_asn1_meth(void);
@@ -971,11 +936,13 @@ void ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it);
 ASN1_VALUE * ASN1_item_d2i(ASN1_VALUE **val, unsigned char **in, long len, const ASN1_ITEM *it);
 int ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
 
 ASN1_VALUE * ASN1_item_d2i(ASN1_VALUE **val, unsigned char **in, long len, const ASN1_ITEM *it);
 int ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
 
+void ASN1_add_oid_module(void);
 
 /* BEGIN ERROR CODES */
 /* The following lines are auto generated by the script mkerr.pl. Any changes
  * made after this point may be overwritten when the script is next run.
  */
 
 /* BEGIN ERROR CODES */
 /* The following lines are auto generated by the script mkerr.pl. Any changes
  * made after this point may be overwritten when the script is next run.
  */
+void ERR_load_ASN1_strings(void);
 
 /* Error codes for the ASN1 functions. */
 
 
 /* Error codes for the ASN1 functions. */
 
@@ -1042,11 +1009,13 @@ int ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
 #define ASN1_F_D2I_X509_PKEY                            159
 #define ASN1_F_I2D_ASN1_TIME                            160
 #define ASN1_F_I2D_DSA_PUBKEY                           161
 #define ASN1_F_D2I_X509_PKEY                            159
 #define ASN1_F_I2D_ASN1_TIME                            160
 #define ASN1_F_I2D_DSA_PUBKEY                           161
+#define ASN1_F_I2D_ECDSA_PUBKEY                                 174
 #define ASN1_F_I2D_NETSCAPE_RSA                                 162
 #define ASN1_F_I2D_PRIVATEKEY                           163
 #define ASN1_F_I2D_PUBLICKEY                            164
 #define ASN1_F_I2D_RSA_PUBKEY                           165
 #define ASN1_F_LONG_C2I                                         166
 #define ASN1_F_I2D_NETSCAPE_RSA                                 162
 #define ASN1_F_I2D_PRIVATEKEY                           163
 #define ASN1_F_I2D_PUBLICKEY                            164
 #define ASN1_F_I2D_RSA_PUBKEY                           165
 #define ASN1_F_LONG_C2I                                         166
+#define ASN1_F_OID_MODULE_INIT                          175
 #define ASN1_F_PKCS5_PBE2_SET                           167
 #define ASN1_F_X509_CINF_NEW                            168
 #define ASN1_F_X509_CRL_ADD0_REVOKED                    169
 #define ASN1_F_PKCS5_PBE2_SET                           167
 #define ASN1_F_X509_CINF_NEW                            168
 #define ASN1_F_X509_CRL_ADD0_REVOKED                    169
@@ -1056,6 +1025,7 @@ int ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
 #define ASN1_F_X509_PKEY_NEW                            173
 
 /* Reason codes. */
 #define ASN1_F_X509_PKEY_NEW                            173
 
 /* Reason codes. */
+#define ASN1_R_ADDING_OBJECT                            171
 #define ASN1_R_AUX_ERROR                                100
 #define ASN1_R_BAD_CLASS                                101
 #define ASN1_R_BAD_OBJECT_HEADER                        102
 #define ASN1_R_AUX_ERROR                                100
 #define ASN1_R_BAD_CLASS                                101
 #define ASN1_R_BAD_OBJECT_HEADER                        102
@@ -1069,6 +1039,7 @@ int ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
 #define ASN1_R_DECODE_ERROR                             110
 #define ASN1_R_DECODING_ERROR                           111
 #define ASN1_R_ENCODE_ERROR                             112
 #define ASN1_R_DECODE_ERROR                             110
 #define ASN1_R_DECODING_ERROR                           111
 #define ASN1_R_ENCODE_ERROR                             112
+#define ASN1_R_ERROR_LOADING_SECTION                    172
 #define ASN1_R_ERROR_PARSING_SET_ELEMENT                113
 #define ASN1_R_ERROR_SETTING_CIPHER_PARAMS              114
 #define ASN1_R_EXPECTING_AN_INTEGER                     115
 #define ASN1_R_ERROR_PARSING_SET_ELEMENT                113
 #define ASN1_R_ERROR_SETTING_CIPHER_PARAMS              114
 #define ASN1_R_EXPECTING_AN_INTEGER                     115
@@ -1132,4 +1103,3 @@ int ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
 }
 #endif
 #endif
 }
 #endif
 #endif
-