Because there's chances we clash with the system's types.h, rename our
[openssl.git] / crypto / asn1 / asn1.h
index a79ad0d4b2d51d91593396cce6e9eca54b902f8e..363070b8ab7635d996d1394f0103f9f5bdfafa49 100644 (file)
@@ -71,6 +71,7 @@
 #include <openssl/symhacks.h>
 
 #include <openssl/e_os2.h>
+#include <openssl/ossl_typ.h>
 
 #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
 
-#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
  */
@@ -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;
@@ -822,6 +785,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_GENERALSTRING)
 DECLARE_ASN1_FUNCTIONS(ASN1_UTCTIME)
 DECLARE_ASN1_FUNCTIONS(ASN1_GENERALIZEDTIME)
 DECLARE_ASN1_FUNCTIONS(ASN1_TIME)
@@ -1083,6 +1047,7 @@ int ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
 #define ASN1_R_ILLEGAL_CHARACTERS                       124
 #define ASN1_R_ILLEGAL_NULL                             125
 #define ASN1_R_ILLEGAL_OPTIONAL_ANY                     126
+#define ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE                 170
 #define ASN1_R_ILLEGAL_TAGGED_ANY                       127
 #define ASN1_R_INTEGER_TOO_LARGE_FOR_LONG               128
 #define ASN1_R_INVALID_BMPSTRING_LENGTH                         129