#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;
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
} 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)
typedef struct NOTICEREF_st {
ASN1_STRING *organization;
- STACK *noticenos;
+ STACK_OF(ASN1_INTEGER) *noticenos;
} NOTICEREF;
typedef struct USERNOTICE_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)
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,
int (*ck)(X509_PURPOSE *, X509 *, int),
char *name, char *sname, void *arg);
-char *X509_PURPOSE_iget_name(X509_PURPOSE *xp);
-char *X509_PURPOSE_iget_sname(X509_PURPOSE *xp);
+char *X509_PURPOSE_get0_name(X509_PURPOSE *xp);
+char *X509_PURPOSE_get0_sname(X509_PURPOSE *xp);
int X509_PURPOSE_get_trust(X509_PURPOSE *xp);
void X509_PURPOSE_cleanup(void);
int X509_PURPOSE_get_id(X509_PURPOSE *);