File indexing completed on 2025-01-18 10:05:54
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef OPENSSL_X509V3_H
0016 # define OPENSSL_X509V3_H
0017 # pragma once
0018
0019 # include <openssl/macros.h>
0020 # ifndef OPENSSL_NO_DEPRECATED_3_0
0021 # define HEADER_X509V3_H
0022 # endif
0023
0024 # include <openssl/bio.h>
0025 # include <openssl/x509.h>
0026 # include <openssl/conf.h>
0027 # include <openssl/x509v3err.h>
0028 # ifndef OPENSSL_NO_STDIO
0029 # include <stdio.h>
0030 # endif
0031
0032 #ifdef __cplusplus
0033 extern "C" {
0034 #endif
0035
0036
0037 struct v3_ext_method;
0038 struct v3_ext_ctx;
0039
0040
0041
0042 typedef void *(*X509V3_EXT_NEW)(void);
0043 typedef void (*X509V3_EXT_FREE) (void *);
0044 typedef void *(*X509V3_EXT_D2I)(void *, const unsigned char **, long);
0045 typedef int (*X509V3_EXT_I2D) (const void *, unsigned char **);
0046 typedef STACK_OF(CONF_VALUE) *
0047 (*X509V3_EXT_I2V) (const struct v3_ext_method *method, void *ext,
0048 STACK_OF(CONF_VALUE) *extlist);
0049 typedef void *(*X509V3_EXT_V2I)(const struct v3_ext_method *method,
0050 struct v3_ext_ctx *ctx,
0051 STACK_OF(CONF_VALUE) *values);
0052 typedef char *(*X509V3_EXT_I2S)(const struct v3_ext_method *method,
0053 void *ext);
0054 typedef void *(*X509V3_EXT_S2I)(const struct v3_ext_method *method,
0055 struct v3_ext_ctx *ctx, const char *str);
0056 typedef int (*X509V3_EXT_I2R) (const struct v3_ext_method *method, void *ext,
0057 BIO *out, int indent);
0058 typedef void *(*X509V3_EXT_R2I)(const struct v3_ext_method *method,
0059 struct v3_ext_ctx *ctx, const char *str);
0060
0061
0062
0063 struct v3_ext_method {
0064 int ext_nid;
0065 int ext_flags;
0066
0067 ASN1_ITEM_EXP *it;
0068
0069 X509V3_EXT_NEW ext_new;
0070 X509V3_EXT_FREE ext_free;
0071 X509V3_EXT_D2I d2i;
0072 X509V3_EXT_I2D i2d;
0073
0074 X509V3_EXT_I2S i2s;
0075 X509V3_EXT_S2I s2i;
0076
0077 X509V3_EXT_I2V i2v;
0078 X509V3_EXT_V2I v2i;
0079
0080 X509V3_EXT_I2R i2r;
0081 X509V3_EXT_R2I r2i;
0082 void *usr_data;
0083 };
0084
0085 typedef struct X509V3_CONF_METHOD_st {
0086 char *(*get_string) (void *db, const char *section, const char *value);
0087 STACK_OF(CONF_VALUE) *(*get_section) (void *db, const char *section);
0088 void (*free_string) (void *db, char *string);
0089 void (*free_section) (void *db, STACK_OF(CONF_VALUE) *section);
0090 } X509V3_CONF_METHOD;
0091
0092
0093 struct v3_ext_ctx {
0094 # define X509V3_CTX_TEST 0x1
0095 # ifndef OPENSSL_NO_DEPRECATED_3_0
0096 # define CTX_TEST X509V3_CTX_TEST
0097 # endif
0098 # define X509V3_CTX_REPLACE 0x2
0099 int flags;
0100 X509 *issuer_cert;
0101 X509 *subject_cert;
0102 X509_REQ *subject_req;
0103 X509_CRL *crl;
0104 X509V3_CONF_METHOD *db_meth;
0105 void *db;
0106 EVP_PKEY *issuer_pkey;
0107
0108 };
0109
0110 typedef struct v3_ext_method X509V3_EXT_METHOD;
0111
0112 SKM_DEFINE_STACK_OF_INTERNAL(X509V3_EXT_METHOD, X509V3_EXT_METHOD, X509V3_EXT_METHOD)
0113 #define sk_X509V3_EXT_METHOD_num(sk) OPENSSL_sk_num(ossl_check_const_X509V3_EXT_METHOD_sk_type(sk))
0114 #define sk_X509V3_EXT_METHOD_value(sk, idx) ((X509V3_EXT_METHOD *)OPENSSL_sk_value(ossl_check_const_X509V3_EXT_METHOD_sk_type(sk), (idx)))
0115 #define sk_X509V3_EXT_METHOD_new(cmp) ((STACK_OF(X509V3_EXT_METHOD) *)OPENSSL_sk_new(ossl_check_X509V3_EXT_METHOD_compfunc_type(cmp)))
0116 #define sk_X509V3_EXT_METHOD_new_null() ((STACK_OF(X509V3_EXT_METHOD) *)OPENSSL_sk_new_null())
0117 #define sk_X509V3_EXT_METHOD_new_reserve(cmp, n) ((STACK_OF(X509V3_EXT_METHOD) *)OPENSSL_sk_new_reserve(ossl_check_X509V3_EXT_METHOD_compfunc_type(cmp), (n)))
0118 #define sk_X509V3_EXT_METHOD_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_X509V3_EXT_METHOD_sk_type(sk), (n))
0119 #define sk_X509V3_EXT_METHOD_free(sk) OPENSSL_sk_free(ossl_check_X509V3_EXT_METHOD_sk_type(sk))
0120 #define sk_X509V3_EXT_METHOD_zero(sk) OPENSSL_sk_zero(ossl_check_X509V3_EXT_METHOD_sk_type(sk))
0121 #define sk_X509V3_EXT_METHOD_delete(sk, i) ((X509V3_EXT_METHOD *)OPENSSL_sk_delete(ossl_check_X509V3_EXT_METHOD_sk_type(sk), (i)))
0122 #define sk_X509V3_EXT_METHOD_delete_ptr(sk, ptr) ((X509V3_EXT_METHOD *)OPENSSL_sk_delete_ptr(ossl_check_X509V3_EXT_METHOD_sk_type(sk), ossl_check_X509V3_EXT_METHOD_type(ptr)))
0123 #define sk_X509V3_EXT_METHOD_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509V3_EXT_METHOD_sk_type(sk), ossl_check_X509V3_EXT_METHOD_type(ptr))
0124 #define sk_X509V3_EXT_METHOD_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_X509V3_EXT_METHOD_sk_type(sk), ossl_check_X509V3_EXT_METHOD_type(ptr))
0125 #define sk_X509V3_EXT_METHOD_pop(sk) ((X509V3_EXT_METHOD *)OPENSSL_sk_pop(ossl_check_X509V3_EXT_METHOD_sk_type(sk)))
0126 #define sk_X509V3_EXT_METHOD_shift(sk) ((X509V3_EXT_METHOD *)OPENSSL_sk_shift(ossl_check_X509V3_EXT_METHOD_sk_type(sk)))
0127 #define sk_X509V3_EXT_METHOD_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509V3_EXT_METHOD_sk_type(sk),ossl_check_X509V3_EXT_METHOD_freefunc_type(freefunc))
0128 #define sk_X509V3_EXT_METHOD_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_X509V3_EXT_METHOD_sk_type(sk), ossl_check_X509V3_EXT_METHOD_type(ptr), (idx))
0129 #define sk_X509V3_EXT_METHOD_set(sk, idx, ptr) ((X509V3_EXT_METHOD *)OPENSSL_sk_set(ossl_check_X509V3_EXT_METHOD_sk_type(sk), (idx), ossl_check_X509V3_EXT_METHOD_type(ptr)))
0130 #define sk_X509V3_EXT_METHOD_find(sk, ptr) OPENSSL_sk_find(ossl_check_X509V3_EXT_METHOD_sk_type(sk), ossl_check_X509V3_EXT_METHOD_type(ptr))
0131 #define sk_X509V3_EXT_METHOD_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_X509V3_EXT_METHOD_sk_type(sk), ossl_check_X509V3_EXT_METHOD_type(ptr))
0132 #define sk_X509V3_EXT_METHOD_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_X509V3_EXT_METHOD_sk_type(sk), ossl_check_X509V3_EXT_METHOD_type(ptr), pnum)
0133 #define sk_X509V3_EXT_METHOD_sort(sk) OPENSSL_sk_sort(ossl_check_X509V3_EXT_METHOD_sk_type(sk))
0134 #define sk_X509V3_EXT_METHOD_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_X509V3_EXT_METHOD_sk_type(sk))
0135 #define sk_X509V3_EXT_METHOD_dup(sk) ((STACK_OF(X509V3_EXT_METHOD) *)OPENSSL_sk_dup(ossl_check_const_X509V3_EXT_METHOD_sk_type(sk)))
0136 #define sk_X509V3_EXT_METHOD_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(X509V3_EXT_METHOD) *)OPENSSL_sk_deep_copy(ossl_check_const_X509V3_EXT_METHOD_sk_type(sk), ossl_check_X509V3_EXT_METHOD_copyfunc_type(copyfunc), ossl_check_X509V3_EXT_METHOD_freefunc_type(freefunc)))
0137 #define sk_X509V3_EXT_METHOD_set_cmp_func(sk, cmp) ((sk_X509V3_EXT_METHOD_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_X509V3_EXT_METHOD_sk_type(sk), ossl_check_X509V3_EXT_METHOD_compfunc_type(cmp)))
0138
0139
0140
0141 # define X509V3_EXT_DYNAMIC 0x1
0142 # define X509V3_EXT_CTX_DEP 0x2
0143 # define X509V3_EXT_MULTILINE 0x4
0144
0145 typedef BIT_STRING_BITNAME ENUMERATED_NAMES;
0146
0147 typedef struct BASIC_CONSTRAINTS_st {
0148 int ca;
0149 ASN1_INTEGER *pathlen;
0150 } BASIC_CONSTRAINTS;
0151
0152 typedef struct OSSL_BASIC_ATTR_CONSTRAINTS_st {
0153 int authority;
0154 ASN1_INTEGER *pathlen;
0155 } OSSL_BASIC_ATTR_CONSTRAINTS;
0156
0157 typedef struct PKEY_USAGE_PERIOD_st {
0158 ASN1_GENERALIZEDTIME *notBefore;
0159 ASN1_GENERALIZEDTIME *notAfter;
0160 } PKEY_USAGE_PERIOD;
0161
0162 typedef struct otherName_st {
0163 ASN1_OBJECT *type_id;
0164 ASN1_TYPE *value;
0165 } OTHERNAME;
0166
0167 typedef struct EDIPartyName_st {
0168 ASN1_STRING *nameAssigner;
0169 ASN1_STRING *partyName;
0170 } EDIPARTYNAME;
0171
0172 typedef struct GENERAL_NAME_st {
0173 # define GEN_OTHERNAME 0
0174 # define GEN_EMAIL 1
0175 # define GEN_DNS 2
0176 # define GEN_X400 3
0177 # define GEN_DIRNAME 4
0178 # define GEN_EDIPARTY 5
0179 # define GEN_URI 6
0180 # define GEN_IPADD 7
0181 # define GEN_RID 8
0182 int type;
0183 union {
0184 char *ptr;
0185 OTHERNAME *otherName;
0186 ASN1_IA5STRING *rfc822Name;
0187 ASN1_IA5STRING *dNSName;
0188 ASN1_STRING *x400Address;
0189 X509_NAME *directoryName;
0190 EDIPARTYNAME *ediPartyName;
0191 ASN1_IA5STRING *uniformResourceIdentifier;
0192 ASN1_OCTET_STRING *iPAddress;
0193 ASN1_OBJECT *registeredID;
0194
0195 ASN1_OCTET_STRING *ip;
0196 X509_NAME *dirn;
0197 ASN1_IA5STRING *ia5;
0198
0199 ASN1_OBJECT *rid;
0200 ASN1_TYPE *other;
0201 } d;
0202 } GENERAL_NAME;
0203
0204 typedef struct ACCESS_DESCRIPTION_st {
0205 ASN1_OBJECT *method;
0206 GENERAL_NAME *location;
0207 } ACCESS_DESCRIPTION;
0208
0209 int GENERAL_NAME_set1_X509_NAME(GENERAL_NAME **tgt, const X509_NAME *src);
0210
0211 SKM_DEFINE_STACK_OF_INTERNAL(ACCESS_DESCRIPTION, ACCESS_DESCRIPTION, ACCESS_DESCRIPTION)
0212 #define sk_ACCESS_DESCRIPTION_num(sk) OPENSSL_sk_num(ossl_check_const_ACCESS_DESCRIPTION_sk_type(sk))
0213 #define sk_ACCESS_DESCRIPTION_value(sk, idx) ((ACCESS_DESCRIPTION *)OPENSSL_sk_value(ossl_check_const_ACCESS_DESCRIPTION_sk_type(sk), (idx)))
0214 #define sk_ACCESS_DESCRIPTION_new(cmp) ((STACK_OF(ACCESS_DESCRIPTION) *)OPENSSL_sk_new(ossl_check_ACCESS_DESCRIPTION_compfunc_type(cmp)))
0215 #define sk_ACCESS_DESCRIPTION_new_null() ((STACK_OF(ACCESS_DESCRIPTION) *)OPENSSL_sk_new_null())
0216 #define sk_ACCESS_DESCRIPTION_new_reserve(cmp, n) ((STACK_OF(ACCESS_DESCRIPTION) *)OPENSSL_sk_new_reserve(ossl_check_ACCESS_DESCRIPTION_compfunc_type(cmp), (n)))
0217 #define sk_ACCESS_DESCRIPTION_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ACCESS_DESCRIPTION_sk_type(sk), (n))
0218 #define sk_ACCESS_DESCRIPTION_free(sk) OPENSSL_sk_free(ossl_check_ACCESS_DESCRIPTION_sk_type(sk))
0219 #define sk_ACCESS_DESCRIPTION_zero(sk) OPENSSL_sk_zero(ossl_check_ACCESS_DESCRIPTION_sk_type(sk))
0220 #define sk_ACCESS_DESCRIPTION_delete(sk, i) ((ACCESS_DESCRIPTION *)OPENSSL_sk_delete(ossl_check_ACCESS_DESCRIPTION_sk_type(sk), (i)))
0221 #define sk_ACCESS_DESCRIPTION_delete_ptr(sk, ptr) ((ACCESS_DESCRIPTION *)OPENSSL_sk_delete_ptr(ossl_check_ACCESS_DESCRIPTION_sk_type(sk), ossl_check_ACCESS_DESCRIPTION_type(ptr)))
0222 #define sk_ACCESS_DESCRIPTION_push(sk, ptr) OPENSSL_sk_push(ossl_check_ACCESS_DESCRIPTION_sk_type(sk), ossl_check_ACCESS_DESCRIPTION_type(ptr))
0223 #define sk_ACCESS_DESCRIPTION_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ACCESS_DESCRIPTION_sk_type(sk), ossl_check_ACCESS_DESCRIPTION_type(ptr))
0224 #define sk_ACCESS_DESCRIPTION_pop(sk) ((ACCESS_DESCRIPTION *)OPENSSL_sk_pop(ossl_check_ACCESS_DESCRIPTION_sk_type(sk)))
0225 #define sk_ACCESS_DESCRIPTION_shift(sk) ((ACCESS_DESCRIPTION *)OPENSSL_sk_shift(ossl_check_ACCESS_DESCRIPTION_sk_type(sk)))
0226 #define sk_ACCESS_DESCRIPTION_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ACCESS_DESCRIPTION_sk_type(sk),ossl_check_ACCESS_DESCRIPTION_freefunc_type(freefunc))
0227 #define sk_ACCESS_DESCRIPTION_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ACCESS_DESCRIPTION_sk_type(sk), ossl_check_ACCESS_DESCRIPTION_type(ptr), (idx))
0228 #define sk_ACCESS_DESCRIPTION_set(sk, idx, ptr) ((ACCESS_DESCRIPTION *)OPENSSL_sk_set(ossl_check_ACCESS_DESCRIPTION_sk_type(sk), (idx), ossl_check_ACCESS_DESCRIPTION_type(ptr)))
0229 #define sk_ACCESS_DESCRIPTION_find(sk, ptr) OPENSSL_sk_find(ossl_check_ACCESS_DESCRIPTION_sk_type(sk), ossl_check_ACCESS_DESCRIPTION_type(ptr))
0230 #define sk_ACCESS_DESCRIPTION_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ACCESS_DESCRIPTION_sk_type(sk), ossl_check_ACCESS_DESCRIPTION_type(ptr))
0231 #define sk_ACCESS_DESCRIPTION_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ACCESS_DESCRIPTION_sk_type(sk), ossl_check_ACCESS_DESCRIPTION_type(ptr), pnum)
0232 #define sk_ACCESS_DESCRIPTION_sort(sk) OPENSSL_sk_sort(ossl_check_ACCESS_DESCRIPTION_sk_type(sk))
0233 #define sk_ACCESS_DESCRIPTION_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ACCESS_DESCRIPTION_sk_type(sk))
0234 #define sk_ACCESS_DESCRIPTION_dup(sk) ((STACK_OF(ACCESS_DESCRIPTION) *)OPENSSL_sk_dup(ossl_check_const_ACCESS_DESCRIPTION_sk_type(sk)))
0235 #define sk_ACCESS_DESCRIPTION_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ACCESS_DESCRIPTION) *)OPENSSL_sk_deep_copy(ossl_check_const_ACCESS_DESCRIPTION_sk_type(sk), ossl_check_ACCESS_DESCRIPTION_copyfunc_type(copyfunc), ossl_check_ACCESS_DESCRIPTION_freefunc_type(freefunc)))
0236 #define sk_ACCESS_DESCRIPTION_set_cmp_func(sk, cmp) ((sk_ACCESS_DESCRIPTION_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ACCESS_DESCRIPTION_sk_type(sk), ossl_check_ACCESS_DESCRIPTION_compfunc_type(cmp)))
0237 SKM_DEFINE_STACK_OF_INTERNAL(GENERAL_NAME, GENERAL_NAME, GENERAL_NAME)
0238 #define sk_GENERAL_NAME_num(sk) OPENSSL_sk_num(ossl_check_const_GENERAL_NAME_sk_type(sk))
0239 #define sk_GENERAL_NAME_value(sk, idx) ((GENERAL_NAME *)OPENSSL_sk_value(ossl_check_const_GENERAL_NAME_sk_type(sk), (idx)))
0240 #define sk_GENERAL_NAME_new(cmp) ((STACK_OF(GENERAL_NAME) *)OPENSSL_sk_new(ossl_check_GENERAL_NAME_compfunc_type(cmp)))
0241 #define sk_GENERAL_NAME_new_null() ((STACK_OF(GENERAL_NAME) *)OPENSSL_sk_new_null())
0242 #define sk_GENERAL_NAME_new_reserve(cmp, n) ((STACK_OF(GENERAL_NAME) *)OPENSSL_sk_new_reserve(ossl_check_GENERAL_NAME_compfunc_type(cmp), (n)))
0243 #define sk_GENERAL_NAME_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_GENERAL_NAME_sk_type(sk), (n))
0244 #define sk_GENERAL_NAME_free(sk) OPENSSL_sk_free(ossl_check_GENERAL_NAME_sk_type(sk))
0245 #define sk_GENERAL_NAME_zero(sk) OPENSSL_sk_zero(ossl_check_GENERAL_NAME_sk_type(sk))
0246 #define sk_GENERAL_NAME_delete(sk, i) ((GENERAL_NAME *)OPENSSL_sk_delete(ossl_check_GENERAL_NAME_sk_type(sk), (i)))
0247 #define sk_GENERAL_NAME_delete_ptr(sk, ptr) ((GENERAL_NAME *)OPENSSL_sk_delete_ptr(ossl_check_GENERAL_NAME_sk_type(sk), ossl_check_GENERAL_NAME_type(ptr)))
0248 #define sk_GENERAL_NAME_push(sk, ptr) OPENSSL_sk_push(ossl_check_GENERAL_NAME_sk_type(sk), ossl_check_GENERAL_NAME_type(ptr))
0249 #define sk_GENERAL_NAME_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_GENERAL_NAME_sk_type(sk), ossl_check_GENERAL_NAME_type(ptr))
0250 #define sk_GENERAL_NAME_pop(sk) ((GENERAL_NAME *)OPENSSL_sk_pop(ossl_check_GENERAL_NAME_sk_type(sk)))
0251 #define sk_GENERAL_NAME_shift(sk) ((GENERAL_NAME *)OPENSSL_sk_shift(ossl_check_GENERAL_NAME_sk_type(sk)))
0252 #define sk_GENERAL_NAME_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_GENERAL_NAME_sk_type(sk),ossl_check_GENERAL_NAME_freefunc_type(freefunc))
0253 #define sk_GENERAL_NAME_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_GENERAL_NAME_sk_type(sk), ossl_check_GENERAL_NAME_type(ptr), (idx))
0254 #define sk_GENERAL_NAME_set(sk, idx, ptr) ((GENERAL_NAME *)OPENSSL_sk_set(ossl_check_GENERAL_NAME_sk_type(sk), (idx), ossl_check_GENERAL_NAME_type(ptr)))
0255 #define sk_GENERAL_NAME_find(sk, ptr) OPENSSL_sk_find(ossl_check_GENERAL_NAME_sk_type(sk), ossl_check_GENERAL_NAME_type(ptr))
0256 #define sk_GENERAL_NAME_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_GENERAL_NAME_sk_type(sk), ossl_check_GENERAL_NAME_type(ptr))
0257 #define sk_GENERAL_NAME_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_GENERAL_NAME_sk_type(sk), ossl_check_GENERAL_NAME_type(ptr), pnum)
0258 #define sk_GENERAL_NAME_sort(sk) OPENSSL_sk_sort(ossl_check_GENERAL_NAME_sk_type(sk))
0259 #define sk_GENERAL_NAME_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_GENERAL_NAME_sk_type(sk))
0260 #define sk_GENERAL_NAME_dup(sk) ((STACK_OF(GENERAL_NAME) *)OPENSSL_sk_dup(ossl_check_const_GENERAL_NAME_sk_type(sk)))
0261 #define sk_GENERAL_NAME_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(GENERAL_NAME) *)OPENSSL_sk_deep_copy(ossl_check_const_GENERAL_NAME_sk_type(sk), ossl_check_GENERAL_NAME_copyfunc_type(copyfunc), ossl_check_GENERAL_NAME_freefunc_type(freefunc)))
0262 #define sk_GENERAL_NAME_set_cmp_func(sk, cmp) ((sk_GENERAL_NAME_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_GENERAL_NAME_sk_type(sk), ossl_check_GENERAL_NAME_compfunc_type(cmp)))
0263
0264
0265 typedef STACK_OF(ACCESS_DESCRIPTION) AUTHORITY_INFO_ACCESS;
0266 typedef STACK_OF(ASN1_OBJECT) EXTENDED_KEY_USAGE;
0267 typedef STACK_OF(ASN1_INTEGER) TLS_FEATURE;
0268 typedef STACK_OF(GENERAL_NAME) GENERAL_NAMES;
0269
0270 SKM_DEFINE_STACK_OF_INTERNAL(GENERAL_NAMES, GENERAL_NAMES, GENERAL_NAMES)
0271 #define sk_GENERAL_NAMES_num(sk) OPENSSL_sk_num(ossl_check_const_GENERAL_NAMES_sk_type(sk))
0272 #define sk_GENERAL_NAMES_value(sk, idx) ((GENERAL_NAMES *)OPENSSL_sk_value(ossl_check_const_GENERAL_NAMES_sk_type(sk), (idx)))
0273 #define sk_GENERAL_NAMES_new(cmp) ((STACK_OF(GENERAL_NAMES) *)OPENSSL_sk_new(ossl_check_GENERAL_NAMES_compfunc_type(cmp)))
0274 #define sk_GENERAL_NAMES_new_null() ((STACK_OF(GENERAL_NAMES) *)OPENSSL_sk_new_null())
0275 #define sk_GENERAL_NAMES_new_reserve(cmp, n) ((STACK_OF(GENERAL_NAMES) *)OPENSSL_sk_new_reserve(ossl_check_GENERAL_NAMES_compfunc_type(cmp), (n)))
0276 #define sk_GENERAL_NAMES_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_GENERAL_NAMES_sk_type(sk), (n))
0277 #define sk_GENERAL_NAMES_free(sk) OPENSSL_sk_free(ossl_check_GENERAL_NAMES_sk_type(sk))
0278 #define sk_GENERAL_NAMES_zero(sk) OPENSSL_sk_zero(ossl_check_GENERAL_NAMES_sk_type(sk))
0279 #define sk_GENERAL_NAMES_delete(sk, i) ((GENERAL_NAMES *)OPENSSL_sk_delete(ossl_check_GENERAL_NAMES_sk_type(sk), (i)))
0280 #define sk_GENERAL_NAMES_delete_ptr(sk, ptr) ((GENERAL_NAMES *)OPENSSL_sk_delete_ptr(ossl_check_GENERAL_NAMES_sk_type(sk), ossl_check_GENERAL_NAMES_type(ptr)))
0281 #define sk_GENERAL_NAMES_push(sk, ptr) OPENSSL_sk_push(ossl_check_GENERAL_NAMES_sk_type(sk), ossl_check_GENERAL_NAMES_type(ptr))
0282 #define sk_GENERAL_NAMES_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_GENERAL_NAMES_sk_type(sk), ossl_check_GENERAL_NAMES_type(ptr))
0283 #define sk_GENERAL_NAMES_pop(sk) ((GENERAL_NAMES *)OPENSSL_sk_pop(ossl_check_GENERAL_NAMES_sk_type(sk)))
0284 #define sk_GENERAL_NAMES_shift(sk) ((GENERAL_NAMES *)OPENSSL_sk_shift(ossl_check_GENERAL_NAMES_sk_type(sk)))
0285 #define sk_GENERAL_NAMES_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_GENERAL_NAMES_sk_type(sk),ossl_check_GENERAL_NAMES_freefunc_type(freefunc))
0286 #define sk_GENERAL_NAMES_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_GENERAL_NAMES_sk_type(sk), ossl_check_GENERAL_NAMES_type(ptr), (idx))
0287 #define sk_GENERAL_NAMES_set(sk, idx, ptr) ((GENERAL_NAMES *)OPENSSL_sk_set(ossl_check_GENERAL_NAMES_sk_type(sk), (idx), ossl_check_GENERAL_NAMES_type(ptr)))
0288 #define sk_GENERAL_NAMES_find(sk, ptr) OPENSSL_sk_find(ossl_check_GENERAL_NAMES_sk_type(sk), ossl_check_GENERAL_NAMES_type(ptr))
0289 #define sk_GENERAL_NAMES_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_GENERAL_NAMES_sk_type(sk), ossl_check_GENERAL_NAMES_type(ptr))
0290 #define sk_GENERAL_NAMES_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_GENERAL_NAMES_sk_type(sk), ossl_check_GENERAL_NAMES_type(ptr), pnum)
0291 #define sk_GENERAL_NAMES_sort(sk) OPENSSL_sk_sort(ossl_check_GENERAL_NAMES_sk_type(sk))
0292 #define sk_GENERAL_NAMES_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_GENERAL_NAMES_sk_type(sk))
0293 #define sk_GENERAL_NAMES_dup(sk) ((STACK_OF(GENERAL_NAMES) *)OPENSSL_sk_dup(ossl_check_const_GENERAL_NAMES_sk_type(sk)))
0294 #define sk_GENERAL_NAMES_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(GENERAL_NAMES) *)OPENSSL_sk_deep_copy(ossl_check_const_GENERAL_NAMES_sk_type(sk), ossl_check_GENERAL_NAMES_copyfunc_type(copyfunc), ossl_check_GENERAL_NAMES_freefunc_type(freefunc)))
0295 #define sk_GENERAL_NAMES_set_cmp_func(sk, cmp) ((sk_GENERAL_NAMES_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_GENERAL_NAMES_sk_type(sk), ossl_check_GENERAL_NAMES_compfunc_type(cmp)))
0296
0297
0298 typedef struct DIST_POINT_NAME_st {
0299 int type;
0300 union {
0301 GENERAL_NAMES *fullname;
0302 STACK_OF(X509_NAME_ENTRY) *relativename;
0303 } name;
0304
0305 X509_NAME *dpname;
0306 } DIST_POINT_NAME;
0307 DECLARE_ASN1_DUP_FUNCTION(DIST_POINT_NAME)
0308
0309 # define CRLDP_ALL_REASONS 0x807f
0310
0311 # define CRL_REASON_NONE -1
0312 # define CRL_REASON_UNSPECIFIED 0
0313 # define CRL_REASON_KEY_COMPROMISE 1
0314 # define CRL_REASON_CA_COMPROMISE 2
0315 # define CRL_REASON_AFFILIATION_CHANGED 3
0316 # define CRL_REASON_SUPERSEDED 4
0317 # define CRL_REASON_CESSATION_OF_OPERATION 5
0318 # define CRL_REASON_CERTIFICATE_HOLD 6
0319 # define CRL_REASON_REMOVE_FROM_CRL 8
0320 # define CRL_REASON_PRIVILEGE_WITHDRAWN 9
0321 # define CRL_REASON_AA_COMPROMISE 10
0322
0323 struct DIST_POINT_st {
0324 DIST_POINT_NAME *distpoint;
0325 ASN1_BIT_STRING *reasons;
0326 GENERAL_NAMES *CRLissuer;
0327 int dp_reasons;
0328 };
0329
0330 SKM_DEFINE_STACK_OF_INTERNAL(DIST_POINT, DIST_POINT, DIST_POINT)
0331 #define sk_DIST_POINT_num(sk) OPENSSL_sk_num(ossl_check_const_DIST_POINT_sk_type(sk))
0332 #define sk_DIST_POINT_value(sk, idx) ((DIST_POINT *)OPENSSL_sk_value(ossl_check_const_DIST_POINT_sk_type(sk), (idx)))
0333 #define sk_DIST_POINT_new(cmp) ((STACK_OF(DIST_POINT) *)OPENSSL_sk_new(ossl_check_DIST_POINT_compfunc_type(cmp)))
0334 #define sk_DIST_POINT_new_null() ((STACK_OF(DIST_POINT) *)OPENSSL_sk_new_null())
0335 #define sk_DIST_POINT_new_reserve(cmp, n) ((STACK_OF(DIST_POINT) *)OPENSSL_sk_new_reserve(ossl_check_DIST_POINT_compfunc_type(cmp), (n)))
0336 #define sk_DIST_POINT_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_DIST_POINT_sk_type(sk), (n))
0337 #define sk_DIST_POINT_free(sk) OPENSSL_sk_free(ossl_check_DIST_POINT_sk_type(sk))
0338 #define sk_DIST_POINT_zero(sk) OPENSSL_sk_zero(ossl_check_DIST_POINT_sk_type(sk))
0339 #define sk_DIST_POINT_delete(sk, i) ((DIST_POINT *)OPENSSL_sk_delete(ossl_check_DIST_POINT_sk_type(sk), (i)))
0340 #define sk_DIST_POINT_delete_ptr(sk, ptr) ((DIST_POINT *)OPENSSL_sk_delete_ptr(ossl_check_DIST_POINT_sk_type(sk), ossl_check_DIST_POINT_type(ptr)))
0341 #define sk_DIST_POINT_push(sk, ptr) OPENSSL_sk_push(ossl_check_DIST_POINT_sk_type(sk), ossl_check_DIST_POINT_type(ptr))
0342 #define sk_DIST_POINT_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_DIST_POINT_sk_type(sk), ossl_check_DIST_POINT_type(ptr))
0343 #define sk_DIST_POINT_pop(sk) ((DIST_POINT *)OPENSSL_sk_pop(ossl_check_DIST_POINT_sk_type(sk)))
0344 #define sk_DIST_POINT_shift(sk) ((DIST_POINT *)OPENSSL_sk_shift(ossl_check_DIST_POINT_sk_type(sk)))
0345 #define sk_DIST_POINT_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_DIST_POINT_sk_type(sk),ossl_check_DIST_POINT_freefunc_type(freefunc))
0346 #define sk_DIST_POINT_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_DIST_POINT_sk_type(sk), ossl_check_DIST_POINT_type(ptr), (idx))
0347 #define sk_DIST_POINT_set(sk, idx, ptr) ((DIST_POINT *)OPENSSL_sk_set(ossl_check_DIST_POINT_sk_type(sk), (idx), ossl_check_DIST_POINT_type(ptr)))
0348 #define sk_DIST_POINT_find(sk, ptr) OPENSSL_sk_find(ossl_check_DIST_POINT_sk_type(sk), ossl_check_DIST_POINT_type(ptr))
0349 #define sk_DIST_POINT_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_DIST_POINT_sk_type(sk), ossl_check_DIST_POINT_type(ptr))
0350 #define sk_DIST_POINT_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_DIST_POINT_sk_type(sk), ossl_check_DIST_POINT_type(ptr), pnum)
0351 #define sk_DIST_POINT_sort(sk) OPENSSL_sk_sort(ossl_check_DIST_POINT_sk_type(sk))
0352 #define sk_DIST_POINT_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_DIST_POINT_sk_type(sk))
0353 #define sk_DIST_POINT_dup(sk) ((STACK_OF(DIST_POINT) *)OPENSSL_sk_dup(ossl_check_const_DIST_POINT_sk_type(sk)))
0354 #define sk_DIST_POINT_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(DIST_POINT) *)OPENSSL_sk_deep_copy(ossl_check_const_DIST_POINT_sk_type(sk), ossl_check_DIST_POINT_copyfunc_type(copyfunc), ossl_check_DIST_POINT_freefunc_type(freefunc)))
0355 #define sk_DIST_POINT_set_cmp_func(sk, cmp) ((sk_DIST_POINT_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_DIST_POINT_sk_type(sk), ossl_check_DIST_POINT_compfunc_type(cmp)))
0356
0357
0358 typedef STACK_OF(DIST_POINT) CRL_DIST_POINTS;
0359
0360 struct AUTHORITY_KEYID_st {
0361 ASN1_OCTET_STRING *keyid;
0362 GENERAL_NAMES *issuer;
0363 ASN1_INTEGER *serial;
0364 };
0365
0366
0367
0368 typedef struct SXNET_ID_st {
0369 ASN1_INTEGER *zone;
0370 ASN1_OCTET_STRING *user;
0371 } SXNETID;
0372
0373 SKM_DEFINE_STACK_OF_INTERNAL(SXNETID, SXNETID, SXNETID)
0374 #define sk_SXNETID_num(sk) OPENSSL_sk_num(ossl_check_const_SXNETID_sk_type(sk))
0375 #define sk_SXNETID_value(sk, idx) ((SXNETID *)OPENSSL_sk_value(ossl_check_const_SXNETID_sk_type(sk), (idx)))
0376 #define sk_SXNETID_new(cmp) ((STACK_OF(SXNETID) *)OPENSSL_sk_new(ossl_check_SXNETID_compfunc_type(cmp)))
0377 #define sk_SXNETID_new_null() ((STACK_OF(SXNETID) *)OPENSSL_sk_new_null())
0378 #define sk_SXNETID_new_reserve(cmp, n) ((STACK_OF(SXNETID) *)OPENSSL_sk_new_reserve(ossl_check_SXNETID_compfunc_type(cmp), (n)))
0379 #define sk_SXNETID_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_SXNETID_sk_type(sk), (n))
0380 #define sk_SXNETID_free(sk) OPENSSL_sk_free(ossl_check_SXNETID_sk_type(sk))
0381 #define sk_SXNETID_zero(sk) OPENSSL_sk_zero(ossl_check_SXNETID_sk_type(sk))
0382 #define sk_SXNETID_delete(sk, i) ((SXNETID *)OPENSSL_sk_delete(ossl_check_SXNETID_sk_type(sk), (i)))
0383 #define sk_SXNETID_delete_ptr(sk, ptr) ((SXNETID *)OPENSSL_sk_delete_ptr(ossl_check_SXNETID_sk_type(sk), ossl_check_SXNETID_type(ptr)))
0384 #define sk_SXNETID_push(sk, ptr) OPENSSL_sk_push(ossl_check_SXNETID_sk_type(sk), ossl_check_SXNETID_type(ptr))
0385 #define sk_SXNETID_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_SXNETID_sk_type(sk), ossl_check_SXNETID_type(ptr))
0386 #define sk_SXNETID_pop(sk) ((SXNETID *)OPENSSL_sk_pop(ossl_check_SXNETID_sk_type(sk)))
0387 #define sk_SXNETID_shift(sk) ((SXNETID *)OPENSSL_sk_shift(ossl_check_SXNETID_sk_type(sk)))
0388 #define sk_SXNETID_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_SXNETID_sk_type(sk),ossl_check_SXNETID_freefunc_type(freefunc))
0389 #define sk_SXNETID_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_SXNETID_sk_type(sk), ossl_check_SXNETID_type(ptr), (idx))
0390 #define sk_SXNETID_set(sk, idx, ptr) ((SXNETID *)OPENSSL_sk_set(ossl_check_SXNETID_sk_type(sk), (idx), ossl_check_SXNETID_type(ptr)))
0391 #define sk_SXNETID_find(sk, ptr) OPENSSL_sk_find(ossl_check_SXNETID_sk_type(sk), ossl_check_SXNETID_type(ptr))
0392 #define sk_SXNETID_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_SXNETID_sk_type(sk), ossl_check_SXNETID_type(ptr))
0393 #define sk_SXNETID_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_SXNETID_sk_type(sk), ossl_check_SXNETID_type(ptr), pnum)
0394 #define sk_SXNETID_sort(sk) OPENSSL_sk_sort(ossl_check_SXNETID_sk_type(sk))
0395 #define sk_SXNETID_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_SXNETID_sk_type(sk))
0396 #define sk_SXNETID_dup(sk) ((STACK_OF(SXNETID) *)OPENSSL_sk_dup(ossl_check_const_SXNETID_sk_type(sk)))
0397 #define sk_SXNETID_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(SXNETID) *)OPENSSL_sk_deep_copy(ossl_check_const_SXNETID_sk_type(sk), ossl_check_SXNETID_copyfunc_type(copyfunc), ossl_check_SXNETID_freefunc_type(freefunc)))
0398 #define sk_SXNETID_set_cmp_func(sk, cmp) ((sk_SXNETID_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_SXNETID_sk_type(sk), ossl_check_SXNETID_compfunc_type(cmp)))
0399
0400
0401
0402 typedef struct SXNET_st {
0403 ASN1_INTEGER *version;
0404 STACK_OF(SXNETID) *ids;
0405 } SXNET;
0406
0407 typedef struct ISSUER_SIGN_TOOL_st {
0408 ASN1_UTF8STRING *signTool;
0409 ASN1_UTF8STRING *cATool;
0410 ASN1_UTF8STRING *signToolCert;
0411 ASN1_UTF8STRING *cAToolCert;
0412 } ISSUER_SIGN_TOOL;
0413
0414 typedef struct NOTICEREF_st {
0415 ASN1_STRING *organization;
0416 STACK_OF(ASN1_INTEGER) *noticenos;
0417 } NOTICEREF;
0418
0419 typedef struct USERNOTICE_st {
0420 NOTICEREF *noticeref;
0421 ASN1_STRING *exptext;
0422 } USERNOTICE;
0423
0424 typedef struct POLICYQUALINFO_st {
0425 ASN1_OBJECT *pqualid;
0426 union {
0427 ASN1_IA5STRING *cpsuri;
0428 USERNOTICE *usernotice;
0429 ASN1_TYPE *other;
0430 } d;
0431 } POLICYQUALINFO;
0432
0433 SKM_DEFINE_STACK_OF_INTERNAL(POLICYQUALINFO, POLICYQUALINFO, POLICYQUALINFO)
0434 #define sk_POLICYQUALINFO_num(sk) OPENSSL_sk_num(ossl_check_const_POLICYQUALINFO_sk_type(sk))
0435 #define sk_POLICYQUALINFO_value(sk, idx) ((POLICYQUALINFO *)OPENSSL_sk_value(ossl_check_const_POLICYQUALINFO_sk_type(sk), (idx)))
0436 #define sk_POLICYQUALINFO_new(cmp) ((STACK_OF(POLICYQUALINFO) *)OPENSSL_sk_new(ossl_check_POLICYQUALINFO_compfunc_type(cmp)))
0437 #define sk_POLICYQUALINFO_new_null() ((STACK_OF(POLICYQUALINFO) *)OPENSSL_sk_new_null())
0438 #define sk_POLICYQUALINFO_new_reserve(cmp, n) ((STACK_OF(POLICYQUALINFO) *)OPENSSL_sk_new_reserve(ossl_check_POLICYQUALINFO_compfunc_type(cmp), (n)))
0439 #define sk_POLICYQUALINFO_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_POLICYQUALINFO_sk_type(sk), (n))
0440 #define sk_POLICYQUALINFO_free(sk) OPENSSL_sk_free(ossl_check_POLICYQUALINFO_sk_type(sk))
0441 #define sk_POLICYQUALINFO_zero(sk) OPENSSL_sk_zero(ossl_check_POLICYQUALINFO_sk_type(sk))
0442 #define sk_POLICYQUALINFO_delete(sk, i) ((POLICYQUALINFO *)OPENSSL_sk_delete(ossl_check_POLICYQUALINFO_sk_type(sk), (i)))
0443 #define sk_POLICYQUALINFO_delete_ptr(sk, ptr) ((POLICYQUALINFO *)OPENSSL_sk_delete_ptr(ossl_check_POLICYQUALINFO_sk_type(sk), ossl_check_POLICYQUALINFO_type(ptr)))
0444 #define sk_POLICYQUALINFO_push(sk, ptr) OPENSSL_sk_push(ossl_check_POLICYQUALINFO_sk_type(sk), ossl_check_POLICYQUALINFO_type(ptr))
0445 #define sk_POLICYQUALINFO_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_POLICYQUALINFO_sk_type(sk), ossl_check_POLICYQUALINFO_type(ptr))
0446 #define sk_POLICYQUALINFO_pop(sk) ((POLICYQUALINFO *)OPENSSL_sk_pop(ossl_check_POLICYQUALINFO_sk_type(sk)))
0447 #define sk_POLICYQUALINFO_shift(sk) ((POLICYQUALINFO *)OPENSSL_sk_shift(ossl_check_POLICYQUALINFO_sk_type(sk)))
0448 #define sk_POLICYQUALINFO_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_POLICYQUALINFO_sk_type(sk),ossl_check_POLICYQUALINFO_freefunc_type(freefunc))
0449 #define sk_POLICYQUALINFO_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_POLICYQUALINFO_sk_type(sk), ossl_check_POLICYQUALINFO_type(ptr), (idx))
0450 #define sk_POLICYQUALINFO_set(sk, idx, ptr) ((POLICYQUALINFO *)OPENSSL_sk_set(ossl_check_POLICYQUALINFO_sk_type(sk), (idx), ossl_check_POLICYQUALINFO_type(ptr)))
0451 #define sk_POLICYQUALINFO_find(sk, ptr) OPENSSL_sk_find(ossl_check_POLICYQUALINFO_sk_type(sk), ossl_check_POLICYQUALINFO_type(ptr))
0452 #define sk_POLICYQUALINFO_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_POLICYQUALINFO_sk_type(sk), ossl_check_POLICYQUALINFO_type(ptr))
0453 #define sk_POLICYQUALINFO_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_POLICYQUALINFO_sk_type(sk), ossl_check_POLICYQUALINFO_type(ptr), pnum)
0454 #define sk_POLICYQUALINFO_sort(sk) OPENSSL_sk_sort(ossl_check_POLICYQUALINFO_sk_type(sk))
0455 #define sk_POLICYQUALINFO_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_POLICYQUALINFO_sk_type(sk))
0456 #define sk_POLICYQUALINFO_dup(sk) ((STACK_OF(POLICYQUALINFO) *)OPENSSL_sk_dup(ossl_check_const_POLICYQUALINFO_sk_type(sk)))
0457 #define sk_POLICYQUALINFO_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(POLICYQUALINFO) *)OPENSSL_sk_deep_copy(ossl_check_const_POLICYQUALINFO_sk_type(sk), ossl_check_POLICYQUALINFO_copyfunc_type(copyfunc), ossl_check_POLICYQUALINFO_freefunc_type(freefunc)))
0458 #define sk_POLICYQUALINFO_set_cmp_func(sk, cmp) ((sk_POLICYQUALINFO_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_POLICYQUALINFO_sk_type(sk), ossl_check_POLICYQUALINFO_compfunc_type(cmp)))
0459
0460
0461
0462 typedef struct POLICYINFO_st {
0463 ASN1_OBJECT *policyid;
0464 STACK_OF(POLICYQUALINFO) *qualifiers;
0465 } POLICYINFO;
0466
0467 SKM_DEFINE_STACK_OF_INTERNAL(POLICYINFO, POLICYINFO, POLICYINFO)
0468 #define sk_POLICYINFO_num(sk) OPENSSL_sk_num(ossl_check_const_POLICYINFO_sk_type(sk))
0469 #define sk_POLICYINFO_value(sk, idx) ((POLICYINFO *)OPENSSL_sk_value(ossl_check_const_POLICYINFO_sk_type(sk), (idx)))
0470 #define sk_POLICYINFO_new(cmp) ((STACK_OF(POLICYINFO) *)OPENSSL_sk_new(ossl_check_POLICYINFO_compfunc_type(cmp)))
0471 #define sk_POLICYINFO_new_null() ((STACK_OF(POLICYINFO) *)OPENSSL_sk_new_null())
0472 #define sk_POLICYINFO_new_reserve(cmp, n) ((STACK_OF(POLICYINFO) *)OPENSSL_sk_new_reserve(ossl_check_POLICYINFO_compfunc_type(cmp), (n)))
0473 #define sk_POLICYINFO_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_POLICYINFO_sk_type(sk), (n))
0474 #define sk_POLICYINFO_free(sk) OPENSSL_sk_free(ossl_check_POLICYINFO_sk_type(sk))
0475 #define sk_POLICYINFO_zero(sk) OPENSSL_sk_zero(ossl_check_POLICYINFO_sk_type(sk))
0476 #define sk_POLICYINFO_delete(sk, i) ((POLICYINFO *)OPENSSL_sk_delete(ossl_check_POLICYINFO_sk_type(sk), (i)))
0477 #define sk_POLICYINFO_delete_ptr(sk, ptr) ((POLICYINFO *)OPENSSL_sk_delete_ptr(ossl_check_POLICYINFO_sk_type(sk), ossl_check_POLICYINFO_type(ptr)))
0478 #define sk_POLICYINFO_push(sk, ptr) OPENSSL_sk_push(ossl_check_POLICYINFO_sk_type(sk), ossl_check_POLICYINFO_type(ptr))
0479 #define sk_POLICYINFO_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_POLICYINFO_sk_type(sk), ossl_check_POLICYINFO_type(ptr))
0480 #define sk_POLICYINFO_pop(sk) ((POLICYINFO *)OPENSSL_sk_pop(ossl_check_POLICYINFO_sk_type(sk)))
0481 #define sk_POLICYINFO_shift(sk) ((POLICYINFO *)OPENSSL_sk_shift(ossl_check_POLICYINFO_sk_type(sk)))
0482 #define sk_POLICYINFO_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_POLICYINFO_sk_type(sk),ossl_check_POLICYINFO_freefunc_type(freefunc))
0483 #define sk_POLICYINFO_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_POLICYINFO_sk_type(sk), ossl_check_POLICYINFO_type(ptr), (idx))
0484 #define sk_POLICYINFO_set(sk, idx, ptr) ((POLICYINFO *)OPENSSL_sk_set(ossl_check_POLICYINFO_sk_type(sk), (idx), ossl_check_POLICYINFO_type(ptr)))
0485 #define sk_POLICYINFO_find(sk, ptr) OPENSSL_sk_find(ossl_check_POLICYINFO_sk_type(sk), ossl_check_POLICYINFO_type(ptr))
0486 #define sk_POLICYINFO_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_POLICYINFO_sk_type(sk), ossl_check_POLICYINFO_type(ptr))
0487 #define sk_POLICYINFO_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_POLICYINFO_sk_type(sk), ossl_check_POLICYINFO_type(ptr), pnum)
0488 #define sk_POLICYINFO_sort(sk) OPENSSL_sk_sort(ossl_check_POLICYINFO_sk_type(sk))
0489 #define sk_POLICYINFO_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_POLICYINFO_sk_type(sk))
0490 #define sk_POLICYINFO_dup(sk) ((STACK_OF(POLICYINFO) *)OPENSSL_sk_dup(ossl_check_const_POLICYINFO_sk_type(sk)))
0491 #define sk_POLICYINFO_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(POLICYINFO) *)OPENSSL_sk_deep_copy(ossl_check_const_POLICYINFO_sk_type(sk), ossl_check_POLICYINFO_copyfunc_type(copyfunc), ossl_check_POLICYINFO_freefunc_type(freefunc)))
0492 #define sk_POLICYINFO_set_cmp_func(sk, cmp) ((sk_POLICYINFO_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_POLICYINFO_sk_type(sk), ossl_check_POLICYINFO_compfunc_type(cmp)))
0493
0494
0495 typedef STACK_OF(POLICYINFO) CERTIFICATEPOLICIES;
0496
0497 typedef struct POLICY_MAPPING_st {
0498 ASN1_OBJECT *issuerDomainPolicy;
0499 ASN1_OBJECT *subjectDomainPolicy;
0500 } POLICY_MAPPING;
0501
0502 SKM_DEFINE_STACK_OF_INTERNAL(POLICY_MAPPING, POLICY_MAPPING, POLICY_MAPPING)
0503 #define sk_POLICY_MAPPING_num(sk) OPENSSL_sk_num(ossl_check_const_POLICY_MAPPING_sk_type(sk))
0504 #define sk_POLICY_MAPPING_value(sk, idx) ((POLICY_MAPPING *)OPENSSL_sk_value(ossl_check_const_POLICY_MAPPING_sk_type(sk), (idx)))
0505 #define sk_POLICY_MAPPING_new(cmp) ((STACK_OF(POLICY_MAPPING) *)OPENSSL_sk_new(ossl_check_POLICY_MAPPING_compfunc_type(cmp)))
0506 #define sk_POLICY_MAPPING_new_null() ((STACK_OF(POLICY_MAPPING) *)OPENSSL_sk_new_null())
0507 #define sk_POLICY_MAPPING_new_reserve(cmp, n) ((STACK_OF(POLICY_MAPPING) *)OPENSSL_sk_new_reserve(ossl_check_POLICY_MAPPING_compfunc_type(cmp), (n)))
0508 #define sk_POLICY_MAPPING_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_POLICY_MAPPING_sk_type(sk), (n))
0509 #define sk_POLICY_MAPPING_free(sk) OPENSSL_sk_free(ossl_check_POLICY_MAPPING_sk_type(sk))
0510 #define sk_POLICY_MAPPING_zero(sk) OPENSSL_sk_zero(ossl_check_POLICY_MAPPING_sk_type(sk))
0511 #define sk_POLICY_MAPPING_delete(sk, i) ((POLICY_MAPPING *)OPENSSL_sk_delete(ossl_check_POLICY_MAPPING_sk_type(sk), (i)))
0512 #define sk_POLICY_MAPPING_delete_ptr(sk, ptr) ((POLICY_MAPPING *)OPENSSL_sk_delete_ptr(ossl_check_POLICY_MAPPING_sk_type(sk), ossl_check_POLICY_MAPPING_type(ptr)))
0513 #define sk_POLICY_MAPPING_push(sk, ptr) OPENSSL_sk_push(ossl_check_POLICY_MAPPING_sk_type(sk), ossl_check_POLICY_MAPPING_type(ptr))
0514 #define sk_POLICY_MAPPING_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_POLICY_MAPPING_sk_type(sk), ossl_check_POLICY_MAPPING_type(ptr))
0515 #define sk_POLICY_MAPPING_pop(sk) ((POLICY_MAPPING *)OPENSSL_sk_pop(ossl_check_POLICY_MAPPING_sk_type(sk)))
0516 #define sk_POLICY_MAPPING_shift(sk) ((POLICY_MAPPING *)OPENSSL_sk_shift(ossl_check_POLICY_MAPPING_sk_type(sk)))
0517 #define sk_POLICY_MAPPING_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_POLICY_MAPPING_sk_type(sk),ossl_check_POLICY_MAPPING_freefunc_type(freefunc))
0518 #define sk_POLICY_MAPPING_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_POLICY_MAPPING_sk_type(sk), ossl_check_POLICY_MAPPING_type(ptr), (idx))
0519 #define sk_POLICY_MAPPING_set(sk, idx, ptr) ((POLICY_MAPPING *)OPENSSL_sk_set(ossl_check_POLICY_MAPPING_sk_type(sk), (idx), ossl_check_POLICY_MAPPING_type(ptr)))
0520 #define sk_POLICY_MAPPING_find(sk, ptr) OPENSSL_sk_find(ossl_check_POLICY_MAPPING_sk_type(sk), ossl_check_POLICY_MAPPING_type(ptr))
0521 #define sk_POLICY_MAPPING_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_POLICY_MAPPING_sk_type(sk), ossl_check_POLICY_MAPPING_type(ptr))
0522 #define sk_POLICY_MAPPING_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_POLICY_MAPPING_sk_type(sk), ossl_check_POLICY_MAPPING_type(ptr), pnum)
0523 #define sk_POLICY_MAPPING_sort(sk) OPENSSL_sk_sort(ossl_check_POLICY_MAPPING_sk_type(sk))
0524 #define sk_POLICY_MAPPING_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_POLICY_MAPPING_sk_type(sk))
0525 #define sk_POLICY_MAPPING_dup(sk) ((STACK_OF(POLICY_MAPPING) *)OPENSSL_sk_dup(ossl_check_const_POLICY_MAPPING_sk_type(sk)))
0526 #define sk_POLICY_MAPPING_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(POLICY_MAPPING) *)OPENSSL_sk_deep_copy(ossl_check_const_POLICY_MAPPING_sk_type(sk), ossl_check_POLICY_MAPPING_copyfunc_type(copyfunc), ossl_check_POLICY_MAPPING_freefunc_type(freefunc)))
0527 #define sk_POLICY_MAPPING_set_cmp_func(sk, cmp) ((sk_POLICY_MAPPING_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_POLICY_MAPPING_sk_type(sk), ossl_check_POLICY_MAPPING_compfunc_type(cmp)))
0528
0529
0530 typedef STACK_OF(POLICY_MAPPING) POLICY_MAPPINGS;
0531
0532 typedef struct GENERAL_SUBTREE_st {
0533 GENERAL_NAME *base;
0534 ASN1_INTEGER *minimum;
0535 ASN1_INTEGER *maximum;
0536 } GENERAL_SUBTREE;
0537
0538 SKM_DEFINE_STACK_OF_INTERNAL(GENERAL_SUBTREE, GENERAL_SUBTREE, GENERAL_SUBTREE)
0539 #define sk_GENERAL_SUBTREE_num(sk) OPENSSL_sk_num(ossl_check_const_GENERAL_SUBTREE_sk_type(sk))
0540 #define sk_GENERAL_SUBTREE_value(sk, idx) ((GENERAL_SUBTREE *)OPENSSL_sk_value(ossl_check_const_GENERAL_SUBTREE_sk_type(sk), (idx)))
0541 #define sk_GENERAL_SUBTREE_new(cmp) ((STACK_OF(GENERAL_SUBTREE) *)OPENSSL_sk_new(ossl_check_GENERAL_SUBTREE_compfunc_type(cmp)))
0542 #define sk_GENERAL_SUBTREE_new_null() ((STACK_OF(GENERAL_SUBTREE) *)OPENSSL_sk_new_null())
0543 #define sk_GENERAL_SUBTREE_new_reserve(cmp, n) ((STACK_OF(GENERAL_SUBTREE) *)OPENSSL_sk_new_reserve(ossl_check_GENERAL_SUBTREE_compfunc_type(cmp), (n)))
0544 #define sk_GENERAL_SUBTREE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_GENERAL_SUBTREE_sk_type(sk), (n))
0545 #define sk_GENERAL_SUBTREE_free(sk) OPENSSL_sk_free(ossl_check_GENERAL_SUBTREE_sk_type(sk))
0546 #define sk_GENERAL_SUBTREE_zero(sk) OPENSSL_sk_zero(ossl_check_GENERAL_SUBTREE_sk_type(sk))
0547 #define sk_GENERAL_SUBTREE_delete(sk, i) ((GENERAL_SUBTREE *)OPENSSL_sk_delete(ossl_check_GENERAL_SUBTREE_sk_type(sk), (i)))
0548 #define sk_GENERAL_SUBTREE_delete_ptr(sk, ptr) ((GENERAL_SUBTREE *)OPENSSL_sk_delete_ptr(ossl_check_GENERAL_SUBTREE_sk_type(sk), ossl_check_GENERAL_SUBTREE_type(ptr)))
0549 #define sk_GENERAL_SUBTREE_push(sk, ptr) OPENSSL_sk_push(ossl_check_GENERAL_SUBTREE_sk_type(sk), ossl_check_GENERAL_SUBTREE_type(ptr))
0550 #define sk_GENERAL_SUBTREE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_GENERAL_SUBTREE_sk_type(sk), ossl_check_GENERAL_SUBTREE_type(ptr))
0551 #define sk_GENERAL_SUBTREE_pop(sk) ((GENERAL_SUBTREE *)OPENSSL_sk_pop(ossl_check_GENERAL_SUBTREE_sk_type(sk)))
0552 #define sk_GENERAL_SUBTREE_shift(sk) ((GENERAL_SUBTREE *)OPENSSL_sk_shift(ossl_check_GENERAL_SUBTREE_sk_type(sk)))
0553 #define sk_GENERAL_SUBTREE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_GENERAL_SUBTREE_sk_type(sk),ossl_check_GENERAL_SUBTREE_freefunc_type(freefunc))
0554 #define sk_GENERAL_SUBTREE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_GENERAL_SUBTREE_sk_type(sk), ossl_check_GENERAL_SUBTREE_type(ptr), (idx))
0555 #define sk_GENERAL_SUBTREE_set(sk, idx, ptr) ((GENERAL_SUBTREE *)OPENSSL_sk_set(ossl_check_GENERAL_SUBTREE_sk_type(sk), (idx), ossl_check_GENERAL_SUBTREE_type(ptr)))
0556 #define sk_GENERAL_SUBTREE_find(sk, ptr) OPENSSL_sk_find(ossl_check_GENERAL_SUBTREE_sk_type(sk), ossl_check_GENERAL_SUBTREE_type(ptr))
0557 #define sk_GENERAL_SUBTREE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_GENERAL_SUBTREE_sk_type(sk), ossl_check_GENERAL_SUBTREE_type(ptr))
0558 #define sk_GENERAL_SUBTREE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_GENERAL_SUBTREE_sk_type(sk), ossl_check_GENERAL_SUBTREE_type(ptr), pnum)
0559 #define sk_GENERAL_SUBTREE_sort(sk) OPENSSL_sk_sort(ossl_check_GENERAL_SUBTREE_sk_type(sk))
0560 #define sk_GENERAL_SUBTREE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_GENERAL_SUBTREE_sk_type(sk))
0561 #define sk_GENERAL_SUBTREE_dup(sk) ((STACK_OF(GENERAL_SUBTREE) *)OPENSSL_sk_dup(ossl_check_const_GENERAL_SUBTREE_sk_type(sk)))
0562 #define sk_GENERAL_SUBTREE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(GENERAL_SUBTREE) *)OPENSSL_sk_deep_copy(ossl_check_const_GENERAL_SUBTREE_sk_type(sk), ossl_check_GENERAL_SUBTREE_copyfunc_type(copyfunc), ossl_check_GENERAL_SUBTREE_freefunc_type(freefunc)))
0563 #define sk_GENERAL_SUBTREE_set_cmp_func(sk, cmp) ((sk_GENERAL_SUBTREE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_GENERAL_SUBTREE_sk_type(sk), ossl_check_GENERAL_SUBTREE_compfunc_type(cmp)))
0564
0565
0566 struct NAME_CONSTRAINTS_st {
0567 STACK_OF(GENERAL_SUBTREE) *permittedSubtrees;
0568 STACK_OF(GENERAL_SUBTREE) *excludedSubtrees;
0569 };
0570
0571 typedef struct POLICY_CONSTRAINTS_st {
0572 ASN1_INTEGER *requireExplicitPolicy;
0573 ASN1_INTEGER *inhibitPolicyMapping;
0574 } POLICY_CONSTRAINTS;
0575
0576
0577 typedef struct PROXY_POLICY_st {
0578 ASN1_OBJECT *policyLanguage;
0579 ASN1_OCTET_STRING *policy;
0580 } PROXY_POLICY;
0581
0582 typedef struct PROXY_CERT_INFO_EXTENSION_st {
0583 ASN1_INTEGER *pcPathLengthConstraint;
0584 PROXY_POLICY *proxyPolicy;
0585 } PROXY_CERT_INFO_EXTENSION;
0586
0587 DECLARE_ASN1_FUNCTIONS(PROXY_POLICY)
0588 DECLARE_ASN1_FUNCTIONS(PROXY_CERT_INFO_EXTENSION)
0589
0590 struct ISSUING_DIST_POINT_st {
0591 DIST_POINT_NAME *distpoint;
0592 int onlyuser;
0593 int onlyCA;
0594 ASN1_BIT_STRING *onlysomereasons;
0595 int indirectCRL;
0596 int onlyattr;
0597 };
0598
0599
0600
0601 # define IDP_PRESENT 0x1
0602
0603 # define IDP_INVALID 0x2
0604
0605 # define IDP_ONLYUSER 0x4
0606
0607 # define IDP_ONLYCA 0x8
0608
0609 # define IDP_ONLYATTR 0x10
0610
0611 # define IDP_INDIRECT 0x20
0612
0613 # define IDP_REASONS 0x40
0614
0615 # define X509V3_conf_err(val) ERR_add_error_data(6, \
0616 "section:", (val)->section, \
0617 ",name:", (val)->name, ",value:", (val)->value)
0618
0619 # define X509V3_set_ctx_test(ctx) \
0620 X509V3_set_ctx(ctx, NULL, NULL, NULL, NULL, X509V3_CTX_TEST)
0621 # define X509V3_set_ctx_nodb(ctx) (ctx)->db = NULL;
0622
0623 # define EXT_BITSTRING(nid, table) { nid, 0, ASN1_ITEM_ref(ASN1_BIT_STRING), \
0624 0,0,0,0, \
0625 0,0, \
0626 (X509V3_EXT_I2V)i2v_ASN1_BIT_STRING, \
0627 (X509V3_EXT_V2I)v2i_ASN1_BIT_STRING, \
0628 NULL, NULL, \
0629 table}
0630
0631 # define EXT_IA5STRING(nid) { nid, 0, ASN1_ITEM_ref(ASN1_IA5STRING), \
0632 0,0,0,0, \
0633 (X509V3_EXT_I2S)i2s_ASN1_IA5STRING, \
0634 (X509V3_EXT_S2I)s2i_ASN1_IA5STRING, \
0635 0,0,0,0, \
0636 NULL}
0637
0638 #define EXT_UTF8STRING(nid) { nid, 0, ASN1_ITEM_ref(ASN1_UTF8STRING), \
0639 0,0,0,0, \
0640 (X509V3_EXT_I2S)i2s_ASN1_UTF8STRING, \
0641 (X509V3_EXT_S2I)s2i_ASN1_UTF8STRING, \
0642 0,0,0,0, \
0643 NULL}
0644
0645 # define EXT_END { -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
0646
0647
0648
0649 # define EXFLAG_BCONS 0x1
0650 # define EXFLAG_KUSAGE 0x2
0651 # define EXFLAG_XKUSAGE 0x4
0652 # define EXFLAG_NSCERT 0x8
0653
0654 # define EXFLAG_CA 0x10
0655 # define EXFLAG_SI 0x20
0656 # define EXFLAG_V1 0x40
0657 # define EXFLAG_INVALID 0x80
0658
0659 # define EXFLAG_SET 0x100
0660 # define EXFLAG_CRITICAL 0x200
0661 # define EXFLAG_PROXY 0x400
0662
0663 # define EXFLAG_INVALID_POLICY 0x800
0664 # define EXFLAG_FRESHEST 0x1000
0665 # define EXFLAG_SS 0x2000
0666
0667 # define EXFLAG_BCONS_CRITICAL 0x10000
0668 # define EXFLAG_AKID_CRITICAL 0x20000
0669 # define EXFLAG_SKID_CRITICAL 0x40000
0670 # define EXFLAG_SAN_CRITICAL 0x80000
0671 # define EXFLAG_NO_FINGERPRINT 0x100000
0672
0673
0674 # define KU_DIGITAL_SIGNATURE X509v3_KU_DIGITAL_SIGNATURE
0675 # define KU_NON_REPUDIATION X509v3_KU_NON_REPUDIATION
0676 # define KU_KEY_ENCIPHERMENT X509v3_KU_KEY_ENCIPHERMENT
0677 # define KU_DATA_ENCIPHERMENT X509v3_KU_DATA_ENCIPHERMENT
0678 # define KU_KEY_AGREEMENT X509v3_KU_KEY_AGREEMENT
0679 # define KU_KEY_CERT_SIGN X509v3_KU_KEY_CERT_SIGN
0680 # define KU_CRL_SIGN X509v3_KU_CRL_SIGN
0681 # define KU_ENCIPHER_ONLY X509v3_KU_ENCIPHER_ONLY
0682 # define KU_DECIPHER_ONLY X509v3_KU_DECIPHER_ONLY
0683
0684 # define NS_SSL_CLIENT 0x80
0685 # define NS_SSL_SERVER 0x40
0686 # define NS_SMIME 0x20
0687 # define NS_OBJSIGN 0x10
0688 # define NS_SSL_CA 0x04
0689 # define NS_SMIME_CA 0x02
0690 # define NS_OBJSIGN_CA 0x01
0691 # define NS_ANY_CA (NS_SSL_CA|NS_SMIME_CA|NS_OBJSIGN_CA)
0692
0693 # define XKU_SSL_SERVER 0x1
0694 # define XKU_SSL_CLIENT 0x2
0695 # define XKU_SMIME 0x4
0696 # define XKU_CODE_SIGN 0x8
0697 # define XKU_SGC 0x10
0698 # define XKU_OCSP_SIGN 0x20
0699 # define XKU_TIMESTAMP 0x40
0700 # define XKU_DVCS 0x80
0701 # define XKU_ANYEKU 0x100
0702
0703 # define X509_PURPOSE_DYNAMIC 0x1
0704 # define X509_PURPOSE_DYNAMIC_NAME 0x2
0705
0706 typedef struct x509_purpose_st {
0707 int purpose;
0708 int trust;
0709 int flags;
0710 int (*check_purpose) (const struct x509_purpose_st *, const X509 *, int);
0711 char *name;
0712 char *sname;
0713 void *usr_data;
0714 } X509_PURPOSE;
0715
0716 SKM_DEFINE_STACK_OF_INTERNAL(X509_PURPOSE, X509_PURPOSE, X509_PURPOSE)
0717 #define sk_X509_PURPOSE_num(sk) OPENSSL_sk_num(ossl_check_const_X509_PURPOSE_sk_type(sk))
0718 #define sk_X509_PURPOSE_value(sk, idx) ((X509_PURPOSE *)OPENSSL_sk_value(ossl_check_const_X509_PURPOSE_sk_type(sk), (idx)))
0719 #define sk_X509_PURPOSE_new(cmp) ((STACK_OF(X509_PURPOSE) *)OPENSSL_sk_new(ossl_check_X509_PURPOSE_compfunc_type(cmp)))
0720 #define sk_X509_PURPOSE_new_null() ((STACK_OF(X509_PURPOSE) *)OPENSSL_sk_new_null())
0721 #define sk_X509_PURPOSE_new_reserve(cmp, n) ((STACK_OF(X509_PURPOSE) *)OPENSSL_sk_new_reserve(ossl_check_X509_PURPOSE_compfunc_type(cmp), (n)))
0722 #define sk_X509_PURPOSE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_X509_PURPOSE_sk_type(sk), (n))
0723 #define sk_X509_PURPOSE_free(sk) OPENSSL_sk_free(ossl_check_X509_PURPOSE_sk_type(sk))
0724 #define sk_X509_PURPOSE_zero(sk) OPENSSL_sk_zero(ossl_check_X509_PURPOSE_sk_type(sk))
0725 #define sk_X509_PURPOSE_delete(sk, i) ((X509_PURPOSE *)OPENSSL_sk_delete(ossl_check_X509_PURPOSE_sk_type(sk), (i)))
0726 #define sk_X509_PURPOSE_delete_ptr(sk, ptr) ((X509_PURPOSE *)OPENSSL_sk_delete_ptr(ossl_check_X509_PURPOSE_sk_type(sk), ossl_check_X509_PURPOSE_type(ptr)))
0727 #define sk_X509_PURPOSE_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_PURPOSE_sk_type(sk), ossl_check_X509_PURPOSE_type(ptr))
0728 #define sk_X509_PURPOSE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_X509_PURPOSE_sk_type(sk), ossl_check_X509_PURPOSE_type(ptr))
0729 #define sk_X509_PURPOSE_pop(sk) ((X509_PURPOSE *)OPENSSL_sk_pop(ossl_check_X509_PURPOSE_sk_type(sk)))
0730 #define sk_X509_PURPOSE_shift(sk) ((X509_PURPOSE *)OPENSSL_sk_shift(ossl_check_X509_PURPOSE_sk_type(sk)))
0731 #define sk_X509_PURPOSE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_PURPOSE_sk_type(sk),ossl_check_X509_PURPOSE_freefunc_type(freefunc))
0732 #define sk_X509_PURPOSE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_X509_PURPOSE_sk_type(sk), ossl_check_X509_PURPOSE_type(ptr), (idx))
0733 #define sk_X509_PURPOSE_set(sk, idx, ptr) ((X509_PURPOSE *)OPENSSL_sk_set(ossl_check_X509_PURPOSE_sk_type(sk), (idx), ossl_check_X509_PURPOSE_type(ptr)))
0734 #define sk_X509_PURPOSE_find(sk, ptr) OPENSSL_sk_find(ossl_check_X509_PURPOSE_sk_type(sk), ossl_check_X509_PURPOSE_type(ptr))
0735 #define sk_X509_PURPOSE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_X509_PURPOSE_sk_type(sk), ossl_check_X509_PURPOSE_type(ptr))
0736 #define sk_X509_PURPOSE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_X509_PURPOSE_sk_type(sk), ossl_check_X509_PURPOSE_type(ptr), pnum)
0737 #define sk_X509_PURPOSE_sort(sk) OPENSSL_sk_sort(ossl_check_X509_PURPOSE_sk_type(sk))
0738 #define sk_X509_PURPOSE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_X509_PURPOSE_sk_type(sk))
0739 #define sk_X509_PURPOSE_dup(sk) ((STACK_OF(X509_PURPOSE) *)OPENSSL_sk_dup(ossl_check_const_X509_PURPOSE_sk_type(sk)))
0740 #define sk_X509_PURPOSE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(X509_PURPOSE) *)OPENSSL_sk_deep_copy(ossl_check_const_X509_PURPOSE_sk_type(sk), ossl_check_X509_PURPOSE_copyfunc_type(copyfunc), ossl_check_X509_PURPOSE_freefunc_type(freefunc)))
0741 #define sk_X509_PURPOSE_set_cmp_func(sk, cmp) ((sk_X509_PURPOSE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_X509_PURPOSE_sk_type(sk), ossl_check_X509_PURPOSE_compfunc_type(cmp)))
0742
0743
0744
0745 # define X509_PURPOSE_SSL_CLIENT 1
0746 # define X509_PURPOSE_SSL_SERVER 2
0747 # define X509_PURPOSE_NS_SSL_SERVER 3
0748 # define X509_PURPOSE_SMIME_SIGN 4
0749 # define X509_PURPOSE_SMIME_ENCRYPT 5
0750 # define X509_PURPOSE_CRL_SIGN 6
0751 # define X509_PURPOSE_ANY 7
0752 # define X509_PURPOSE_OCSP_HELPER 8
0753 # define X509_PURPOSE_TIMESTAMP_SIGN 9
0754 # define X509_PURPOSE_CODE_SIGN 10
0755
0756 # define X509_PURPOSE_MIN 1
0757 # define X509_PURPOSE_MAX 10
0758
0759
0760
0761 # define X509V3_EXT_UNKNOWN_MASK (0xfL << 16)
0762
0763 # define X509V3_EXT_DEFAULT 0
0764
0765 # define X509V3_EXT_ERROR_UNKNOWN (1L << 16)
0766
0767 # define X509V3_EXT_PARSE_UNKNOWN (2L << 16)
0768
0769 # define X509V3_EXT_DUMP_UNKNOWN (3L << 16)
0770
0771
0772
0773 # define X509V3_ADD_OP_MASK 0xfL
0774 # define X509V3_ADD_DEFAULT 0L
0775 # define X509V3_ADD_APPEND 1L
0776 # define X509V3_ADD_REPLACE 2L
0777 # define X509V3_ADD_REPLACE_EXISTING 3L
0778 # define X509V3_ADD_KEEP_EXISTING 4L
0779 # define X509V3_ADD_DELETE 5L
0780 # define X509V3_ADD_SILENT 0x10
0781
0782 DECLARE_ASN1_FUNCTIONS(BASIC_CONSTRAINTS)
0783 DECLARE_ASN1_FUNCTIONS(OSSL_BASIC_ATTR_CONSTRAINTS)
0784
0785 DECLARE_ASN1_FUNCTIONS(SXNET)
0786 DECLARE_ASN1_FUNCTIONS(SXNETID)
0787
0788 DECLARE_ASN1_FUNCTIONS(ISSUER_SIGN_TOOL)
0789
0790 int SXNET_add_id_asc(SXNET **psx, const char *zone, const char *user, int userlen);
0791 int SXNET_add_id_ulong(SXNET **psx, unsigned long lzone, const char *user,
0792 int userlen);
0793 int SXNET_add_id_INTEGER(SXNET **psx, ASN1_INTEGER *izone, const char *user,
0794 int userlen);
0795
0796 ASN1_OCTET_STRING *SXNET_get_id_asc(SXNET *sx, const char *zone);
0797 ASN1_OCTET_STRING *SXNET_get_id_ulong(SXNET *sx, unsigned long lzone);
0798 ASN1_OCTET_STRING *SXNET_get_id_INTEGER(SXNET *sx, ASN1_INTEGER *zone);
0799
0800 DECLARE_ASN1_FUNCTIONS(AUTHORITY_KEYID)
0801
0802 DECLARE_ASN1_FUNCTIONS(PKEY_USAGE_PERIOD)
0803
0804 DECLARE_ASN1_FUNCTIONS(GENERAL_NAME)
0805 DECLARE_ASN1_DUP_FUNCTION(GENERAL_NAME)
0806 int GENERAL_NAME_cmp(GENERAL_NAME *a, GENERAL_NAME *b);
0807
0808 ASN1_BIT_STRING *v2i_ASN1_BIT_STRING(X509V3_EXT_METHOD *method,
0809 X509V3_CTX *ctx,
0810 STACK_OF(CONF_VALUE) *nval);
0811 STACK_OF(CONF_VALUE) *i2v_ASN1_BIT_STRING(X509V3_EXT_METHOD *method,
0812 ASN1_BIT_STRING *bits,
0813 STACK_OF(CONF_VALUE) *extlist);
0814 char *i2s_ASN1_IA5STRING(X509V3_EXT_METHOD *method, ASN1_IA5STRING *ia5);
0815 ASN1_IA5STRING *s2i_ASN1_IA5STRING(X509V3_EXT_METHOD *method,
0816 X509V3_CTX *ctx, const char *str);
0817 char *i2s_ASN1_UTF8STRING(X509V3_EXT_METHOD *method, ASN1_UTF8STRING *utf8);
0818 ASN1_UTF8STRING *s2i_ASN1_UTF8STRING(X509V3_EXT_METHOD *method,
0819 X509V3_CTX *ctx, const char *str);
0820
0821 STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method,
0822 GENERAL_NAME *gen,
0823 STACK_OF(CONF_VALUE) *ret);
0824 int GENERAL_NAME_print(BIO *out, GENERAL_NAME *gen);
0825
0826 DECLARE_ASN1_FUNCTIONS(GENERAL_NAMES)
0827
0828 STACK_OF(CONF_VALUE) *i2v_GENERAL_NAMES(X509V3_EXT_METHOD *method,
0829 GENERAL_NAMES *gen,
0830 STACK_OF(CONF_VALUE) *extlist);
0831 GENERAL_NAMES *v2i_GENERAL_NAMES(const X509V3_EXT_METHOD *method,
0832 X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval);
0833
0834 DECLARE_ASN1_FUNCTIONS(OTHERNAME)
0835 DECLARE_ASN1_FUNCTIONS(EDIPARTYNAME)
0836 int OTHERNAME_cmp(OTHERNAME *a, OTHERNAME *b);
0837 void GENERAL_NAME_set0_value(GENERAL_NAME *a, int type, void *value);
0838 void *GENERAL_NAME_get0_value(const GENERAL_NAME *a, int *ptype);
0839 int GENERAL_NAME_set0_othername(GENERAL_NAME *gen,
0840 ASN1_OBJECT *oid, ASN1_TYPE *value);
0841 int GENERAL_NAME_get0_otherName(const GENERAL_NAME *gen,
0842 ASN1_OBJECT **poid, ASN1_TYPE **pvalue);
0843
0844 char *i2s_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method,
0845 const ASN1_OCTET_STRING *ia5);
0846 ASN1_OCTET_STRING *s2i_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method,
0847 X509V3_CTX *ctx, const char *str);
0848
0849 DECLARE_ASN1_FUNCTIONS(EXTENDED_KEY_USAGE)
0850 int i2a_ACCESS_DESCRIPTION(BIO *bp, const ACCESS_DESCRIPTION *a);
0851
0852 DECLARE_ASN1_ALLOC_FUNCTIONS(TLS_FEATURE)
0853
0854 DECLARE_ASN1_FUNCTIONS(CERTIFICATEPOLICIES)
0855 DECLARE_ASN1_FUNCTIONS(POLICYINFO)
0856 DECLARE_ASN1_FUNCTIONS(POLICYQUALINFO)
0857 DECLARE_ASN1_FUNCTIONS(USERNOTICE)
0858 DECLARE_ASN1_FUNCTIONS(NOTICEREF)
0859
0860 DECLARE_ASN1_FUNCTIONS(CRL_DIST_POINTS)
0861 DECLARE_ASN1_FUNCTIONS(DIST_POINT)
0862 DECLARE_ASN1_FUNCTIONS(DIST_POINT_NAME)
0863 DECLARE_ASN1_FUNCTIONS(ISSUING_DIST_POINT)
0864
0865 int DIST_POINT_set_dpname(DIST_POINT_NAME *dpn, const X509_NAME *iname);
0866
0867 int NAME_CONSTRAINTS_check(X509 *x, NAME_CONSTRAINTS *nc);
0868 int NAME_CONSTRAINTS_check_CN(X509 *x, NAME_CONSTRAINTS *nc);
0869
0870 DECLARE_ASN1_FUNCTIONS(ACCESS_DESCRIPTION)
0871 DECLARE_ASN1_FUNCTIONS(AUTHORITY_INFO_ACCESS)
0872
0873 DECLARE_ASN1_ITEM(POLICY_MAPPING)
0874 DECLARE_ASN1_ALLOC_FUNCTIONS(POLICY_MAPPING)
0875 DECLARE_ASN1_ITEM(POLICY_MAPPINGS)
0876
0877 DECLARE_ASN1_ITEM(GENERAL_SUBTREE)
0878 DECLARE_ASN1_ALLOC_FUNCTIONS(GENERAL_SUBTREE)
0879
0880 DECLARE_ASN1_ITEM(NAME_CONSTRAINTS)
0881 DECLARE_ASN1_ALLOC_FUNCTIONS(NAME_CONSTRAINTS)
0882
0883 DECLARE_ASN1_ALLOC_FUNCTIONS(POLICY_CONSTRAINTS)
0884 DECLARE_ASN1_ITEM(POLICY_CONSTRAINTS)
0885
0886 GENERAL_NAME *a2i_GENERAL_NAME(GENERAL_NAME *out,
0887 const X509V3_EXT_METHOD *method,
0888 X509V3_CTX *ctx, int gen_type,
0889 const char *value, int is_nc);
0890
0891 # ifdef OPENSSL_CONF_H
0892 GENERAL_NAME *v2i_GENERAL_NAME(const X509V3_EXT_METHOD *method,
0893 X509V3_CTX *ctx, CONF_VALUE *cnf);
0894 GENERAL_NAME *v2i_GENERAL_NAME_ex(GENERAL_NAME *out,
0895 const X509V3_EXT_METHOD *method,
0896 X509V3_CTX *ctx, CONF_VALUE *cnf,
0897 int is_nc);
0898
0899 void X509V3_conf_free(CONF_VALUE *val);
0900
0901 X509_EXTENSION *X509V3_EXT_nconf_nid(CONF *conf, X509V3_CTX *ctx, int ext_nid,
0902 const char *value);
0903 X509_EXTENSION *X509V3_EXT_nconf(CONF *conf, X509V3_CTX *ctx, const char *name,
0904 const char *value);
0905 int X509V3_EXT_add_nconf_sk(CONF *conf, X509V3_CTX *ctx, const char *section,
0906 STACK_OF(X509_EXTENSION) **sk);
0907 int X509V3_EXT_add_nconf(CONF *conf, X509V3_CTX *ctx, const char *section,
0908 X509 *cert);
0909 int X509V3_EXT_REQ_add_nconf(CONF *conf, X509V3_CTX *ctx, const char *section,
0910 X509_REQ *req);
0911 int X509V3_EXT_CRL_add_nconf(CONF *conf, X509V3_CTX *ctx, const char *section,
0912 X509_CRL *crl);
0913
0914 X509_EXTENSION *X509V3_EXT_conf_nid(LHASH_OF(CONF_VALUE) *conf,
0915 X509V3_CTX *ctx, int ext_nid,
0916 const char *value);
0917 X509_EXTENSION *X509V3_EXT_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx,
0918 const char *name, const char *value);
0919 int X509V3_EXT_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx,
0920 const char *section, X509 *cert);
0921 int X509V3_EXT_REQ_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx,
0922 const char *section, X509_REQ *req);
0923 int X509V3_EXT_CRL_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx,
0924 const char *section, X509_CRL *crl);
0925
0926 int X509V3_add_value_bool_nf(const char *name, int asn1_bool,
0927 STACK_OF(CONF_VALUE) **extlist);
0928 int X509V3_get_value_bool(const CONF_VALUE *value, int *asn1_bool);
0929 int X509V3_get_value_int(const CONF_VALUE *value, ASN1_INTEGER **aint);
0930 void X509V3_set_nconf(X509V3_CTX *ctx, CONF *conf);
0931 void X509V3_set_conf_lhash(X509V3_CTX *ctx, LHASH_OF(CONF_VALUE) *lhash);
0932 # endif
0933
0934 char *X509V3_get_string(X509V3_CTX *ctx, const char *name, const char *section);
0935 STACK_OF(CONF_VALUE) *X509V3_get_section(X509V3_CTX *ctx, const char *section);
0936 void X509V3_string_free(X509V3_CTX *ctx, char *str);
0937 void X509V3_section_free(X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *section);
0938 void X509V3_set_ctx(X509V3_CTX *ctx, X509 *issuer, X509 *subject,
0939 X509_REQ *req, X509_CRL *crl, int flags);
0940
0941 int X509V3_set_issuer_pkey(X509V3_CTX *ctx, EVP_PKEY *pkey);
0942
0943 int X509V3_add_value(const char *name, const char *value,
0944 STACK_OF(CONF_VALUE) **extlist);
0945 int X509V3_add_value_uchar(const char *name, const unsigned char *value,
0946 STACK_OF(CONF_VALUE) **extlist);
0947 int X509V3_add_value_bool(const char *name, int asn1_bool,
0948 STACK_OF(CONF_VALUE) **extlist);
0949 int X509V3_add_value_int(const char *name, const ASN1_INTEGER *aint,
0950 STACK_OF(CONF_VALUE) **extlist);
0951 char *i2s_ASN1_INTEGER(X509V3_EXT_METHOD *meth, const ASN1_INTEGER *aint);
0952 ASN1_INTEGER *s2i_ASN1_INTEGER(X509V3_EXT_METHOD *meth, const char *value);
0953 char *i2s_ASN1_ENUMERATED(X509V3_EXT_METHOD *meth, const ASN1_ENUMERATED *aint);
0954 char *i2s_ASN1_ENUMERATED_TABLE(X509V3_EXT_METHOD *meth,
0955 const ASN1_ENUMERATED *aint);
0956 int X509V3_EXT_add(X509V3_EXT_METHOD *ext);
0957 int X509V3_EXT_add_list(X509V3_EXT_METHOD *extlist);
0958 int X509V3_EXT_add_alias(int nid_to, int nid_from);
0959 void X509V3_EXT_cleanup(void);
0960
0961 const X509V3_EXT_METHOD *X509V3_EXT_get(X509_EXTENSION *ext);
0962 const X509V3_EXT_METHOD *X509V3_EXT_get_nid(int nid);
0963 int X509V3_add_standard_extensions(void);
0964 STACK_OF(CONF_VALUE) *X509V3_parse_list(const char *line);
0965 void *X509V3_EXT_d2i(X509_EXTENSION *ext);
0966 void *X509V3_get_d2i(const STACK_OF(X509_EXTENSION) *x, int nid, int *crit,
0967 int *idx);
0968
0969 X509_EXTENSION *X509V3_EXT_i2d(int ext_nid, int crit, void *ext_struc);
0970 int X509V3_add1_i2d(STACK_OF(X509_EXTENSION) **x, int nid, void *value,
0971 int crit, unsigned long flags);
0972
0973 #ifndef OPENSSL_NO_DEPRECATED_1_1_0
0974
0975 # define hex_to_string OPENSSL_buf2hexstr
0976 # define string_to_hex OPENSSL_hexstr2buf
0977 #endif
0978
0979 void X509V3_EXT_val_prn(BIO *out, STACK_OF(CONF_VALUE) *val, int indent,
0980 int ml);
0981 int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, unsigned long flag,
0982 int indent);
0983 #ifndef OPENSSL_NO_STDIO
0984 int X509V3_EXT_print_fp(FILE *out, X509_EXTENSION *ext, int flag, int indent);
0985 #endif
0986 int X509V3_extensions_print(BIO *out, const char *title,
0987 const STACK_OF(X509_EXTENSION) *exts,
0988 unsigned long flag, int indent);
0989
0990 int X509_check_ca(X509 *x);
0991 int X509_check_purpose(X509 *x, int id, int ca);
0992 int X509_supported_extension(X509_EXTENSION *ex);
0993 int X509_PURPOSE_set(int *p, int purpose);
0994 int X509_check_issued(X509 *issuer, X509 *subject);
0995 int X509_check_akid(const X509 *issuer, const AUTHORITY_KEYID *akid);
0996 void X509_set_proxy_flag(X509 *x);
0997 void X509_set_proxy_pathlen(X509 *x, long l);
0998 long X509_get_proxy_pathlen(X509 *x);
0999
1000 uint32_t X509_get_extension_flags(X509 *x);
1001 uint32_t X509_get_key_usage(X509 *x);
1002 uint32_t X509_get_extended_key_usage(X509 *x);
1003 const ASN1_OCTET_STRING *X509_get0_subject_key_id(X509 *x);
1004 const ASN1_OCTET_STRING *X509_get0_authority_key_id(X509 *x);
1005 const GENERAL_NAMES *X509_get0_authority_issuer(X509 *x);
1006 const ASN1_INTEGER *X509_get0_authority_serial(X509 *x);
1007
1008 int X509_PURPOSE_get_count(void);
1009 X509_PURPOSE *X509_PURPOSE_get0(int idx);
1010 int X509_PURPOSE_get_by_sname(const char *sname);
1011 int X509_PURPOSE_get_by_id(int id);
1012 int X509_PURPOSE_add(int id, int trust, int flags,
1013 int (*ck) (const X509_PURPOSE *, const X509 *, int),
1014 const char *name, const char *sname, void *arg);
1015 char *X509_PURPOSE_get0_name(const X509_PURPOSE *xp);
1016 char *X509_PURPOSE_get0_sname(const X509_PURPOSE *xp);
1017 int X509_PURPOSE_get_trust(const X509_PURPOSE *xp);
1018 void X509_PURPOSE_cleanup(void);
1019 int X509_PURPOSE_get_id(const X509_PURPOSE *);
1020
1021 STACK_OF(OPENSSL_STRING) *X509_get1_email(X509 *x);
1022 STACK_OF(OPENSSL_STRING) *X509_REQ_get1_email(X509_REQ *x);
1023 void X509_email_free(STACK_OF(OPENSSL_STRING) *sk);
1024 STACK_OF(OPENSSL_STRING) *X509_get1_ocsp(X509 *x);
1025
1026
1027
1028
1029
1030 # define X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT 0x1
1031
1032 # define X509_CHECK_FLAG_NO_WILDCARDS 0x2
1033
1034 # define X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS 0x4
1035
1036 # define X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS 0x8
1037
1038 # define X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS 0x10
1039
1040 # define X509_CHECK_FLAG_NEVER_CHECK_SUBJECT 0x20
1041
1042
1043
1044
1045
1046 # define _X509_CHECK_FLAG_DOT_SUBDOMAINS 0x8000
1047
1048 int X509_check_host(X509 *x, const char *chk, size_t chklen,
1049 unsigned int flags, char **peername);
1050 int X509_check_email(X509 *x, const char *chk, size_t chklen,
1051 unsigned int flags);
1052 int X509_check_ip(X509 *x, const unsigned char *chk, size_t chklen,
1053 unsigned int flags);
1054 int X509_check_ip_asc(X509 *x, const char *ipasc, unsigned int flags);
1055
1056 ASN1_OCTET_STRING *a2i_IPADDRESS(const char *ipasc);
1057 ASN1_OCTET_STRING *a2i_IPADDRESS_NC(const char *ipasc);
1058 int X509V3_NAME_from_section(X509_NAME *nm, STACK_OF(CONF_VALUE) *dn_sk,
1059 unsigned long chtype);
1060
1061 void X509_POLICY_NODE_print(BIO *out, X509_POLICY_NODE *node, int indent);
1062 SKM_DEFINE_STACK_OF_INTERNAL(X509_POLICY_NODE, X509_POLICY_NODE, X509_POLICY_NODE)
1063 #define sk_X509_POLICY_NODE_num(sk) OPENSSL_sk_num(ossl_check_const_X509_POLICY_NODE_sk_type(sk))
1064 #define sk_X509_POLICY_NODE_value(sk, idx) ((X509_POLICY_NODE *)OPENSSL_sk_value(ossl_check_const_X509_POLICY_NODE_sk_type(sk), (idx)))
1065 #define sk_X509_POLICY_NODE_new(cmp) ((STACK_OF(X509_POLICY_NODE) *)OPENSSL_sk_new(ossl_check_X509_POLICY_NODE_compfunc_type(cmp)))
1066 #define sk_X509_POLICY_NODE_new_null() ((STACK_OF(X509_POLICY_NODE) *)OPENSSL_sk_new_null())
1067 #define sk_X509_POLICY_NODE_new_reserve(cmp, n) ((STACK_OF(X509_POLICY_NODE) *)OPENSSL_sk_new_reserve(ossl_check_X509_POLICY_NODE_compfunc_type(cmp), (n)))
1068 #define sk_X509_POLICY_NODE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_X509_POLICY_NODE_sk_type(sk), (n))
1069 #define sk_X509_POLICY_NODE_free(sk) OPENSSL_sk_free(ossl_check_X509_POLICY_NODE_sk_type(sk))
1070 #define sk_X509_POLICY_NODE_zero(sk) OPENSSL_sk_zero(ossl_check_X509_POLICY_NODE_sk_type(sk))
1071 #define sk_X509_POLICY_NODE_delete(sk, i) ((X509_POLICY_NODE *)OPENSSL_sk_delete(ossl_check_X509_POLICY_NODE_sk_type(sk), (i)))
1072 #define sk_X509_POLICY_NODE_delete_ptr(sk, ptr) ((X509_POLICY_NODE *)OPENSSL_sk_delete_ptr(ossl_check_X509_POLICY_NODE_sk_type(sk), ossl_check_X509_POLICY_NODE_type(ptr)))
1073 #define sk_X509_POLICY_NODE_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_POLICY_NODE_sk_type(sk), ossl_check_X509_POLICY_NODE_type(ptr))
1074 #define sk_X509_POLICY_NODE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_X509_POLICY_NODE_sk_type(sk), ossl_check_X509_POLICY_NODE_type(ptr))
1075 #define sk_X509_POLICY_NODE_pop(sk) ((X509_POLICY_NODE *)OPENSSL_sk_pop(ossl_check_X509_POLICY_NODE_sk_type(sk)))
1076 #define sk_X509_POLICY_NODE_shift(sk) ((X509_POLICY_NODE *)OPENSSL_sk_shift(ossl_check_X509_POLICY_NODE_sk_type(sk)))
1077 #define sk_X509_POLICY_NODE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_POLICY_NODE_sk_type(sk),ossl_check_X509_POLICY_NODE_freefunc_type(freefunc))
1078 #define sk_X509_POLICY_NODE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_X509_POLICY_NODE_sk_type(sk), ossl_check_X509_POLICY_NODE_type(ptr), (idx))
1079 #define sk_X509_POLICY_NODE_set(sk, idx, ptr) ((X509_POLICY_NODE *)OPENSSL_sk_set(ossl_check_X509_POLICY_NODE_sk_type(sk), (idx), ossl_check_X509_POLICY_NODE_type(ptr)))
1080 #define sk_X509_POLICY_NODE_find(sk, ptr) OPENSSL_sk_find(ossl_check_X509_POLICY_NODE_sk_type(sk), ossl_check_X509_POLICY_NODE_type(ptr))
1081 #define sk_X509_POLICY_NODE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_X509_POLICY_NODE_sk_type(sk), ossl_check_X509_POLICY_NODE_type(ptr))
1082 #define sk_X509_POLICY_NODE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_X509_POLICY_NODE_sk_type(sk), ossl_check_X509_POLICY_NODE_type(ptr), pnum)
1083 #define sk_X509_POLICY_NODE_sort(sk) OPENSSL_sk_sort(ossl_check_X509_POLICY_NODE_sk_type(sk))
1084 #define sk_X509_POLICY_NODE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_X509_POLICY_NODE_sk_type(sk))
1085 #define sk_X509_POLICY_NODE_dup(sk) ((STACK_OF(X509_POLICY_NODE) *)OPENSSL_sk_dup(ossl_check_const_X509_POLICY_NODE_sk_type(sk)))
1086 #define sk_X509_POLICY_NODE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(X509_POLICY_NODE) *)OPENSSL_sk_deep_copy(ossl_check_const_X509_POLICY_NODE_sk_type(sk), ossl_check_X509_POLICY_NODE_copyfunc_type(copyfunc), ossl_check_X509_POLICY_NODE_freefunc_type(freefunc)))
1087 #define sk_X509_POLICY_NODE_set_cmp_func(sk, cmp) ((sk_X509_POLICY_NODE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_X509_POLICY_NODE_sk_type(sk), ossl_check_X509_POLICY_NODE_compfunc_type(cmp)))
1088
1089
1090
1091 #ifndef OPENSSL_NO_RFC3779
1092 typedef struct ASRange_st {
1093 ASN1_INTEGER *min, *max;
1094 } ASRange;
1095
1096 # define ASIdOrRange_id 0
1097 # define ASIdOrRange_range 1
1098
1099 typedef struct ASIdOrRange_st {
1100 int type;
1101 union {
1102 ASN1_INTEGER *id;
1103 ASRange *range;
1104 } u;
1105 } ASIdOrRange;
1106
1107 SKM_DEFINE_STACK_OF_INTERNAL(ASIdOrRange, ASIdOrRange, ASIdOrRange)
1108 #define sk_ASIdOrRange_num(sk) OPENSSL_sk_num(ossl_check_const_ASIdOrRange_sk_type(sk))
1109 #define sk_ASIdOrRange_value(sk, idx) ((ASIdOrRange *)OPENSSL_sk_value(ossl_check_const_ASIdOrRange_sk_type(sk), (idx)))
1110 #define sk_ASIdOrRange_new(cmp) ((STACK_OF(ASIdOrRange) *)OPENSSL_sk_new(ossl_check_ASIdOrRange_compfunc_type(cmp)))
1111 #define sk_ASIdOrRange_new_null() ((STACK_OF(ASIdOrRange) *)OPENSSL_sk_new_null())
1112 #define sk_ASIdOrRange_new_reserve(cmp, n) ((STACK_OF(ASIdOrRange) *)OPENSSL_sk_new_reserve(ossl_check_ASIdOrRange_compfunc_type(cmp), (n)))
1113 #define sk_ASIdOrRange_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASIdOrRange_sk_type(sk), (n))
1114 #define sk_ASIdOrRange_free(sk) OPENSSL_sk_free(ossl_check_ASIdOrRange_sk_type(sk))
1115 #define sk_ASIdOrRange_zero(sk) OPENSSL_sk_zero(ossl_check_ASIdOrRange_sk_type(sk))
1116 #define sk_ASIdOrRange_delete(sk, i) ((ASIdOrRange *)OPENSSL_sk_delete(ossl_check_ASIdOrRange_sk_type(sk), (i)))
1117 #define sk_ASIdOrRange_delete_ptr(sk, ptr) ((ASIdOrRange *)OPENSSL_sk_delete_ptr(ossl_check_ASIdOrRange_sk_type(sk), ossl_check_ASIdOrRange_type(ptr)))
1118 #define sk_ASIdOrRange_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASIdOrRange_sk_type(sk), ossl_check_ASIdOrRange_type(ptr))
1119 #define sk_ASIdOrRange_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASIdOrRange_sk_type(sk), ossl_check_ASIdOrRange_type(ptr))
1120 #define sk_ASIdOrRange_pop(sk) ((ASIdOrRange *)OPENSSL_sk_pop(ossl_check_ASIdOrRange_sk_type(sk)))
1121 #define sk_ASIdOrRange_shift(sk) ((ASIdOrRange *)OPENSSL_sk_shift(ossl_check_ASIdOrRange_sk_type(sk)))
1122 #define sk_ASIdOrRange_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASIdOrRange_sk_type(sk),ossl_check_ASIdOrRange_freefunc_type(freefunc))
1123 #define sk_ASIdOrRange_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASIdOrRange_sk_type(sk), ossl_check_ASIdOrRange_type(ptr), (idx))
1124 #define sk_ASIdOrRange_set(sk, idx, ptr) ((ASIdOrRange *)OPENSSL_sk_set(ossl_check_ASIdOrRange_sk_type(sk), (idx), ossl_check_ASIdOrRange_type(ptr)))
1125 #define sk_ASIdOrRange_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASIdOrRange_sk_type(sk), ossl_check_ASIdOrRange_type(ptr))
1126 #define sk_ASIdOrRange_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASIdOrRange_sk_type(sk), ossl_check_ASIdOrRange_type(ptr))
1127 #define sk_ASIdOrRange_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASIdOrRange_sk_type(sk), ossl_check_ASIdOrRange_type(ptr), pnum)
1128 #define sk_ASIdOrRange_sort(sk) OPENSSL_sk_sort(ossl_check_ASIdOrRange_sk_type(sk))
1129 #define sk_ASIdOrRange_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASIdOrRange_sk_type(sk))
1130 #define sk_ASIdOrRange_dup(sk) ((STACK_OF(ASIdOrRange) *)OPENSSL_sk_dup(ossl_check_const_ASIdOrRange_sk_type(sk)))
1131 #define sk_ASIdOrRange_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASIdOrRange) *)OPENSSL_sk_deep_copy(ossl_check_const_ASIdOrRange_sk_type(sk), ossl_check_ASIdOrRange_copyfunc_type(copyfunc), ossl_check_ASIdOrRange_freefunc_type(freefunc)))
1132 #define sk_ASIdOrRange_set_cmp_func(sk, cmp) ((sk_ASIdOrRange_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASIdOrRange_sk_type(sk), ossl_check_ASIdOrRange_compfunc_type(cmp)))
1133
1134
1135 typedef STACK_OF(ASIdOrRange) ASIdOrRanges;
1136
1137 # define ASIdentifierChoice_inherit 0
1138 # define ASIdentifierChoice_asIdsOrRanges 1
1139
1140 typedef struct ASIdentifierChoice_st {
1141 int type;
1142 union {
1143 ASN1_NULL *inherit;
1144 ASIdOrRanges *asIdsOrRanges;
1145 } u;
1146 } ASIdentifierChoice;
1147
1148 typedef struct ASIdentifiers_st {
1149 ASIdentifierChoice *asnum, *rdi;
1150 } ASIdentifiers;
1151
1152 DECLARE_ASN1_FUNCTIONS(ASRange)
1153 DECLARE_ASN1_FUNCTIONS(ASIdOrRange)
1154 DECLARE_ASN1_FUNCTIONS(ASIdentifierChoice)
1155 DECLARE_ASN1_FUNCTIONS(ASIdentifiers)
1156
1157 typedef struct IPAddressRange_st {
1158 ASN1_BIT_STRING *min, *max;
1159 } IPAddressRange;
1160
1161 # define IPAddressOrRange_addressPrefix 0
1162 # define IPAddressOrRange_addressRange 1
1163
1164 typedef struct IPAddressOrRange_st {
1165 int type;
1166 union {
1167 ASN1_BIT_STRING *addressPrefix;
1168 IPAddressRange *addressRange;
1169 } u;
1170 } IPAddressOrRange;
1171
1172 SKM_DEFINE_STACK_OF_INTERNAL(IPAddressOrRange, IPAddressOrRange, IPAddressOrRange)
1173 #define sk_IPAddressOrRange_num(sk) OPENSSL_sk_num(ossl_check_const_IPAddressOrRange_sk_type(sk))
1174 #define sk_IPAddressOrRange_value(sk, idx) ((IPAddressOrRange *)OPENSSL_sk_value(ossl_check_const_IPAddressOrRange_sk_type(sk), (idx)))
1175 #define sk_IPAddressOrRange_new(cmp) ((STACK_OF(IPAddressOrRange) *)OPENSSL_sk_new(ossl_check_IPAddressOrRange_compfunc_type(cmp)))
1176 #define sk_IPAddressOrRange_new_null() ((STACK_OF(IPAddressOrRange) *)OPENSSL_sk_new_null())
1177 #define sk_IPAddressOrRange_new_reserve(cmp, n) ((STACK_OF(IPAddressOrRange) *)OPENSSL_sk_new_reserve(ossl_check_IPAddressOrRange_compfunc_type(cmp), (n)))
1178 #define sk_IPAddressOrRange_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_IPAddressOrRange_sk_type(sk), (n))
1179 #define sk_IPAddressOrRange_free(sk) OPENSSL_sk_free(ossl_check_IPAddressOrRange_sk_type(sk))
1180 #define sk_IPAddressOrRange_zero(sk) OPENSSL_sk_zero(ossl_check_IPAddressOrRange_sk_type(sk))
1181 #define sk_IPAddressOrRange_delete(sk, i) ((IPAddressOrRange *)OPENSSL_sk_delete(ossl_check_IPAddressOrRange_sk_type(sk), (i)))
1182 #define sk_IPAddressOrRange_delete_ptr(sk, ptr) ((IPAddressOrRange *)OPENSSL_sk_delete_ptr(ossl_check_IPAddressOrRange_sk_type(sk), ossl_check_IPAddressOrRange_type(ptr)))
1183 #define sk_IPAddressOrRange_push(sk, ptr) OPENSSL_sk_push(ossl_check_IPAddressOrRange_sk_type(sk), ossl_check_IPAddressOrRange_type(ptr))
1184 #define sk_IPAddressOrRange_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_IPAddressOrRange_sk_type(sk), ossl_check_IPAddressOrRange_type(ptr))
1185 #define sk_IPAddressOrRange_pop(sk) ((IPAddressOrRange *)OPENSSL_sk_pop(ossl_check_IPAddressOrRange_sk_type(sk)))
1186 #define sk_IPAddressOrRange_shift(sk) ((IPAddressOrRange *)OPENSSL_sk_shift(ossl_check_IPAddressOrRange_sk_type(sk)))
1187 #define sk_IPAddressOrRange_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_IPAddressOrRange_sk_type(sk),ossl_check_IPAddressOrRange_freefunc_type(freefunc))
1188 #define sk_IPAddressOrRange_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_IPAddressOrRange_sk_type(sk), ossl_check_IPAddressOrRange_type(ptr), (idx))
1189 #define sk_IPAddressOrRange_set(sk, idx, ptr) ((IPAddressOrRange *)OPENSSL_sk_set(ossl_check_IPAddressOrRange_sk_type(sk), (idx), ossl_check_IPAddressOrRange_type(ptr)))
1190 #define sk_IPAddressOrRange_find(sk, ptr) OPENSSL_sk_find(ossl_check_IPAddressOrRange_sk_type(sk), ossl_check_IPAddressOrRange_type(ptr))
1191 #define sk_IPAddressOrRange_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_IPAddressOrRange_sk_type(sk), ossl_check_IPAddressOrRange_type(ptr))
1192 #define sk_IPAddressOrRange_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_IPAddressOrRange_sk_type(sk), ossl_check_IPAddressOrRange_type(ptr), pnum)
1193 #define sk_IPAddressOrRange_sort(sk) OPENSSL_sk_sort(ossl_check_IPAddressOrRange_sk_type(sk))
1194 #define sk_IPAddressOrRange_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_IPAddressOrRange_sk_type(sk))
1195 #define sk_IPAddressOrRange_dup(sk) ((STACK_OF(IPAddressOrRange) *)OPENSSL_sk_dup(ossl_check_const_IPAddressOrRange_sk_type(sk)))
1196 #define sk_IPAddressOrRange_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(IPAddressOrRange) *)OPENSSL_sk_deep_copy(ossl_check_const_IPAddressOrRange_sk_type(sk), ossl_check_IPAddressOrRange_copyfunc_type(copyfunc), ossl_check_IPAddressOrRange_freefunc_type(freefunc)))
1197 #define sk_IPAddressOrRange_set_cmp_func(sk, cmp) ((sk_IPAddressOrRange_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_IPAddressOrRange_sk_type(sk), ossl_check_IPAddressOrRange_compfunc_type(cmp)))
1198
1199
1200 typedef STACK_OF(IPAddressOrRange) IPAddressOrRanges;
1201
1202 # define IPAddressChoice_inherit 0
1203 # define IPAddressChoice_addressesOrRanges 1
1204
1205 typedef struct IPAddressChoice_st {
1206 int type;
1207 union {
1208 ASN1_NULL *inherit;
1209 IPAddressOrRanges *addressesOrRanges;
1210 } u;
1211 } IPAddressChoice;
1212
1213 typedef struct IPAddressFamily_st {
1214 ASN1_OCTET_STRING *addressFamily;
1215 IPAddressChoice *ipAddressChoice;
1216 } IPAddressFamily;
1217
1218 SKM_DEFINE_STACK_OF_INTERNAL(IPAddressFamily, IPAddressFamily, IPAddressFamily)
1219 #define sk_IPAddressFamily_num(sk) OPENSSL_sk_num(ossl_check_const_IPAddressFamily_sk_type(sk))
1220 #define sk_IPAddressFamily_value(sk, idx) ((IPAddressFamily *)OPENSSL_sk_value(ossl_check_const_IPAddressFamily_sk_type(sk), (idx)))
1221 #define sk_IPAddressFamily_new(cmp) ((STACK_OF(IPAddressFamily) *)OPENSSL_sk_new(ossl_check_IPAddressFamily_compfunc_type(cmp)))
1222 #define sk_IPAddressFamily_new_null() ((STACK_OF(IPAddressFamily) *)OPENSSL_sk_new_null())
1223 #define sk_IPAddressFamily_new_reserve(cmp, n) ((STACK_OF(IPAddressFamily) *)OPENSSL_sk_new_reserve(ossl_check_IPAddressFamily_compfunc_type(cmp), (n)))
1224 #define sk_IPAddressFamily_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_IPAddressFamily_sk_type(sk), (n))
1225 #define sk_IPAddressFamily_free(sk) OPENSSL_sk_free(ossl_check_IPAddressFamily_sk_type(sk))
1226 #define sk_IPAddressFamily_zero(sk) OPENSSL_sk_zero(ossl_check_IPAddressFamily_sk_type(sk))
1227 #define sk_IPAddressFamily_delete(sk, i) ((IPAddressFamily *)OPENSSL_sk_delete(ossl_check_IPAddressFamily_sk_type(sk), (i)))
1228 #define sk_IPAddressFamily_delete_ptr(sk, ptr) ((IPAddressFamily *)OPENSSL_sk_delete_ptr(ossl_check_IPAddressFamily_sk_type(sk), ossl_check_IPAddressFamily_type(ptr)))
1229 #define sk_IPAddressFamily_push(sk, ptr) OPENSSL_sk_push(ossl_check_IPAddressFamily_sk_type(sk), ossl_check_IPAddressFamily_type(ptr))
1230 #define sk_IPAddressFamily_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_IPAddressFamily_sk_type(sk), ossl_check_IPAddressFamily_type(ptr))
1231 #define sk_IPAddressFamily_pop(sk) ((IPAddressFamily *)OPENSSL_sk_pop(ossl_check_IPAddressFamily_sk_type(sk)))
1232 #define sk_IPAddressFamily_shift(sk) ((IPAddressFamily *)OPENSSL_sk_shift(ossl_check_IPAddressFamily_sk_type(sk)))
1233 #define sk_IPAddressFamily_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_IPAddressFamily_sk_type(sk),ossl_check_IPAddressFamily_freefunc_type(freefunc))
1234 #define sk_IPAddressFamily_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_IPAddressFamily_sk_type(sk), ossl_check_IPAddressFamily_type(ptr), (idx))
1235 #define sk_IPAddressFamily_set(sk, idx, ptr) ((IPAddressFamily *)OPENSSL_sk_set(ossl_check_IPAddressFamily_sk_type(sk), (idx), ossl_check_IPAddressFamily_type(ptr)))
1236 #define sk_IPAddressFamily_find(sk, ptr) OPENSSL_sk_find(ossl_check_IPAddressFamily_sk_type(sk), ossl_check_IPAddressFamily_type(ptr))
1237 #define sk_IPAddressFamily_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_IPAddressFamily_sk_type(sk), ossl_check_IPAddressFamily_type(ptr))
1238 #define sk_IPAddressFamily_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_IPAddressFamily_sk_type(sk), ossl_check_IPAddressFamily_type(ptr), pnum)
1239 #define sk_IPAddressFamily_sort(sk) OPENSSL_sk_sort(ossl_check_IPAddressFamily_sk_type(sk))
1240 #define sk_IPAddressFamily_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_IPAddressFamily_sk_type(sk))
1241 #define sk_IPAddressFamily_dup(sk) ((STACK_OF(IPAddressFamily) *)OPENSSL_sk_dup(ossl_check_const_IPAddressFamily_sk_type(sk)))
1242 #define sk_IPAddressFamily_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(IPAddressFamily) *)OPENSSL_sk_deep_copy(ossl_check_const_IPAddressFamily_sk_type(sk), ossl_check_IPAddressFamily_copyfunc_type(copyfunc), ossl_check_IPAddressFamily_freefunc_type(freefunc)))
1243 #define sk_IPAddressFamily_set_cmp_func(sk, cmp) ((sk_IPAddressFamily_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_IPAddressFamily_sk_type(sk), ossl_check_IPAddressFamily_compfunc_type(cmp)))
1244
1245
1246
1247 typedef STACK_OF(IPAddressFamily) IPAddrBlocks;
1248
1249 DECLARE_ASN1_FUNCTIONS(IPAddressRange)
1250 DECLARE_ASN1_FUNCTIONS(IPAddressOrRange)
1251 DECLARE_ASN1_FUNCTIONS(IPAddressChoice)
1252 DECLARE_ASN1_FUNCTIONS(IPAddressFamily)
1253
1254
1255
1256
1257 # define V3_ASID_ASNUM 0
1258 # define V3_ASID_RDI 1
1259
1260
1261
1262
1263
1264
1265
1266 # define IANA_AFI_IPV4 1
1267 # define IANA_AFI_IPV6 2
1268
1269
1270
1271
1272
1273
1274 int X509v3_asid_add_inherit(ASIdentifiers *asid, int which);
1275 int X509v3_asid_add_id_or_range(ASIdentifiers *asid, int which,
1276 ASN1_INTEGER *min, ASN1_INTEGER *max);
1277 int X509v3_addr_add_inherit(IPAddrBlocks *addr,
1278 const unsigned afi, const unsigned *safi);
1279 int X509v3_addr_add_prefix(IPAddrBlocks *addr,
1280 const unsigned afi, const unsigned *safi,
1281 unsigned char *a, const int prefixlen);
1282 int X509v3_addr_add_range(IPAddrBlocks *addr,
1283 const unsigned afi, const unsigned *safi,
1284 unsigned char *min, unsigned char *max);
1285 unsigned X509v3_addr_get_afi(const IPAddressFamily *f);
1286 int X509v3_addr_get_range(IPAddressOrRange *aor, const unsigned afi,
1287 unsigned char *min, unsigned char *max,
1288 const int length);
1289
1290
1291
1292
1293 int X509v3_asid_is_canonical(ASIdentifiers *asid);
1294 int X509v3_addr_is_canonical(IPAddrBlocks *addr);
1295 int X509v3_asid_canonize(ASIdentifiers *asid);
1296 int X509v3_addr_canonize(IPAddrBlocks *addr);
1297
1298
1299
1300
1301 int X509v3_asid_inherits(ASIdentifiers *asid);
1302 int X509v3_addr_inherits(IPAddrBlocks *addr);
1303 int X509v3_asid_subset(ASIdentifiers *a, ASIdentifiers *b);
1304 int X509v3_addr_subset(IPAddrBlocks *a, IPAddrBlocks *b);
1305
1306
1307
1308
1309 int X509v3_asid_validate_path(X509_STORE_CTX *);
1310 int X509v3_addr_validate_path(X509_STORE_CTX *);
1311 int X509v3_asid_validate_resource_set(STACK_OF(X509) *chain,
1312 ASIdentifiers *ext,
1313 int allow_inheritance);
1314 int X509v3_addr_validate_resource_set(STACK_OF(X509) *chain,
1315 IPAddrBlocks *ext, int allow_inheritance);
1316
1317 #endif
1318
1319 SKM_DEFINE_STACK_OF_INTERNAL(ASN1_STRING, ASN1_STRING, ASN1_STRING)
1320 #define sk_ASN1_STRING_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_STRING_sk_type(sk))
1321 #define sk_ASN1_STRING_value(sk, idx) ((ASN1_STRING *)OPENSSL_sk_value(ossl_check_const_ASN1_STRING_sk_type(sk), (idx)))
1322 #define sk_ASN1_STRING_new(cmp) ((STACK_OF(ASN1_STRING) *)OPENSSL_sk_new(ossl_check_ASN1_STRING_compfunc_type(cmp)))
1323 #define sk_ASN1_STRING_new_null() ((STACK_OF(ASN1_STRING) *)OPENSSL_sk_new_null())
1324 #define sk_ASN1_STRING_new_reserve(cmp, n) ((STACK_OF(ASN1_STRING) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_STRING_compfunc_type(cmp), (n)))
1325 #define sk_ASN1_STRING_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_STRING_sk_type(sk), (n))
1326 #define sk_ASN1_STRING_free(sk) OPENSSL_sk_free(ossl_check_ASN1_STRING_sk_type(sk))
1327 #define sk_ASN1_STRING_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_STRING_sk_type(sk))
1328 #define sk_ASN1_STRING_delete(sk, i) ((ASN1_STRING *)OPENSSL_sk_delete(ossl_check_ASN1_STRING_sk_type(sk), (i)))
1329 #define sk_ASN1_STRING_delete_ptr(sk, ptr) ((ASN1_STRING *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_STRING_sk_type(sk), ossl_check_ASN1_STRING_type(ptr)))
1330 #define sk_ASN1_STRING_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_STRING_sk_type(sk), ossl_check_ASN1_STRING_type(ptr))
1331 #define sk_ASN1_STRING_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_STRING_sk_type(sk), ossl_check_ASN1_STRING_type(ptr))
1332 #define sk_ASN1_STRING_pop(sk) ((ASN1_STRING *)OPENSSL_sk_pop(ossl_check_ASN1_STRING_sk_type(sk)))
1333 #define sk_ASN1_STRING_shift(sk) ((ASN1_STRING *)OPENSSL_sk_shift(ossl_check_ASN1_STRING_sk_type(sk)))
1334 #define sk_ASN1_STRING_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_STRING_sk_type(sk),ossl_check_ASN1_STRING_freefunc_type(freefunc))
1335 #define sk_ASN1_STRING_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_STRING_sk_type(sk), ossl_check_ASN1_STRING_type(ptr), (idx))
1336 #define sk_ASN1_STRING_set(sk, idx, ptr) ((ASN1_STRING *)OPENSSL_sk_set(ossl_check_ASN1_STRING_sk_type(sk), (idx), ossl_check_ASN1_STRING_type(ptr)))
1337 #define sk_ASN1_STRING_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_STRING_sk_type(sk), ossl_check_ASN1_STRING_type(ptr))
1338 #define sk_ASN1_STRING_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_STRING_sk_type(sk), ossl_check_ASN1_STRING_type(ptr))
1339 #define sk_ASN1_STRING_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_STRING_sk_type(sk), ossl_check_ASN1_STRING_type(ptr), pnum)
1340 #define sk_ASN1_STRING_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_STRING_sk_type(sk))
1341 #define sk_ASN1_STRING_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_STRING_sk_type(sk))
1342 #define sk_ASN1_STRING_dup(sk) ((STACK_OF(ASN1_STRING) *)OPENSSL_sk_dup(ossl_check_const_ASN1_STRING_sk_type(sk)))
1343 #define sk_ASN1_STRING_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_STRING) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_STRING_sk_type(sk), ossl_check_ASN1_STRING_copyfunc_type(copyfunc), ossl_check_ASN1_STRING_freefunc_type(freefunc)))
1344 #define sk_ASN1_STRING_set_cmp_func(sk, cmp) ((sk_ASN1_STRING_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_STRING_sk_type(sk), ossl_check_ASN1_STRING_compfunc_type(cmp)))
1345
1346
1347
1348
1349
1350 typedef struct NamingAuthority_st NAMING_AUTHORITY;
1351 typedef struct ProfessionInfo_st PROFESSION_INFO;
1352 typedef struct Admissions_st ADMISSIONS;
1353 typedef struct AdmissionSyntax_st ADMISSION_SYNTAX;
1354 DECLARE_ASN1_FUNCTIONS(NAMING_AUTHORITY)
1355 DECLARE_ASN1_FUNCTIONS(PROFESSION_INFO)
1356 DECLARE_ASN1_FUNCTIONS(ADMISSIONS)
1357 DECLARE_ASN1_FUNCTIONS(ADMISSION_SYNTAX)
1358 SKM_DEFINE_STACK_OF_INTERNAL(PROFESSION_INFO, PROFESSION_INFO, PROFESSION_INFO)
1359 #define sk_PROFESSION_INFO_num(sk) OPENSSL_sk_num(ossl_check_const_PROFESSION_INFO_sk_type(sk))
1360 #define sk_PROFESSION_INFO_value(sk, idx) ((PROFESSION_INFO *)OPENSSL_sk_value(ossl_check_const_PROFESSION_INFO_sk_type(sk), (idx)))
1361 #define sk_PROFESSION_INFO_new(cmp) ((STACK_OF(PROFESSION_INFO) *)OPENSSL_sk_new(ossl_check_PROFESSION_INFO_compfunc_type(cmp)))
1362 #define sk_PROFESSION_INFO_new_null() ((STACK_OF(PROFESSION_INFO) *)OPENSSL_sk_new_null())
1363 #define sk_PROFESSION_INFO_new_reserve(cmp, n) ((STACK_OF(PROFESSION_INFO) *)OPENSSL_sk_new_reserve(ossl_check_PROFESSION_INFO_compfunc_type(cmp), (n)))
1364 #define sk_PROFESSION_INFO_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_PROFESSION_INFO_sk_type(sk), (n))
1365 #define sk_PROFESSION_INFO_free(sk) OPENSSL_sk_free(ossl_check_PROFESSION_INFO_sk_type(sk))
1366 #define sk_PROFESSION_INFO_zero(sk) OPENSSL_sk_zero(ossl_check_PROFESSION_INFO_sk_type(sk))
1367 #define sk_PROFESSION_INFO_delete(sk, i) ((PROFESSION_INFO *)OPENSSL_sk_delete(ossl_check_PROFESSION_INFO_sk_type(sk), (i)))
1368 #define sk_PROFESSION_INFO_delete_ptr(sk, ptr) ((PROFESSION_INFO *)OPENSSL_sk_delete_ptr(ossl_check_PROFESSION_INFO_sk_type(sk), ossl_check_PROFESSION_INFO_type(ptr)))
1369 #define sk_PROFESSION_INFO_push(sk, ptr) OPENSSL_sk_push(ossl_check_PROFESSION_INFO_sk_type(sk), ossl_check_PROFESSION_INFO_type(ptr))
1370 #define sk_PROFESSION_INFO_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_PROFESSION_INFO_sk_type(sk), ossl_check_PROFESSION_INFO_type(ptr))
1371 #define sk_PROFESSION_INFO_pop(sk) ((PROFESSION_INFO *)OPENSSL_sk_pop(ossl_check_PROFESSION_INFO_sk_type(sk)))
1372 #define sk_PROFESSION_INFO_shift(sk) ((PROFESSION_INFO *)OPENSSL_sk_shift(ossl_check_PROFESSION_INFO_sk_type(sk)))
1373 #define sk_PROFESSION_INFO_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_PROFESSION_INFO_sk_type(sk),ossl_check_PROFESSION_INFO_freefunc_type(freefunc))
1374 #define sk_PROFESSION_INFO_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_PROFESSION_INFO_sk_type(sk), ossl_check_PROFESSION_INFO_type(ptr), (idx))
1375 #define sk_PROFESSION_INFO_set(sk, idx, ptr) ((PROFESSION_INFO *)OPENSSL_sk_set(ossl_check_PROFESSION_INFO_sk_type(sk), (idx), ossl_check_PROFESSION_INFO_type(ptr)))
1376 #define sk_PROFESSION_INFO_find(sk, ptr) OPENSSL_sk_find(ossl_check_PROFESSION_INFO_sk_type(sk), ossl_check_PROFESSION_INFO_type(ptr))
1377 #define sk_PROFESSION_INFO_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_PROFESSION_INFO_sk_type(sk), ossl_check_PROFESSION_INFO_type(ptr))
1378 #define sk_PROFESSION_INFO_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_PROFESSION_INFO_sk_type(sk), ossl_check_PROFESSION_INFO_type(ptr), pnum)
1379 #define sk_PROFESSION_INFO_sort(sk) OPENSSL_sk_sort(ossl_check_PROFESSION_INFO_sk_type(sk))
1380 #define sk_PROFESSION_INFO_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_PROFESSION_INFO_sk_type(sk))
1381 #define sk_PROFESSION_INFO_dup(sk) ((STACK_OF(PROFESSION_INFO) *)OPENSSL_sk_dup(ossl_check_const_PROFESSION_INFO_sk_type(sk)))
1382 #define sk_PROFESSION_INFO_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(PROFESSION_INFO) *)OPENSSL_sk_deep_copy(ossl_check_const_PROFESSION_INFO_sk_type(sk), ossl_check_PROFESSION_INFO_copyfunc_type(copyfunc), ossl_check_PROFESSION_INFO_freefunc_type(freefunc)))
1383 #define sk_PROFESSION_INFO_set_cmp_func(sk, cmp) ((sk_PROFESSION_INFO_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_PROFESSION_INFO_sk_type(sk), ossl_check_PROFESSION_INFO_compfunc_type(cmp)))
1384 SKM_DEFINE_STACK_OF_INTERNAL(ADMISSIONS, ADMISSIONS, ADMISSIONS)
1385 #define sk_ADMISSIONS_num(sk) OPENSSL_sk_num(ossl_check_const_ADMISSIONS_sk_type(sk))
1386 #define sk_ADMISSIONS_value(sk, idx) ((ADMISSIONS *)OPENSSL_sk_value(ossl_check_const_ADMISSIONS_sk_type(sk), (idx)))
1387 #define sk_ADMISSIONS_new(cmp) ((STACK_OF(ADMISSIONS) *)OPENSSL_sk_new(ossl_check_ADMISSIONS_compfunc_type(cmp)))
1388 #define sk_ADMISSIONS_new_null() ((STACK_OF(ADMISSIONS) *)OPENSSL_sk_new_null())
1389 #define sk_ADMISSIONS_new_reserve(cmp, n) ((STACK_OF(ADMISSIONS) *)OPENSSL_sk_new_reserve(ossl_check_ADMISSIONS_compfunc_type(cmp), (n)))
1390 #define sk_ADMISSIONS_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ADMISSIONS_sk_type(sk), (n))
1391 #define sk_ADMISSIONS_free(sk) OPENSSL_sk_free(ossl_check_ADMISSIONS_sk_type(sk))
1392 #define sk_ADMISSIONS_zero(sk) OPENSSL_sk_zero(ossl_check_ADMISSIONS_sk_type(sk))
1393 #define sk_ADMISSIONS_delete(sk, i) ((ADMISSIONS *)OPENSSL_sk_delete(ossl_check_ADMISSIONS_sk_type(sk), (i)))
1394 #define sk_ADMISSIONS_delete_ptr(sk, ptr) ((ADMISSIONS *)OPENSSL_sk_delete_ptr(ossl_check_ADMISSIONS_sk_type(sk), ossl_check_ADMISSIONS_type(ptr)))
1395 #define sk_ADMISSIONS_push(sk, ptr) OPENSSL_sk_push(ossl_check_ADMISSIONS_sk_type(sk), ossl_check_ADMISSIONS_type(ptr))
1396 #define sk_ADMISSIONS_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ADMISSIONS_sk_type(sk), ossl_check_ADMISSIONS_type(ptr))
1397 #define sk_ADMISSIONS_pop(sk) ((ADMISSIONS *)OPENSSL_sk_pop(ossl_check_ADMISSIONS_sk_type(sk)))
1398 #define sk_ADMISSIONS_shift(sk) ((ADMISSIONS *)OPENSSL_sk_shift(ossl_check_ADMISSIONS_sk_type(sk)))
1399 #define sk_ADMISSIONS_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ADMISSIONS_sk_type(sk),ossl_check_ADMISSIONS_freefunc_type(freefunc))
1400 #define sk_ADMISSIONS_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ADMISSIONS_sk_type(sk), ossl_check_ADMISSIONS_type(ptr), (idx))
1401 #define sk_ADMISSIONS_set(sk, idx, ptr) ((ADMISSIONS *)OPENSSL_sk_set(ossl_check_ADMISSIONS_sk_type(sk), (idx), ossl_check_ADMISSIONS_type(ptr)))
1402 #define sk_ADMISSIONS_find(sk, ptr) OPENSSL_sk_find(ossl_check_ADMISSIONS_sk_type(sk), ossl_check_ADMISSIONS_type(ptr))
1403 #define sk_ADMISSIONS_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ADMISSIONS_sk_type(sk), ossl_check_ADMISSIONS_type(ptr))
1404 #define sk_ADMISSIONS_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ADMISSIONS_sk_type(sk), ossl_check_ADMISSIONS_type(ptr), pnum)
1405 #define sk_ADMISSIONS_sort(sk) OPENSSL_sk_sort(ossl_check_ADMISSIONS_sk_type(sk))
1406 #define sk_ADMISSIONS_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ADMISSIONS_sk_type(sk))
1407 #define sk_ADMISSIONS_dup(sk) ((STACK_OF(ADMISSIONS) *)OPENSSL_sk_dup(ossl_check_const_ADMISSIONS_sk_type(sk)))
1408 #define sk_ADMISSIONS_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ADMISSIONS) *)OPENSSL_sk_deep_copy(ossl_check_const_ADMISSIONS_sk_type(sk), ossl_check_ADMISSIONS_copyfunc_type(copyfunc), ossl_check_ADMISSIONS_freefunc_type(freefunc)))
1409 #define sk_ADMISSIONS_set_cmp_func(sk, cmp) ((sk_ADMISSIONS_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ADMISSIONS_sk_type(sk), ossl_check_ADMISSIONS_compfunc_type(cmp)))
1410
1411 typedef STACK_OF(PROFESSION_INFO) PROFESSION_INFOS;
1412
1413 const ASN1_OBJECT *NAMING_AUTHORITY_get0_authorityId(
1414 const NAMING_AUTHORITY *n);
1415 const ASN1_IA5STRING *NAMING_AUTHORITY_get0_authorityURL(
1416 const NAMING_AUTHORITY *n);
1417 const ASN1_STRING *NAMING_AUTHORITY_get0_authorityText(
1418 const NAMING_AUTHORITY *n);
1419 void NAMING_AUTHORITY_set0_authorityId(NAMING_AUTHORITY *n,
1420 ASN1_OBJECT* namingAuthorityId);
1421 void NAMING_AUTHORITY_set0_authorityURL(NAMING_AUTHORITY *n,
1422 ASN1_IA5STRING* namingAuthorityUrl);
1423 void NAMING_AUTHORITY_set0_authorityText(NAMING_AUTHORITY *n,
1424 ASN1_STRING* namingAuthorityText);
1425
1426 const GENERAL_NAME *ADMISSION_SYNTAX_get0_admissionAuthority(
1427 const ADMISSION_SYNTAX *as);
1428 void ADMISSION_SYNTAX_set0_admissionAuthority(
1429 ADMISSION_SYNTAX *as, GENERAL_NAME *aa);
1430 const STACK_OF(ADMISSIONS) *ADMISSION_SYNTAX_get0_contentsOfAdmissions(
1431 const ADMISSION_SYNTAX *as);
1432 void ADMISSION_SYNTAX_set0_contentsOfAdmissions(
1433 ADMISSION_SYNTAX *as, STACK_OF(ADMISSIONS) *a);
1434 const GENERAL_NAME *ADMISSIONS_get0_admissionAuthority(const ADMISSIONS *a);
1435 void ADMISSIONS_set0_admissionAuthority(ADMISSIONS *a, GENERAL_NAME *aa);
1436 const NAMING_AUTHORITY *ADMISSIONS_get0_namingAuthority(const ADMISSIONS *a);
1437 void ADMISSIONS_set0_namingAuthority(ADMISSIONS *a, NAMING_AUTHORITY *na);
1438 const PROFESSION_INFOS *ADMISSIONS_get0_professionInfos(const ADMISSIONS *a);
1439 void ADMISSIONS_set0_professionInfos(ADMISSIONS *a, PROFESSION_INFOS *pi);
1440 const ASN1_OCTET_STRING *PROFESSION_INFO_get0_addProfessionInfo(
1441 const PROFESSION_INFO *pi);
1442 void PROFESSION_INFO_set0_addProfessionInfo(
1443 PROFESSION_INFO *pi, ASN1_OCTET_STRING *aos);
1444 const NAMING_AUTHORITY *PROFESSION_INFO_get0_namingAuthority(
1445 const PROFESSION_INFO *pi);
1446 void PROFESSION_INFO_set0_namingAuthority(
1447 PROFESSION_INFO *pi, NAMING_AUTHORITY *na);
1448 const STACK_OF(ASN1_STRING) *PROFESSION_INFO_get0_professionItems(
1449 const PROFESSION_INFO *pi);
1450 void PROFESSION_INFO_set0_professionItems(
1451 PROFESSION_INFO *pi, STACK_OF(ASN1_STRING) *as);
1452 const STACK_OF(ASN1_OBJECT) *PROFESSION_INFO_get0_professionOIDs(
1453 const PROFESSION_INFO *pi);
1454 void PROFESSION_INFO_set0_professionOIDs(
1455 PROFESSION_INFO *pi, STACK_OF(ASN1_OBJECT) *po);
1456 const ASN1_PRINTABLESTRING *PROFESSION_INFO_get0_registrationNumber(
1457 const PROFESSION_INFO *pi);
1458 void PROFESSION_INFO_set0_registrationNumber(
1459 PROFESSION_INFO *pi, ASN1_PRINTABLESTRING *rn);
1460
1461 int OSSL_GENERAL_NAMES_print(BIO *out, GENERAL_NAMES *gens, int indent);
1462
1463 typedef STACK_OF(X509_ATTRIBUTE) OSSL_ATTRIBUTES_SYNTAX;
1464 DECLARE_ASN1_FUNCTIONS(OSSL_ATTRIBUTES_SYNTAX)
1465
1466 typedef STACK_OF(USERNOTICE) OSSL_USER_NOTICE_SYNTAX;
1467 DECLARE_ASN1_FUNCTIONS(OSSL_USER_NOTICE_SYNTAX)
1468
1469 SKM_DEFINE_STACK_OF_INTERNAL(USERNOTICE, USERNOTICE, USERNOTICE)
1470 #define sk_USERNOTICE_num(sk) OPENSSL_sk_num(ossl_check_const_USERNOTICE_sk_type(sk))
1471 #define sk_USERNOTICE_value(sk, idx) ((USERNOTICE *)OPENSSL_sk_value(ossl_check_const_USERNOTICE_sk_type(sk), (idx)))
1472 #define sk_USERNOTICE_new(cmp) ((STACK_OF(USERNOTICE) *)OPENSSL_sk_new(ossl_check_USERNOTICE_compfunc_type(cmp)))
1473 #define sk_USERNOTICE_new_null() ((STACK_OF(USERNOTICE) *)OPENSSL_sk_new_null())
1474 #define sk_USERNOTICE_new_reserve(cmp, n) ((STACK_OF(USERNOTICE) *)OPENSSL_sk_new_reserve(ossl_check_USERNOTICE_compfunc_type(cmp), (n)))
1475 #define sk_USERNOTICE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_USERNOTICE_sk_type(sk), (n))
1476 #define sk_USERNOTICE_free(sk) OPENSSL_sk_free(ossl_check_USERNOTICE_sk_type(sk))
1477 #define sk_USERNOTICE_zero(sk) OPENSSL_sk_zero(ossl_check_USERNOTICE_sk_type(sk))
1478 #define sk_USERNOTICE_delete(sk, i) ((USERNOTICE *)OPENSSL_sk_delete(ossl_check_USERNOTICE_sk_type(sk), (i)))
1479 #define sk_USERNOTICE_delete_ptr(sk, ptr) ((USERNOTICE *)OPENSSL_sk_delete_ptr(ossl_check_USERNOTICE_sk_type(sk), ossl_check_USERNOTICE_type(ptr)))
1480 #define sk_USERNOTICE_push(sk, ptr) OPENSSL_sk_push(ossl_check_USERNOTICE_sk_type(sk), ossl_check_USERNOTICE_type(ptr))
1481 #define sk_USERNOTICE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_USERNOTICE_sk_type(sk), ossl_check_USERNOTICE_type(ptr))
1482 #define sk_USERNOTICE_pop(sk) ((USERNOTICE *)OPENSSL_sk_pop(ossl_check_USERNOTICE_sk_type(sk)))
1483 #define sk_USERNOTICE_shift(sk) ((USERNOTICE *)OPENSSL_sk_shift(ossl_check_USERNOTICE_sk_type(sk)))
1484 #define sk_USERNOTICE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_USERNOTICE_sk_type(sk),ossl_check_USERNOTICE_freefunc_type(freefunc))
1485 #define sk_USERNOTICE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_USERNOTICE_sk_type(sk), ossl_check_USERNOTICE_type(ptr), (idx))
1486 #define sk_USERNOTICE_set(sk, idx, ptr) ((USERNOTICE *)OPENSSL_sk_set(ossl_check_USERNOTICE_sk_type(sk), (idx), ossl_check_USERNOTICE_type(ptr)))
1487 #define sk_USERNOTICE_find(sk, ptr) OPENSSL_sk_find(ossl_check_USERNOTICE_sk_type(sk), ossl_check_USERNOTICE_type(ptr))
1488 #define sk_USERNOTICE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_USERNOTICE_sk_type(sk), ossl_check_USERNOTICE_type(ptr))
1489 #define sk_USERNOTICE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_USERNOTICE_sk_type(sk), ossl_check_USERNOTICE_type(ptr), pnum)
1490 #define sk_USERNOTICE_sort(sk) OPENSSL_sk_sort(ossl_check_USERNOTICE_sk_type(sk))
1491 #define sk_USERNOTICE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_USERNOTICE_sk_type(sk))
1492 #define sk_USERNOTICE_dup(sk) ((STACK_OF(USERNOTICE) *)OPENSSL_sk_dup(ossl_check_const_USERNOTICE_sk_type(sk)))
1493 #define sk_USERNOTICE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(USERNOTICE) *)OPENSSL_sk_deep_copy(ossl_check_const_USERNOTICE_sk_type(sk), ossl_check_USERNOTICE_copyfunc_type(copyfunc), ossl_check_USERNOTICE_freefunc_type(freefunc)))
1494 #define sk_USERNOTICE_set_cmp_func(sk, cmp) ((sk_USERNOTICE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_USERNOTICE_sk_type(sk), ossl_check_USERNOTICE_compfunc_type(cmp)))
1495
1496
1497 # ifdef __cplusplus
1498 }
1499 # endif
1500 #endif