#include <openssl/x509v3.h>
#include "crypto/x509.h"
+#ifndef OPENSSL_NO_RFC3779
DEFINE_STACK_OF(IPAddressFamily)
+#endif
ASN1_SEQUENCE_enc(X509_CINF, enc, 0) = {
ASN1_EXP_OPT(X509_CINF, version, ASN1_INTEGER, 0),
# define SMIME_CRLFEOL 0x800
# define SMIME_STREAM 0x1000
-DEFINE_OR_DECLARE_STACK_OF(ASN1_GENERALSTRING)
-DEFINE_OR_DECLARE_STACK_OF(ASN1_INTEGER)
-DEFINE_OR_DECLARE_STACK_OF(ASN1_OBJECT)
-DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
-DEFINE_OR_DECLARE_STACK_OF(ASN1_UTF8STRING)
+/* Stacks for types not otherwise defined in this header */
DEFINE_OR_DECLARE_STACK_OF(X509_ALGOR)
-DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
# define ASN1_STRING_FLAG_BITS_LEFT 0x08/* Set if 0x07 has bits left value */
/*
unsigned long flags;
};
+DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
/* size limits: this stuff is taken straight from RFC2459 */
} value;
};
+DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
typedef STACK_OF(ASN1_TYPE) ASN1_SEQUENCE_ANY;
ASN1_TYPE *ASN1_TYPE_pack_sequence(const ASN1_ITEM *it, void *s, ASN1_TYPE **t);
void *ASN1_TYPE_unpack_sequence(const ASN1_ITEM *it, const ASN1_TYPE *t);
+DEFINE_OR_DECLARE_STACK_OF(ASN1_OBJECT)
+
DECLARE_ASN1_FUNCTIONS(ASN1_OBJECT)
ASN1_STRING *ASN1_STRING_new(void);
int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, const char *name, int value,
BIT_STRING_BITNAME *tbl);
+DEFINE_OR_DECLARE_STACK_OF(ASN1_INTEGER)
+
DECLARE_ASN1_FUNCTIONS(ASN1_INTEGER)
ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp,
long length);
int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str, const unsigned char *data,
int len);
+DEFINE_OR_DECLARE_STACK_OF(ASN1_UTF8STRING)
+
DECLARE_ASN1_FUNCTIONS(ASN1_VISIBLESTRING)
DECLARE_ASN1_FUNCTIONS(ASN1_UNIVERSALSTRING)
DECLARE_ASN1_FUNCTIONS(ASN1_UTF8STRING)
int UTF8_getc(const unsigned char *str, int len, unsigned long *val);
int UTF8_putc(unsigned char *str, int len, unsigned long value);
+DEFINE_OR_DECLARE_STACK_OF(ASN1_GENERALSTRING)
+
DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, ASN1_PRINTABLE)
DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, DIRECTORYSTRING)
# define OSSL_CMP_CERTORENCCERT_CERTIFICATE 0
# define OSSL_CMP_CERTORENCCERT_ENCRYPTEDCERT 1
-DEFINE_OR_DECLARE_STACK_OF(OSSL_CMP_CERTSTATUS)
-DEFINE_OR_DECLARE_STACK_OF(OSSL_CMP_ITAV)
-DEFINE_OR_DECLARE_STACK_OF(OSSL_CMP_PKISI)
-DEFINE_OR_DECLARE_STACK_OF(OSSL_CMP_CERTREPMESSAGE)
-DEFINE_OR_DECLARE_STACK_OF(OSSL_CMP_CERTRESPONSE)
-
/* data type declarations */
typedef struct ossl_cmp_ctx_st OSSL_CMP_CTX;
typedef struct ossl_cmp_pkiheader_st OSSL_CMP_PKIHEADER;
DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_MSG)
DECLARE_ASN1_ENCODE_FUNCTIONS(OSSL_CMP_MSG, OSSL_CMP_MSG, OSSL_CMP_MSG)
typedef struct ossl_cmp_certstatus_st OSSL_CMP_CERTSTATUS;
+DEFINE_OR_DECLARE_STACK_OF(OSSL_CMP_CERTSTATUS)
typedef struct ossl_cmp_itav_st OSSL_CMP_ITAV;
DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_ITAV)
+DEFINE_OR_DECLARE_STACK_OF(OSSL_CMP_ITAV)
typedef struct ossl_cmp_revrepcontent_st OSSL_CMP_REVREPCONTENT;
typedef struct ossl_cmp_pkisi_st OSSL_CMP_PKISI;
DECLARE_ASN1_FUNCTIONS(OSSL_CMP_PKISI)
DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_PKISI)
+DEFINE_OR_DECLARE_STACK_OF(OSSL_CMP_PKISI)
typedef struct ossl_cmp_certrepmessage_st OSSL_CMP_CERTREPMESSAGE;
+DEFINE_OR_DECLARE_STACK_OF(OSSL_CMP_CERTREPMESSAGE)
typedef struct ossl_cmp_pollrep_st OSSL_CMP_POLLREP;
typedef STACK_OF(OSSL_CMP_POLLREP) OSSL_CMP_POLLREPCONTENT;
typedef struct ossl_cmp_certresponse_st OSSL_CMP_CERTRESPONSE;
+DEFINE_OR_DECLARE_STACK_OF(OSSL_CMP_CERTRESPONSE)
typedef STACK_OF(ASN1_UTF8STRING) OSSL_CMP_PKIFREETEXT;
/*
} CONF_VALUE;
DEFINE_OR_DECLARE_STACK_OF(CONF_VALUE)
-DEFINE_OR_DECLARE_STACK_OF(CONF_MODULE)
DEFINE_LHASH_OF(CONF_VALUE);
typedef struct conf_imodule_st CONF_IMODULE;
typedef struct conf_module_st CONF_MODULE;
+STACK_OF(CONF_MODULE);
STACK_OF(CONF_IMODULE);
/* DSO module function typedefs */
extern "C" {
# endif
-DEFINE_OR_DECLARE_STACK_OF(OSSL_CRMF_MSG)
-DEFINE_OR_DECLARE_STACK_OF(OSSL_CRMF_CERTID)
-
# define OSSL_CRMF_POPOPRIVKEY_THISMESSAGE 0
# define OSSL_CRMF_POPOPRIVKEY_SUBSEQUENTMESSAGE 1
# define OSSL_CRMF_POPOPRIVKEY_DHMAC 2
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_ENCRYPTEDVALUE)
typedef struct ossl_crmf_msg_st OSSL_CRMF_MSG;
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_MSG)
+DEFINE_OR_DECLARE_STACK_OF(OSSL_CRMF_MSG)
typedef struct ossl_crmf_attributetypeandvalue_st OSSL_CRMF_ATTRIBUTETYPEANDVALUE;
typedef struct ossl_crmf_pbmparameter_st OSSL_CRMF_PBMPARAMETER;
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_PBMPARAMETER)
typedef struct ossl_crmf_certrequest_st OSSL_CRMF_CERTREQUEST;
typedef struct ossl_crmf_certid_st OSSL_CRMF_CERTID;
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_CERTID)
+DEFINE_OR_DECLARE_STACK_OF(OSSL_CRMF_CERTID)
typedef struct ossl_crmf_pkipublicationinfo_st OSSL_CRMF_PKIPUBLICATIONINFO;
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_PKIPUBLICATIONINFO)
# include <openssl/x509.h>
# include <openssl/esserr.h>
-DEFINE_OR_DECLARE_STACK_OF(ESS_CERT_ID)
-DEFINE_OR_DECLARE_STACK_OF(ESS_CERT_ID_V2)
typedef struct ESS_issuer_serial ESS_ISSUER_SERIAL;
typedef struct ESS_cert_id ESS_CERT_ID;
typedef struct ESS_signing_cert ESS_SIGNING_CERT;
+DEFINE_OR_DECLARE_STACK_OF(ESS_CERT_ID)
+
typedef struct ESS_signing_cert_v2_st ESS_SIGNING_CERT_V2;
typedef struct ESS_cert_id_v2_st ESS_CERT_ID_V2;
+DEFINE_OR_DECLARE_STACK_OF(ESS_CERT_ID_V2)
DECLARE_ASN1_ALLOC_FUNCTIONS(ESS_ISSUER_SERIAL)
DECLARE_ASN1_ENCODE_FUNCTIONS_only(ESS_ISSUER_SERIAL, ESS_ISSUER_SERIAL)
# define OCSP_RESPID_KEY 0x400
# define OCSP_NOTIME 0x800
-DEFINE_OR_DECLARE_STACK_OF(OCSP_CERTID)
-DEFINE_OR_DECLARE_STACK_OF(OCSP_ONEREQ)
-DEFINE_OR_DECLARE_STACK_OF(OCSP_RESPID)
-DEFINE_OR_DECLARE_STACK_OF(OCSP_SINGLERESP)
-
typedef struct ocsp_cert_id_st OCSP_CERTID;
typedef struct ocsp_one_request_st OCSP_ONEREQ;
typedef struct ocsp_req_info_st OCSP_REQINFO;
typedef struct ocsp_signature_st OCSP_SIGNATURE;
typedef struct ocsp_request_st OCSP_REQUEST;
+DEFINE_OR_DECLARE_STACK_OF(OCSP_CERTID)
+DEFINE_OR_DECLARE_STACK_OF(OCSP_ONEREQ)
+
# define OCSP_RESPONSE_STATUS_SUCCESSFUL 0
# define OCSP_RESPONSE_STATUS_MALFORMEDREQUEST 1
# define OCSP_RESPONSE_STATUS_INTERNALERROR 2
# define V_OCSP_RESPID_NAME 0
# define V_OCSP_RESPID_KEY 1
+DEFINE_OR_DECLARE_STACK_OF(OCSP_RESPID)
typedef struct ocsp_revoked_info_st OCSP_REVOKEDINFO;
typedef struct ocsp_cert_status_st OCSP_CERTSTATUS;
typedef struct ocsp_single_response_st OCSP_SINGLERESP;
+DEFINE_OR_DECLARE_STACK_OF(OCSP_SINGLERESP)
typedef struct ocsp_response_data_st OCSP_RESPDATA;
# define KEY_EX 0x10
# define KEY_SIG 0x80
-DEFINE_OR_DECLARE_STACK_OF(PKCS12_SAFEBAG)
-
typedef struct PKCS12_MAC_DATA_st PKCS12_MAC_DATA;
typedef struct PKCS12_st PKCS12;
typedef struct PKCS12_SAFEBAG_st PKCS12_SAFEBAG;
+DEFINE_OR_DECLARE_STACK_OF(PKCS12_SAFEBAG)
+
typedef struct pkcs12_bag_st PKCS12_BAGS;
# define PKCS12_ERROR 0
extern "C" {
# endif
-DEFINE_OR_DECLARE_STACK_OF(SRP_gN_cache)
-DEFINE_OR_DECLARE_STACK_OF(SRP_user_pwd)
-DEFINE_OR_DECLARE_STACK_OF(SRP_gN)
-
typedef struct SRP_gN_cache_st {
char *b64_bn;
BIGNUM *bn;
} SRP_gN_cache;
+DEFINE_OR_DECLARE_STACK_OF(SRP_gN_cache)
typedef struct SRP_user_pwd_st {
/* Owned by us. */
/* Owned by us. */
char *info;
} SRP_user_pwd;
+DEFINE_OR_DECLARE_STACK_OF(SRP_user_pwd)
SRP_user_pwd *SRP_user_pwd_new(void);
void SRP_user_pwd_free(SRP_user_pwd *user_pwd);
int SRP_user_pwd_set1_ids(SRP_user_pwd *user_pwd, const char *id, const char *info);
int SRP_user_pwd_set0_sv(SRP_user_pwd *user_pwd, BIGNUM *s, BIGNUM *v);
-
typedef struct SRP_VBASE_st {
STACK_OF(SRP_user_pwd) *users_pwd;
STACK_OF(SRP_gN_cache) *gN_cache;
const BIGNUM *g;
const BIGNUM *N;
} SRP_gN;
-
+DEFINE_OR_DECLARE_STACK_OF(SRP_gN)
SRP_VBASE *SRP_VBASE_new(char *seed_key);
void SRP_VBASE_free(SRP_VBASE *vb);
typedef struct ssl_conf_ctx_st SSL_CONF_CTX;
typedef struct ssl_comp_st SSL_COMP;
-DEFINE_OR_DECLARE_STACK_OF(SSL_CIPHER)
-DEFINE_OR_DECLARE_STACK_OF(SSL_COMP)
-DEFINE_OR_DECLARE_STACK_OF(SRTP_PROTECTION_PROFILE)
-DEFINE_OR_DECLARE_STACK_OF(SSL_COMP)
+STACK_OF(SSL_CIPHER);
+STACK_OF(SSL_COMP);
/* SRTP protection profiles for use with the use_srtp extension (RFC 5764)*/
typedef struct srtp_protection_profile_st {
const char *name;
unsigned long id;
} SRTP_PROTECTION_PROFILE;
+DEFINE_OR_DECLARE_STACK_OF(SRTP_PROTECTION_PROFILE)
typedef int (*tls_session_ticket_ext_cb_fn)(SSL *s, const unsigned char *data,
* These need to be after the above set of includes due to a compiler bug
* in VisualStudio 2015
*/
+DEFINE_OR_DECLARE_STACK_OF(SSL_CIPHER)
+DEFINE_OR_DECLARE_STACK_OF(SSL_COMP)
/* compatibility */
# define SSL_set_app_data(s,arg) (SSL_set_ex_data(s,0,(char *)(arg)))
extern "C" {
#endif
+/* Needed stacks for types defined in other headers */
+DEFINE_OR_DECLARE_STACK_OF(X509_NAME)
+DEFINE_OR_DECLARE_STACK_OF(X509)
+DEFINE_OR_DECLARE_STACK_OF(X509_REVOKED)
+DEFINE_OR_DECLARE_STACK_OF(X509_CRL)
/* Flags for X509_get_signature_info() */
/* Signature info is valid */
typedef struct X509_sig_st X509_SIG;
typedef struct X509_name_entry_st X509_NAME_ENTRY;
-
DEFINE_OR_DECLARE_STACK_OF(X509_NAME_ENTRY)
-DEFINE_OR_DECLARE_STACK_OF(X509_NAME)
-DEFINE_OR_DECLARE_STACK_OF(X509)
-DEFINE_OR_DECLARE_STACK_OF(X509_REVOKED)
-DEFINE_OR_DECLARE_STACK_OF(X509_CRL)
+
# define X509_EX_V_NETSCAPE_HACK 0x8000
# define X509_EX_V_INIT 0x0001
extern "C" {
#endif
-DEFINE_OR_DECLARE_STACK_OF(GENERAL_NAME)
-DEFINE_OR_DECLARE_STACK_OF(X509V3_EXT_METHOD)
-DEFINE_OR_DECLARE_STACK_OF(GENERAL_NAMES)
-DEFINE_OR_DECLARE_STACK_OF(ACCESS_DESCRIPTION)
-DEFINE_OR_DECLARE_STACK_OF(DIST_POINT)
-DEFINE_OR_DECLARE_STACK_OF(SXNETID)
-DEFINE_OR_DECLARE_STACK_OF(POLICYQUALINFO)
-DEFINE_OR_DECLARE_STACK_OF(POLICYINFO)
-DEFINE_OR_DECLARE_STACK_OF(POLICY_MAPPING)
-DEFINE_OR_DECLARE_STACK_OF(GENERAL_SUBTREE)
-DEFINE_OR_DECLARE_STACK_OF(X509_PURPOSE)
-DEFINE_OR_DECLARE_STACK_OF(X509_POLICY_NODE)
-DEFINE_OR_DECLARE_STACK_OF(ASIdOrRange)
-DEFINE_OR_DECLARE_STACK_OF(IPAddressOrRange)
-DEFINE_OR_DECLARE_STACK_OF(IPAddressFamily)
-DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING)
-DEFINE_OR_DECLARE_STACK_OF(ADMISSIONS)
-DEFINE_OR_DECLARE_STACK_OF(PROFESSION_INFO)
-
/* Forward reference */
struct v3_ext_method;
struct v3_ext_ctx;
typedef struct v3_ext_method X509V3_EXT_METHOD;
+DEFINE_OR_DECLARE_STACK_OF(X509V3_EXT_METHOD)
+
/* ext_flags values */
# define X509V3_EXT_DYNAMIC 0x1
# define X509V3_EXT_CTX_DEP 0x2
GENERAL_NAME *location;
} ACCESS_DESCRIPTION;
-typedef STACK_OF(ACCESS_DESCRIPTION) AUTHORITY_INFO_ACCESS;
+DEFINE_OR_DECLARE_STACK_OF(ACCESS_DESCRIPTION)
+DEFINE_OR_DECLARE_STACK_OF(GENERAL_NAME)
+typedef STACK_OF(ACCESS_DESCRIPTION) AUTHORITY_INFO_ACCESS;
typedef STACK_OF(ASN1_OBJECT) EXTENDED_KEY_USAGE;
-
typedef STACK_OF(ASN1_INTEGER) TLS_FEATURE;
-
typedef STACK_OF(GENERAL_NAME) GENERAL_NAMES;
+DEFINE_OR_DECLARE_STACK_OF(GENERAL_NAMES)
+
typedef struct DIST_POINT_NAME_st {
int type;
union {
int dp_reasons;
};
+DEFINE_OR_DECLARE_STACK_OF(DIST_POINT)
+
typedef STACK_OF(DIST_POINT) CRL_DIST_POINTS;
struct AUTHORITY_KEYID_st {
ASN1_OCTET_STRING *user;
} SXNETID;
+DEFINE_OR_DECLARE_STACK_OF(SXNETID)
+
typedef struct SXNET_st {
ASN1_INTEGER *version;
STACK_OF(SXNETID) *ids;
} d;
} POLICYQUALINFO;
+DEFINE_OR_DECLARE_STACK_OF(POLICYQUALINFO)
+
typedef struct POLICYINFO_st {
ASN1_OBJECT *policyid;
STACK_OF(POLICYQUALINFO) *qualifiers;
} POLICYINFO;
+DEFINE_OR_DECLARE_STACK_OF(POLICYINFO)
+
typedef STACK_OF(POLICYINFO) CERTIFICATEPOLICIES;
typedef struct POLICY_MAPPING_st {
ASN1_OBJECT *subjectDomainPolicy;
} POLICY_MAPPING;
+DEFINE_OR_DECLARE_STACK_OF(POLICY_MAPPING)
+
typedef STACK_OF(POLICY_MAPPING) POLICY_MAPPINGS;
typedef struct GENERAL_SUBTREE_st {
ASN1_INTEGER *maximum;
} GENERAL_SUBTREE;
+DEFINE_OR_DECLARE_STACK_OF(GENERAL_SUBTREE)
+
struct NAME_CONSTRAINTS_st {
STACK_OF(GENERAL_SUBTREE) *permittedSubtrees;
STACK_OF(GENERAL_SUBTREE) *excludedSubtrees;
void *usr_data;
} X509_PURPOSE;
+DEFINE_OR_DECLARE_STACK_OF(X509_PURPOSE)
+
# define X509_PURPOSE_SSL_CLIENT 1
# define X509_PURPOSE_SSL_SERVER 2
# define X509_PURPOSE_NS_SSL_SERVER 3
unsigned long chtype);
void X509_POLICY_NODE_print(BIO *out, X509_POLICY_NODE *node, int indent);
+DEFINE_OR_DECLARE_STACK_OF(X509_POLICY_NODE)
#ifndef OPENSSL_NO_RFC3779
typedef struct ASRange_st {
} u;
} ASIdOrRange;
+DEFINE_OR_DECLARE_STACK_OF(ASIdOrRange)
+
typedef STACK_OF(ASIdOrRange) ASIdOrRanges;
# define ASIdentifierChoice_inherit 0
} u;
} IPAddressOrRange;
+DEFINE_OR_DECLARE_STACK_OF(IPAddressOrRange)
+
typedef STACK_OF(IPAddressOrRange) IPAddressOrRanges;
# define IPAddressChoice_inherit 0
IPAddressChoice *ipAddressChoice;
} IPAddressFamily;
+DEFINE_OR_DECLARE_STACK_OF(IPAddressFamily)
+
typedef STACK_OF(IPAddressFamily) IPAddrBlocks;
DECLARE_ASN1_FUNCTIONS(IPAddressRange)
#endif /* OPENSSL_NO_RFC3779 */
+DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING)
/*
* Admission Syntax
DECLARE_ASN1_FUNCTIONS(PROFESSION_INFO)
DECLARE_ASN1_FUNCTIONS(ADMISSIONS)
DECLARE_ASN1_FUNCTIONS(ADMISSION_SYNTAX)
+DEFINE_OR_DECLARE_STACK_OF(PROFESSION_INFO)
+DEFINE_OR_DECLARE_STACK_OF(ADMISSIONS)
typedef STACK_OF(PROFESSION_INFO) PROFESSION_INFOS;
const ASN1_OBJECT *NAMING_AUTHORITY_get0_authorityId(