Add initial support for Thawte strong extranet certificate extensions and
[openssl.git] / crypto / asn1 / asn1.h
index c4e321177822c8732f55f61e8f047f21dcf63f1c..7e605c83d6eb8a4a7ec89cb82f5874169c1ef4b1 100644 (file)
@@ -305,7 +305,7 @@ typedef struct asn1_header_st
                        B_ASN1_BMPSTRING|\
                        B_ASN1_UNKNOWN)
 
-#define ASN1_PRINTABLESTRING_new() (ASN1_PRINTABLESTRING_STRING *)\
+#define ASN1_PRINTABLESTRING_new() (ASN1_PRINTABLESTRING *)\
                ASN1_STRING_type_new(V_ASN1_PRINTABLESTRING)
 #define ASN1_PRINTABLESTRING_free(a)   ASN1_STRING_free((ASN1_STRING *)a)
 #define M_i2d_ASN1_PRINTABLESTRING(a,pp) \
@@ -328,6 +328,8 @@ typedef struct asn1_header_st
 #define ASN1_IA5STRING_new()   (ASN1_IA5STRING *)\
                ASN1_STRING_type_new(V_ASN1_IA5STRING)
 #define ASN1_IA5STRING_free(a) ASN1_STRING_free((ASN1_STRING *)a)
+#define ASN1_IA5STRING_dup(a)  \
+                       (ASN1_IA5STRING *)ASN1_STRING_dup((ASN1_STRING *)a)
 #define M_i2d_ASN1_IA5STRING(a,pp) \
                i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_IA5STRING,\
                        V_ASN1_UNIVERSAL)
@@ -394,6 +396,10 @@ typedef struct asn1_header_st
                (ASN1_BMPSTRING *)d2i_ASN1_type_bytes\
                ((ASN1_STRING **)a,pp,l,B_ASN1_BMPSTRING)
 
+  /* for the is_set parameter to i2d_ASN1_SET */
+#define IS_SEQUENCE    0
+#define IS_SET         1
+
 #ifndef NOPROTO
 ASN1_TYPE *    ASN1_TYPE_new(void );
 void           ASN1_TYPE_free(ASN1_TYPE *a);
@@ -471,10 +477,8 @@ ASN1_GENERALIZEDTIME *     d2i_ASN1_GENERALIZEDTIME(ASN1_GENERALIZEDTIME **a,unsigne
 
 int            i2d_ASN1_TIME(ASN1_TIME *a,unsigned char **pp);
 ASN1_TIME *    d2i_ASN1_TIME(ASN1_TIME **a,unsigned char **pp, long length);
+ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s,time_t t);
 
-  /* for the is_set parameter to i2d_ASN1_SET */
-#define IS_SEQUENCE    0
-#define IS_SET         1
 int            i2d_ASN1_SET(STACK *a, unsigned char **pp,
                        int (*func)(), int ex_tag, int ex_class, int is_set);
 STACK *                d2i_ASN1_SET(STACK **a, unsigned char **pp, long length,
@@ -620,6 +624,7 @@ int         i2d_ASN1_GENERALIZEDTIME();
 ASN1_GENERALIZEDTIME * d2i_ASN1_GENERALIZEDTIME();
 int            i2d_ASN1_TIME();
 ASN1_TIME *    d2i_ASN1_TIME();
+ASN1_TIME *ASN1_TIME_set();
 int            i2d_ASN1_SET();
 STACK *                d2i_ASN1_SET();
 int a2d_ASN1_OBJECT();
@@ -690,6 +695,7 @@ ASN1_BMPSTRING *d2i_ASN1_BMPSTRING();
 
 /* Function codes. */
 #define ASN1_F_A2D_ASN1_OBJECT                          100
+#define ASN1_F_A2I_ASN1_ENUMERATED                      236
 #define ASN1_F_A2I_ASN1_INTEGER                                 101
 #define ASN1_F_A2I_ASN1_STRING                          102
 #define ASN1_F_ASN1_COLLATE_PRIMATIVE                   103
@@ -714,6 +720,7 @@ ASN1_BMPSTRING *d2i_ASN1_BMPSTRING();
 #define ASN1_F_ASN1_TYPE_NEW                            119
 #define ASN1_F_ASN1_UTCTIME_NEW                                 120
 #define ASN1_F_ASN1_VERIFY                              121
+#define ASN1_F_AUTHORITY_KEYID_NEW                      237
 #define ASN1_F_BASIC_CONSTRAINTS_NEW                    226
 #define ASN1_F_BN_TO_ASN1_ENUMERATED                    234
 #define ASN1_F_BN_TO_ASN1_INTEGER                       122
@@ -733,6 +740,7 @@ ASN1_BMPSTRING *d2i_ASN1_BMPSTRING();
 #define ASN1_F_D2I_ASN1_TYPE                            133
 #define ASN1_F_D2I_ASN1_TYPE_BYTES                      134
 #define ASN1_F_D2I_ASN1_UTCTIME                                 135
+#define ASN1_F_D2I_AUTHORITY_KEYID                      238
 #define ASN1_F_D2I_BASIC_CONSTRAINTS                    227
 #define ASN1_F_D2I_DHPARAMS                             136
 #define ASN1_F_D2I_DSAPARAMS                            137
@@ -755,10 +763,13 @@ ASN1_BMPSTRING *d2i_ASN1_BMPSTRING();
 #define ASN1_F_D2I_PKCS7_SIGNED                                 152
 #define ASN1_F_D2I_PKCS7_SIGNER_INFO                    153
 #define ASN1_F_D2I_PKCS7_SIGN_ENVELOPE                  154
+#define ASN1_F_D2I_PKEY_USAGE_PERIOD                    239
 #define ASN1_F_D2I_PRIVATEKEY                           155
 #define ASN1_F_D2I_PUBLICKEY                            156
 #define ASN1_F_D2I_RSAPRIVATEKEY                        157
 #define ASN1_F_D2I_RSAPUBLICKEY                                 158
+#define ASN1_F_D2I_SXNET                                241
+#define ASN1_F_D2I_SXNETID                              243
 #define ASN1_F_D2I_X509                                         159
 #define ASN1_F_D2I_X509_ALGOR                           160
 #define ASN1_F_D2I_X509_ATTRIBUTE                       161
@@ -805,6 +816,9 @@ ASN1_BMPSTRING *d2i_ASN1_BMPSTRING();
 #define ASN1_F_PKCS7_SIGNED_NEW                                 199
 #define ASN1_F_PKCS7_SIGNER_INFO_NEW                    200
 #define ASN1_F_PKCS7_SIGN_ENVELOPE_NEW                  201
+#define ASN1_F_PKEY_USAGE_PERIOD_NEW                    240
+#define ASN1_F_SXNETID_NEW                              244
+#define ASN1_F_SXNET_NEW                                242
 #define ASN1_F_X509_ALGOR_NEW                           202
 #define ASN1_F_X509_ATTRIBUTE_NEW                       203
 #define ASN1_F_X509_CINF_NEW                            204