Typesafety Thought Police last part.
[openssl.git] / crypto / x509v3 / x509v3.h
index a977bf4215f039037ffda8d2ef5f96c327c3e867..f2225d3980db225b7084789f392573acefd5461d 100644 (file)
 #ifndef HEADER_X509V3_H
 #define HEADER_X509V3_H
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #include <openssl/bio.h>
 #include <openssl/x509.h>
 #include <openssl/conf.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Forward reference */
 struct v3_ext_method;
 struct v3_ext_ctx;
@@ -131,6 +131,8 @@ void *db;
 typedef struct v3_ext_method X509V3_EXT_METHOD;
 typedef struct v3_ext_ctx X509V3_CTX;
 
+DECLARE_STACK_OF(X509V3_EXT_METHOD)
+
 /* ext_flags values */
 #define X509V3_EXT_DYNAMIC     0x1
 #define X509V3_EXT_CTX_DEP     0x2
@@ -179,8 +181,8 @@ union {
 } GENERAL_NAME;
 
 typedef struct ACCESS_DESCRIPTION_st {
-ASN1_OBJECT *method;
-GENERAL_NAME *location;
+       ASN1_OBJECT *method;
+       GENERAL_NAME *location;
 } ACCESS_DESCRIPTION;
 
 DECLARE_STACK_OF(GENERAL_NAME)
@@ -227,7 +229,7 @@ typedef struct SXNET_st {
 
 typedef struct NOTICEREF_st {
        ASN1_STRING *organization;
-       STACK *noticenos;
+       STACK_OF(ASN1_INTEGER) *noticenos;
 } NOTICEREF;
 
 typedef struct USERNOTICE_st {
@@ -344,9 +346,10 @@ typedef struct x509_purpose_st {
 #define X509_PURPOSE_SMIME_SIGN                4
 #define X509_PURPOSE_SMIME_ENCRYPT     5
 #define X509_PURPOSE_CRL_SIGN          6
+#define X509_PURPOSE_ANY               7
 
 #define X509_PURPOSE_MIN               1
-#define X509_PURPOSE_MAX               6
+#define X509_PURPOSE_MAX               7
 
 DECLARE_STACK_OF(X509_PURPOSE)
 
@@ -529,7 +532,7 @@ int X509V3_EXT_print_fp(FILE *out, X509_EXTENSION *ext, int flag, int indent);
 
 int X509_check_purpose(X509 *x, int id, int ca);
 int X509_PURPOSE_get_count(void);
-X509_PURPOSE * X509_PURPOSE_iget(int idx);
+X509_PURPOSE * X509_PURPOSE_get0(int idx);
 int X509_PURPOSE_get_by_sname(char *sname);
 int X509_PURPOSE_get_by_id(int id);
 int X509_PURPOSE_add(int id, int trust, int flags,