diff options
author | miod <> | 2014-05-12 19:16:35 +0000 |
---|---|---|
committer | miod <> | 2014-05-12 19:16:35 +0000 |
commit | b1c75aa00fec08eaff27dbc4f3f73dd5ffedb2b3 (patch) | |
tree | cd679a956ea39144114b4a7c5c02fa6cb1e67ee0 /src | |
parent | bb1f78b0976389edbc302ea662b80029cbf5ce5a (diff) | |
download | openbsd-b1c75aa00fec08eaff27dbc4f3f73dd5ffedb2b3.tar.gz openbsd-b1c75aa00fec08eaff27dbc4f3f73dd5ffedb2b3.tar.bz2 openbsd-b1c75aa00fec08eaff27dbc4f3f73dd5ffedb2b3.zip |
Bring back ASN1_seq_pack(), ASN1_seq_unpack(), ASN1_pack_string() and
ASN1_unpack_string() from the NO_ASN1_OLD purge; turns out that some Ruby
extensions still use them, unfortunately, so we need to give them some more
time to catch up on ``recent'' interfaces.
Riding on the libcrypto major bump.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/asn1/asn1.h | 11 | ||||
-rw-r--r-- | src/lib/libcrypto/asn1/asn_pack.c | 97 | ||||
-rw-r--r-- | src/lib/libcrypto/stack/safestack.h | 107 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/asn1/asn1.h | 11 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/asn1/asn_pack.c | 97 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/stack/safestack.h | 107 |
6 files changed, 430 insertions, 0 deletions
diff --git a/src/lib/libcrypto/asn1/asn1.h b/src/lib/libcrypto/asn1/asn1.h index 176a3d5b82..78705da909 100644 --- a/src/lib/libcrypto/asn1/asn1.h +++ b/src/lib/libcrypto/asn1/asn1.h | |||
@@ -760,6 +760,10 @@ typedef struct BIT_STRING_BITNAME_st { | |||
760 | (ASN1_UTF8STRING *)d2i_ASN1_type_bytes\ | 760 | (ASN1_UTF8STRING *)d2i_ASN1_type_bytes\ |
761 | ((ASN1_STRING **)a,pp,l,B_ASN1_UTF8STRING) | 761 | ((ASN1_STRING **)a,pp,l,B_ASN1_UTF8STRING) |
762 | 762 | ||
763 | /* for the is_set parameter to i2d_ASN1_SET */ | ||
764 | #define IS_SEQUENCE 0 | ||
765 | #define IS_SET 1 | ||
766 | |||
763 | DECLARE_ASN1_FUNCTIONS_fname(ASN1_TYPE, ASN1_ANY, ASN1_TYPE) | 767 | DECLARE_ASN1_FUNCTIONS_fname(ASN1_TYPE, ASN1_ANY, ASN1_TYPE) |
764 | 768 | ||
765 | int ASN1_TYPE_get(ASN1_TYPE *a); | 769 | int ASN1_TYPE_get(ASN1_TYPE *a); |
@@ -1035,7 +1039,14 @@ int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num, | |||
1035 | int ASN1_TYPE_get_int_octetstring(ASN1_TYPE *a,long *num, | 1039 | int ASN1_TYPE_get_int_octetstring(ASN1_TYPE *a,long *num, |
1036 | unsigned char *data, int max_len); | 1040 | unsigned char *data, int max_len); |
1037 | 1041 | ||
1042 | STACK_OF(OPENSSL_BLOCK) *ASN1_seq_unpack(const unsigned char *buf, int len, | ||
1043 | d2i_of_void *d2i, void (*free_func)(OPENSSL_BLOCK)); | ||
1044 | unsigned char *ASN1_seq_pack(STACK_OF(OPENSSL_BLOCK) *safes, i2d_of_void *i2d, | ||
1045 | unsigned char **buf, int *len ); | ||
1046 | void *ASN1_unpack_string(ASN1_STRING *oct, d2i_of_void *d2i); | ||
1038 | void *ASN1_item_unpack(ASN1_STRING *oct, const ASN1_ITEM *it); | 1047 | void *ASN1_item_unpack(ASN1_STRING *oct, const ASN1_ITEM *it); |
1048 | ASN1_STRING *ASN1_pack_string(void *obj, i2d_of_void *i2d, | ||
1049 | ASN1_OCTET_STRING **oct); | ||
1039 | 1050 | ||
1040 | ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it, ASN1_OCTET_STRING **oct); | 1051 | ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it, ASN1_OCTET_STRING **oct); |
1041 | 1052 | ||
diff --git a/src/lib/libcrypto/asn1/asn_pack.c b/src/lib/libcrypto/asn1/asn_pack.c index 9752a68206..8eb39e6a9b 100644 --- a/src/lib/libcrypto/asn1/asn_pack.c +++ b/src/lib/libcrypto/asn1/asn_pack.c | |||
@@ -60,6 +60,103 @@ | |||
60 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
61 | #include <openssl/asn1.h> | 61 | #include <openssl/asn1.h> |
62 | 62 | ||
63 | #ifndef NO_ASN1_OLD | ||
64 | |||
65 | /* ASN1 packing and unpacking functions */ | ||
66 | |||
67 | /* Turn an ASN1 encoded SEQUENCE OF into a STACK of structures */ | ||
68 | |||
69 | STACK_OF(OPENSSL_BLOCK) * | ||
70 | ASN1_seq_unpack(const unsigned char *buf, int len, d2i_of_void *d2i, | ||
71 | void (*free_func)(OPENSSL_BLOCK)) | ||
72 | { | ||
73 | STACK_OF(OPENSSL_BLOCK) *sk; | ||
74 | const unsigned char *pbuf; | ||
75 | |||
76 | pbuf = buf; | ||
77 | if (!(sk = d2i_ASN1_SET(NULL, &pbuf, len, d2i, free_func, | ||
78 | V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL))) | ||
79 | ASN1err(ASN1_F_ASN1_SEQ_UNPACK,ASN1_R_DECODE_ERROR); | ||
80 | return sk; | ||
81 | } | ||
82 | |||
83 | /* Turn a STACK structures into an ASN1 encoded SEQUENCE OF structure in a | ||
84 | * OPENSSL_malloc'ed buffer | ||
85 | */ | ||
86 | |||
87 | unsigned char * | ||
88 | ASN1_seq_pack(STACK_OF(OPENSSL_BLOCK) *safes, i2d_of_void *i2d, | ||
89 | unsigned char **buf, int *len) | ||
90 | { | ||
91 | int safelen; | ||
92 | unsigned char *safe, *p; | ||
93 | |||
94 | if (!(safelen = i2d_ASN1_SET(safes, NULL, i2d, V_ASN1_SEQUENCE, | ||
95 | V_ASN1_UNIVERSAL, IS_SEQUENCE))) { | ||
96 | ASN1err(ASN1_F_ASN1_SEQ_PACK,ASN1_R_ENCODE_ERROR); | ||
97 | return NULL; | ||
98 | } | ||
99 | if (!(safe = malloc(safelen))) { | ||
100 | ASN1err(ASN1_F_ASN1_SEQ_PACK,ERR_R_MALLOC_FAILURE); | ||
101 | return NULL; | ||
102 | } | ||
103 | p = safe; | ||
104 | i2d_ASN1_SET(safes, &p, i2d, V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL, | ||
105 | IS_SEQUENCE); | ||
106 | if (len) | ||
107 | *len = safelen; | ||
108 | if (buf) | ||
109 | *buf = safe; | ||
110 | return safe; | ||
111 | } | ||
112 | |||
113 | /* Extract an ASN1 object from an ASN1_STRING */ | ||
114 | |||
115 | void * | ||
116 | ASN1_unpack_string(ASN1_STRING *oct, d2i_of_void *d2i) | ||
117 | { | ||
118 | const unsigned char *p; | ||
119 | char *ret; | ||
120 | |||
121 | p = oct->data; | ||
122 | if (!(ret = d2i(NULL, &p, oct->length))) | ||
123 | ASN1err(ASN1_F_ASN1_UNPACK_STRING,ASN1_R_DECODE_ERROR); | ||
124 | return ret; | ||
125 | } | ||
126 | |||
127 | /* Pack an ASN1 object into an ASN1_STRING */ | ||
128 | |||
129 | ASN1_STRING * | ||
130 | ASN1_pack_string(void *obj, i2d_of_void *i2d, ASN1_STRING **oct) | ||
131 | { | ||
132 | unsigned char *p; | ||
133 | ASN1_STRING *octmp; | ||
134 | |||
135 | if (!oct || !*oct) { | ||
136 | if (!(octmp = ASN1_STRING_new())) { | ||
137 | ASN1err(ASN1_F_ASN1_PACK_STRING,ERR_R_MALLOC_FAILURE); | ||
138 | return NULL; | ||
139 | } | ||
140 | if (oct) | ||
141 | *oct = octmp; | ||
142 | } else | ||
143 | octmp = *oct; | ||
144 | |||
145 | if (!(octmp->length = i2d(obj, NULL))) { | ||
146 | ASN1err(ASN1_F_ASN1_PACK_STRING,ASN1_R_ENCODE_ERROR); | ||
147 | return NULL; | ||
148 | } | ||
149 | if (!(p = malloc (octmp->length))) { | ||
150 | ASN1err(ASN1_F_ASN1_PACK_STRING,ERR_R_MALLOC_FAILURE); | ||
151 | return NULL; | ||
152 | } | ||
153 | octmp->data = p; | ||
154 | i2d (obj, &p); | ||
155 | return octmp; | ||
156 | } | ||
157 | |||
158 | #endif | ||
159 | |||
63 | /* ASN1_ITEM versions of the above */ | 160 | /* ASN1_ITEM versions of the above */ |
64 | 161 | ||
65 | ASN1_STRING * | 162 | ASN1_STRING * |
diff --git a/src/lib/libcrypto/stack/safestack.h b/src/lib/libcrypto/stack/safestack.h index f2a36fd64b..ea3aa0d800 100644 --- a/src/lib/libcrypto/stack/safestack.h +++ b/src/lib/libcrypto/stack/safestack.h | |||
@@ -191,6 +191,13 @@ DECLARE_SPECIAL_STACK_OF(OPENSSL_BLOCK, void) | |||
191 | CHECKED_I2D_OF(type, i2d_func), \ | 191 | CHECKED_I2D_OF(type, i2d_func), \ |
192 | ex_tag, ex_class, is_set) | 192 | ex_tag, ex_class, is_set) |
193 | 193 | ||
194 | #define SKM_ASN1_seq_pack(type, st, i2d_func, buf, len) \ | ||
195 | ASN1_seq_pack(CHECKED_PTR_OF(STACK_OF(type), st), \ | ||
196 | CHECKED_I2D_OF(type, i2d_func), buf, len) | ||
197 | |||
198 | #define SKM_ASN1_seq_unpack(type, buf, len, d2i_func, free_func) \ | ||
199 | (STACK_OF(type) *)ASN1_seq_unpack(buf, len, CHECKED_D2I_OF(type, d2i_func), CHECKED_SK_FREE_FUNC(type, free_func)) | ||
200 | |||
194 | #define SKM_PKCS12_decrypt_d2i(type, algor, d2i_func, free_func, pass, passlen, oct, seq) \ | 201 | #define SKM_PKCS12_decrypt_d2i(type, algor, d2i_func, free_func, pass, passlen, oct, seq) \ |
195 | (STACK_OF(type) *)PKCS12_decrypt_d2i(algor, \ | 202 | (STACK_OF(type) *)PKCS12_decrypt_d2i(algor, \ |
196 | CHECKED_D2I_OF(type, d2i_func), \ | 203 | CHECKED_D2I_OF(type, d2i_func), \ |
@@ -2191,126 +2198,226 @@ DECLARE_SPECIAL_STACK_OF(OPENSSL_BLOCK, void) | |||
2191 | SKM_ASN1_SET_OF_d2i(ACCESS_DESCRIPTION, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2198 | SKM_ASN1_SET_OF_d2i(ACCESS_DESCRIPTION, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2192 | #define i2d_ASN1_SET_OF_ACCESS_DESCRIPTION(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2199 | #define i2d_ASN1_SET_OF_ACCESS_DESCRIPTION(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2193 | SKM_ASN1_SET_OF_i2d(ACCESS_DESCRIPTION, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2200 | SKM_ASN1_SET_OF_i2d(ACCESS_DESCRIPTION, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2201 | #define ASN1_seq_pack_ACCESS_DESCRIPTION(st, i2d_func, buf, len) \ | ||
2202 | SKM_ASN1_seq_pack(ACCESS_DESCRIPTION, (st), (i2d_func), (buf), (len)) | ||
2203 | #define ASN1_seq_unpack_ACCESS_DESCRIPTION(buf, len, d2i_func, free_func) \ | ||
2204 | SKM_ASN1_seq_unpack(ACCESS_DESCRIPTION, (buf), (len), (d2i_func), (free_func)) | ||
2194 | 2205 | ||
2195 | #define d2i_ASN1_SET_OF_ASN1_INTEGER(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2206 | #define d2i_ASN1_SET_OF_ASN1_INTEGER(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2196 | SKM_ASN1_SET_OF_d2i(ASN1_INTEGER, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2207 | SKM_ASN1_SET_OF_d2i(ASN1_INTEGER, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2197 | #define i2d_ASN1_SET_OF_ASN1_INTEGER(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2208 | #define i2d_ASN1_SET_OF_ASN1_INTEGER(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2198 | SKM_ASN1_SET_OF_i2d(ASN1_INTEGER, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2209 | SKM_ASN1_SET_OF_i2d(ASN1_INTEGER, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2210 | #define ASN1_seq_pack_ASN1_INTEGER(st, i2d_func, buf, len) \ | ||
2211 | SKM_ASN1_seq_pack(ASN1_INTEGER, (st), (i2d_func), (buf), (len)) | ||
2212 | #define ASN1_seq_unpack_ASN1_INTEGER(buf, len, d2i_func, free_func) \ | ||
2213 | SKM_ASN1_seq_unpack(ASN1_INTEGER, (buf), (len), (d2i_func), (free_func)) | ||
2199 | 2214 | ||
2200 | #define d2i_ASN1_SET_OF_ASN1_OBJECT(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2215 | #define d2i_ASN1_SET_OF_ASN1_OBJECT(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2201 | SKM_ASN1_SET_OF_d2i(ASN1_OBJECT, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2216 | SKM_ASN1_SET_OF_d2i(ASN1_OBJECT, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2202 | #define i2d_ASN1_SET_OF_ASN1_OBJECT(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2217 | #define i2d_ASN1_SET_OF_ASN1_OBJECT(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2203 | SKM_ASN1_SET_OF_i2d(ASN1_OBJECT, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2218 | SKM_ASN1_SET_OF_i2d(ASN1_OBJECT, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2219 | #define ASN1_seq_pack_ASN1_OBJECT(st, i2d_func, buf, len) \ | ||
2220 | SKM_ASN1_seq_pack(ASN1_OBJECT, (st), (i2d_func), (buf), (len)) | ||
2221 | #define ASN1_seq_unpack_ASN1_OBJECT(buf, len, d2i_func, free_func) \ | ||
2222 | SKM_ASN1_seq_unpack(ASN1_OBJECT, (buf), (len), (d2i_func), (free_func)) | ||
2204 | 2223 | ||
2205 | #define d2i_ASN1_SET_OF_ASN1_TYPE(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2224 | #define d2i_ASN1_SET_OF_ASN1_TYPE(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2206 | SKM_ASN1_SET_OF_d2i(ASN1_TYPE, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2225 | SKM_ASN1_SET_OF_d2i(ASN1_TYPE, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2207 | #define i2d_ASN1_SET_OF_ASN1_TYPE(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2226 | #define i2d_ASN1_SET_OF_ASN1_TYPE(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2208 | SKM_ASN1_SET_OF_i2d(ASN1_TYPE, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2227 | SKM_ASN1_SET_OF_i2d(ASN1_TYPE, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2228 | #define ASN1_seq_pack_ASN1_TYPE(st, i2d_func, buf, len) \ | ||
2229 | SKM_ASN1_seq_pack(ASN1_TYPE, (st), (i2d_func), (buf), (len)) | ||
2230 | #define ASN1_seq_unpack_ASN1_TYPE(buf, len, d2i_func, free_func) \ | ||
2231 | SKM_ASN1_seq_unpack(ASN1_TYPE, (buf), (len), (d2i_func), (free_func)) | ||
2209 | 2232 | ||
2210 | #define d2i_ASN1_SET_OF_ASN1_UTF8STRING(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2233 | #define d2i_ASN1_SET_OF_ASN1_UTF8STRING(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2211 | SKM_ASN1_SET_OF_d2i(ASN1_UTF8STRING, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2234 | SKM_ASN1_SET_OF_d2i(ASN1_UTF8STRING, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2212 | #define i2d_ASN1_SET_OF_ASN1_UTF8STRING(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2235 | #define i2d_ASN1_SET_OF_ASN1_UTF8STRING(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2213 | SKM_ASN1_SET_OF_i2d(ASN1_UTF8STRING, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2236 | SKM_ASN1_SET_OF_i2d(ASN1_UTF8STRING, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2237 | #define ASN1_seq_pack_ASN1_UTF8STRING(st, i2d_func, buf, len) \ | ||
2238 | SKM_ASN1_seq_pack(ASN1_UTF8STRING, (st), (i2d_func), (buf), (len)) | ||
2239 | #define ASN1_seq_unpack_ASN1_UTF8STRING(buf, len, d2i_func, free_func) \ | ||
2240 | SKM_ASN1_seq_unpack(ASN1_UTF8STRING, (buf), (len), (d2i_func), (free_func)) | ||
2214 | 2241 | ||
2215 | #define d2i_ASN1_SET_OF_DIST_POINT(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2242 | #define d2i_ASN1_SET_OF_DIST_POINT(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2216 | SKM_ASN1_SET_OF_d2i(DIST_POINT, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2243 | SKM_ASN1_SET_OF_d2i(DIST_POINT, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2217 | #define i2d_ASN1_SET_OF_DIST_POINT(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2244 | #define i2d_ASN1_SET_OF_DIST_POINT(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2218 | SKM_ASN1_SET_OF_i2d(DIST_POINT, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2245 | SKM_ASN1_SET_OF_i2d(DIST_POINT, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2246 | #define ASN1_seq_pack_DIST_POINT(st, i2d_func, buf, len) \ | ||
2247 | SKM_ASN1_seq_pack(DIST_POINT, (st), (i2d_func), (buf), (len)) | ||
2248 | #define ASN1_seq_unpack_DIST_POINT(buf, len, d2i_func, free_func) \ | ||
2249 | SKM_ASN1_seq_unpack(DIST_POINT, (buf), (len), (d2i_func), (free_func)) | ||
2219 | 2250 | ||
2220 | #define d2i_ASN1_SET_OF_ESS_CERT_ID(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2251 | #define d2i_ASN1_SET_OF_ESS_CERT_ID(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2221 | SKM_ASN1_SET_OF_d2i(ESS_CERT_ID, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2252 | SKM_ASN1_SET_OF_d2i(ESS_CERT_ID, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2222 | #define i2d_ASN1_SET_OF_ESS_CERT_ID(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2253 | #define i2d_ASN1_SET_OF_ESS_CERT_ID(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2223 | SKM_ASN1_SET_OF_i2d(ESS_CERT_ID, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2254 | SKM_ASN1_SET_OF_i2d(ESS_CERT_ID, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2255 | #define ASN1_seq_pack_ESS_CERT_ID(st, i2d_func, buf, len) \ | ||
2256 | SKM_ASN1_seq_pack(ESS_CERT_ID, (st), (i2d_func), (buf), (len)) | ||
2257 | #define ASN1_seq_unpack_ESS_CERT_ID(buf, len, d2i_func, free_func) \ | ||
2258 | SKM_ASN1_seq_unpack(ESS_CERT_ID, (buf), (len), (d2i_func), (free_func)) | ||
2224 | 2259 | ||
2225 | #define d2i_ASN1_SET_OF_EVP_MD(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2260 | #define d2i_ASN1_SET_OF_EVP_MD(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2226 | SKM_ASN1_SET_OF_d2i(EVP_MD, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2261 | SKM_ASN1_SET_OF_d2i(EVP_MD, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2227 | #define i2d_ASN1_SET_OF_EVP_MD(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2262 | #define i2d_ASN1_SET_OF_EVP_MD(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2228 | SKM_ASN1_SET_OF_i2d(EVP_MD, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2263 | SKM_ASN1_SET_OF_i2d(EVP_MD, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2264 | #define ASN1_seq_pack_EVP_MD(st, i2d_func, buf, len) \ | ||
2265 | SKM_ASN1_seq_pack(EVP_MD, (st), (i2d_func), (buf), (len)) | ||
2266 | #define ASN1_seq_unpack_EVP_MD(buf, len, d2i_func, free_func) \ | ||
2267 | SKM_ASN1_seq_unpack(EVP_MD, (buf), (len), (d2i_func), (free_func)) | ||
2229 | 2268 | ||
2230 | #define d2i_ASN1_SET_OF_GENERAL_NAME(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2269 | #define d2i_ASN1_SET_OF_GENERAL_NAME(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2231 | SKM_ASN1_SET_OF_d2i(GENERAL_NAME, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2270 | SKM_ASN1_SET_OF_d2i(GENERAL_NAME, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2232 | #define i2d_ASN1_SET_OF_GENERAL_NAME(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2271 | #define i2d_ASN1_SET_OF_GENERAL_NAME(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2233 | SKM_ASN1_SET_OF_i2d(GENERAL_NAME, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2272 | SKM_ASN1_SET_OF_i2d(GENERAL_NAME, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2273 | #define ASN1_seq_pack_GENERAL_NAME(st, i2d_func, buf, len) \ | ||
2274 | SKM_ASN1_seq_pack(GENERAL_NAME, (st), (i2d_func), (buf), (len)) | ||
2275 | #define ASN1_seq_unpack_GENERAL_NAME(buf, len, d2i_func, free_func) \ | ||
2276 | SKM_ASN1_seq_unpack(GENERAL_NAME, (buf), (len), (d2i_func), (free_func)) | ||
2234 | 2277 | ||
2235 | #define d2i_ASN1_SET_OF_OCSP_ONEREQ(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2278 | #define d2i_ASN1_SET_OF_OCSP_ONEREQ(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2236 | SKM_ASN1_SET_OF_d2i(OCSP_ONEREQ, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2279 | SKM_ASN1_SET_OF_d2i(OCSP_ONEREQ, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2237 | #define i2d_ASN1_SET_OF_OCSP_ONEREQ(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2280 | #define i2d_ASN1_SET_OF_OCSP_ONEREQ(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2238 | SKM_ASN1_SET_OF_i2d(OCSP_ONEREQ, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2281 | SKM_ASN1_SET_OF_i2d(OCSP_ONEREQ, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2282 | #define ASN1_seq_pack_OCSP_ONEREQ(st, i2d_func, buf, len) \ | ||
2283 | SKM_ASN1_seq_pack(OCSP_ONEREQ, (st), (i2d_func), (buf), (len)) | ||
2284 | #define ASN1_seq_unpack_OCSP_ONEREQ(buf, len, d2i_func, free_func) \ | ||
2285 | SKM_ASN1_seq_unpack(OCSP_ONEREQ, (buf), (len), (d2i_func), (free_func)) | ||
2239 | 2286 | ||
2240 | #define d2i_ASN1_SET_OF_OCSP_SINGLERESP(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2287 | #define d2i_ASN1_SET_OF_OCSP_SINGLERESP(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2241 | SKM_ASN1_SET_OF_d2i(OCSP_SINGLERESP, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2288 | SKM_ASN1_SET_OF_d2i(OCSP_SINGLERESP, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2242 | #define i2d_ASN1_SET_OF_OCSP_SINGLERESP(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2289 | #define i2d_ASN1_SET_OF_OCSP_SINGLERESP(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2243 | SKM_ASN1_SET_OF_i2d(OCSP_SINGLERESP, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2290 | SKM_ASN1_SET_OF_i2d(OCSP_SINGLERESP, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2291 | #define ASN1_seq_pack_OCSP_SINGLERESP(st, i2d_func, buf, len) \ | ||
2292 | SKM_ASN1_seq_pack(OCSP_SINGLERESP, (st), (i2d_func), (buf), (len)) | ||
2293 | #define ASN1_seq_unpack_OCSP_SINGLERESP(buf, len, d2i_func, free_func) \ | ||
2294 | SKM_ASN1_seq_unpack(OCSP_SINGLERESP, (buf), (len), (d2i_func), (free_func)) | ||
2244 | 2295 | ||
2245 | #define d2i_ASN1_SET_OF_PKCS12_SAFEBAG(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2296 | #define d2i_ASN1_SET_OF_PKCS12_SAFEBAG(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2246 | SKM_ASN1_SET_OF_d2i(PKCS12_SAFEBAG, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2297 | SKM_ASN1_SET_OF_d2i(PKCS12_SAFEBAG, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2247 | #define i2d_ASN1_SET_OF_PKCS12_SAFEBAG(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2298 | #define i2d_ASN1_SET_OF_PKCS12_SAFEBAG(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2248 | SKM_ASN1_SET_OF_i2d(PKCS12_SAFEBAG, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2299 | SKM_ASN1_SET_OF_i2d(PKCS12_SAFEBAG, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2300 | #define ASN1_seq_pack_PKCS12_SAFEBAG(st, i2d_func, buf, len) \ | ||
2301 | SKM_ASN1_seq_pack(PKCS12_SAFEBAG, (st), (i2d_func), (buf), (len)) | ||
2302 | #define ASN1_seq_unpack_PKCS12_SAFEBAG(buf, len, d2i_func, free_func) \ | ||
2303 | SKM_ASN1_seq_unpack(PKCS12_SAFEBAG, (buf), (len), (d2i_func), (free_func)) | ||
2249 | 2304 | ||
2250 | #define d2i_ASN1_SET_OF_PKCS7(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2305 | #define d2i_ASN1_SET_OF_PKCS7(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2251 | SKM_ASN1_SET_OF_d2i(PKCS7, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2306 | SKM_ASN1_SET_OF_d2i(PKCS7, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2252 | #define i2d_ASN1_SET_OF_PKCS7(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2307 | #define i2d_ASN1_SET_OF_PKCS7(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2253 | SKM_ASN1_SET_OF_i2d(PKCS7, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2308 | SKM_ASN1_SET_OF_i2d(PKCS7, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2309 | #define ASN1_seq_pack_PKCS7(st, i2d_func, buf, len) \ | ||
2310 | SKM_ASN1_seq_pack(PKCS7, (st), (i2d_func), (buf), (len)) | ||
2311 | #define ASN1_seq_unpack_PKCS7(buf, len, d2i_func, free_func) \ | ||
2312 | SKM_ASN1_seq_unpack(PKCS7, (buf), (len), (d2i_func), (free_func)) | ||
2254 | 2313 | ||
2255 | #define d2i_ASN1_SET_OF_PKCS7_RECIP_INFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2314 | #define d2i_ASN1_SET_OF_PKCS7_RECIP_INFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2256 | SKM_ASN1_SET_OF_d2i(PKCS7_RECIP_INFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2315 | SKM_ASN1_SET_OF_d2i(PKCS7_RECIP_INFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2257 | #define i2d_ASN1_SET_OF_PKCS7_RECIP_INFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2316 | #define i2d_ASN1_SET_OF_PKCS7_RECIP_INFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2258 | SKM_ASN1_SET_OF_i2d(PKCS7_RECIP_INFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2317 | SKM_ASN1_SET_OF_i2d(PKCS7_RECIP_INFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2318 | #define ASN1_seq_pack_PKCS7_RECIP_INFO(st, i2d_func, buf, len) \ | ||
2319 | SKM_ASN1_seq_pack(PKCS7_RECIP_INFO, (st), (i2d_func), (buf), (len)) | ||
2320 | #define ASN1_seq_unpack_PKCS7_RECIP_INFO(buf, len, d2i_func, free_func) \ | ||
2321 | SKM_ASN1_seq_unpack(PKCS7_RECIP_INFO, (buf), (len), (d2i_func), (free_func)) | ||
2259 | 2322 | ||
2260 | #define d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2323 | #define d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2261 | SKM_ASN1_SET_OF_d2i(PKCS7_SIGNER_INFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2324 | SKM_ASN1_SET_OF_d2i(PKCS7_SIGNER_INFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2262 | #define i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2325 | #define i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2263 | SKM_ASN1_SET_OF_i2d(PKCS7_SIGNER_INFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2326 | SKM_ASN1_SET_OF_i2d(PKCS7_SIGNER_INFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2327 | #define ASN1_seq_pack_PKCS7_SIGNER_INFO(st, i2d_func, buf, len) \ | ||
2328 | SKM_ASN1_seq_pack(PKCS7_SIGNER_INFO, (st), (i2d_func), (buf), (len)) | ||
2329 | #define ASN1_seq_unpack_PKCS7_SIGNER_INFO(buf, len, d2i_func, free_func) \ | ||
2330 | SKM_ASN1_seq_unpack(PKCS7_SIGNER_INFO, (buf), (len), (d2i_func), (free_func)) | ||
2264 | 2331 | ||
2265 | #define d2i_ASN1_SET_OF_POLICYINFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2332 | #define d2i_ASN1_SET_OF_POLICYINFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2266 | SKM_ASN1_SET_OF_d2i(POLICYINFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2333 | SKM_ASN1_SET_OF_d2i(POLICYINFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2267 | #define i2d_ASN1_SET_OF_POLICYINFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2334 | #define i2d_ASN1_SET_OF_POLICYINFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2268 | SKM_ASN1_SET_OF_i2d(POLICYINFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2335 | SKM_ASN1_SET_OF_i2d(POLICYINFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2336 | #define ASN1_seq_pack_POLICYINFO(st, i2d_func, buf, len) \ | ||
2337 | SKM_ASN1_seq_pack(POLICYINFO, (st), (i2d_func), (buf), (len)) | ||
2338 | #define ASN1_seq_unpack_POLICYINFO(buf, len, d2i_func, free_func) \ | ||
2339 | SKM_ASN1_seq_unpack(POLICYINFO, (buf), (len), (d2i_func), (free_func)) | ||
2269 | 2340 | ||
2270 | #define d2i_ASN1_SET_OF_POLICYQUALINFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2341 | #define d2i_ASN1_SET_OF_POLICYQUALINFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2271 | SKM_ASN1_SET_OF_d2i(POLICYQUALINFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2342 | SKM_ASN1_SET_OF_d2i(POLICYQUALINFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2272 | #define i2d_ASN1_SET_OF_POLICYQUALINFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2343 | #define i2d_ASN1_SET_OF_POLICYQUALINFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2273 | SKM_ASN1_SET_OF_i2d(POLICYQUALINFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2344 | SKM_ASN1_SET_OF_i2d(POLICYQUALINFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2345 | #define ASN1_seq_pack_POLICYQUALINFO(st, i2d_func, buf, len) \ | ||
2346 | SKM_ASN1_seq_pack(POLICYQUALINFO, (st), (i2d_func), (buf), (len)) | ||
2347 | #define ASN1_seq_unpack_POLICYQUALINFO(buf, len, d2i_func, free_func) \ | ||
2348 | SKM_ASN1_seq_unpack(POLICYQUALINFO, (buf), (len), (d2i_func), (free_func)) | ||
2274 | 2349 | ||
2275 | #define d2i_ASN1_SET_OF_SXNETID(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2350 | #define d2i_ASN1_SET_OF_SXNETID(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2276 | SKM_ASN1_SET_OF_d2i(SXNETID, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2351 | SKM_ASN1_SET_OF_d2i(SXNETID, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2277 | #define i2d_ASN1_SET_OF_SXNETID(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2352 | #define i2d_ASN1_SET_OF_SXNETID(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2278 | SKM_ASN1_SET_OF_i2d(SXNETID, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2353 | SKM_ASN1_SET_OF_i2d(SXNETID, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2354 | #define ASN1_seq_pack_SXNETID(st, i2d_func, buf, len) \ | ||
2355 | SKM_ASN1_seq_pack(SXNETID, (st), (i2d_func), (buf), (len)) | ||
2356 | #define ASN1_seq_unpack_SXNETID(buf, len, d2i_func, free_func) \ | ||
2357 | SKM_ASN1_seq_unpack(SXNETID, (buf), (len), (d2i_func), (free_func)) | ||
2279 | 2358 | ||
2280 | #define d2i_ASN1_SET_OF_X509(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2359 | #define d2i_ASN1_SET_OF_X509(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2281 | SKM_ASN1_SET_OF_d2i(X509, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2360 | SKM_ASN1_SET_OF_d2i(X509, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2282 | #define i2d_ASN1_SET_OF_X509(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2361 | #define i2d_ASN1_SET_OF_X509(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2283 | SKM_ASN1_SET_OF_i2d(X509, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2362 | SKM_ASN1_SET_OF_i2d(X509, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2363 | #define ASN1_seq_pack_X509(st, i2d_func, buf, len) \ | ||
2364 | SKM_ASN1_seq_pack(X509, (st), (i2d_func), (buf), (len)) | ||
2365 | #define ASN1_seq_unpack_X509(buf, len, d2i_func, free_func) \ | ||
2366 | SKM_ASN1_seq_unpack(X509, (buf), (len), (d2i_func), (free_func)) | ||
2284 | 2367 | ||
2285 | #define d2i_ASN1_SET_OF_X509_ALGOR(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2368 | #define d2i_ASN1_SET_OF_X509_ALGOR(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2286 | SKM_ASN1_SET_OF_d2i(X509_ALGOR, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2369 | SKM_ASN1_SET_OF_d2i(X509_ALGOR, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2287 | #define i2d_ASN1_SET_OF_X509_ALGOR(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2370 | #define i2d_ASN1_SET_OF_X509_ALGOR(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2288 | SKM_ASN1_SET_OF_i2d(X509_ALGOR, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2371 | SKM_ASN1_SET_OF_i2d(X509_ALGOR, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2372 | #define ASN1_seq_pack_X509_ALGOR(st, i2d_func, buf, len) \ | ||
2373 | SKM_ASN1_seq_pack(X509_ALGOR, (st), (i2d_func), (buf), (len)) | ||
2374 | #define ASN1_seq_unpack_X509_ALGOR(buf, len, d2i_func, free_func) \ | ||
2375 | SKM_ASN1_seq_unpack(X509_ALGOR, (buf), (len), (d2i_func), (free_func)) | ||
2289 | 2376 | ||
2290 | #define d2i_ASN1_SET_OF_X509_ATTRIBUTE(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2377 | #define d2i_ASN1_SET_OF_X509_ATTRIBUTE(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2291 | SKM_ASN1_SET_OF_d2i(X509_ATTRIBUTE, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2378 | SKM_ASN1_SET_OF_d2i(X509_ATTRIBUTE, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2292 | #define i2d_ASN1_SET_OF_X509_ATTRIBUTE(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2379 | #define i2d_ASN1_SET_OF_X509_ATTRIBUTE(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2293 | SKM_ASN1_SET_OF_i2d(X509_ATTRIBUTE, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2380 | SKM_ASN1_SET_OF_i2d(X509_ATTRIBUTE, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2381 | #define ASN1_seq_pack_X509_ATTRIBUTE(st, i2d_func, buf, len) \ | ||
2382 | SKM_ASN1_seq_pack(X509_ATTRIBUTE, (st), (i2d_func), (buf), (len)) | ||
2383 | #define ASN1_seq_unpack_X509_ATTRIBUTE(buf, len, d2i_func, free_func) \ | ||
2384 | SKM_ASN1_seq_unpack(X509_ATTRIBUTE, (buf), (len), (d2i_func), (free_func)) | ||
2294 | 2385 | ||
2295 | #define d2i_ASN1_SET_OF_X509_CRL(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2386 | #define d2i_ASN1_SET_OF_X509_CRL(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2296 | SKM_ASN1_SET_OF_d2i(X509_CRL, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2387 | SKM_ASN1_SET_OF_d2i(X509_CRL, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2297 | #define i2d_ASN1_SET_OF_X509_CRL(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2388 | #define i2d_ASN1_SET_OF_X509_CRL(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2298 | SKM_ASN1_SET_OF_i2d(X509_CRL, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2389 | SKM_ASN1_SET_OF_i2d(X509_CRL, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2390 | #define ASN1_seq_pack_X509_CRL(st, i2d_func, buf, len) \ | ||
2391 | SKM_ASN1_seq_pack(X509_CRL, (st), (i2d_func), (buf), (len)) | ||
2392 | #define ASN1_seq_unpack_X509_CRL(buf, len, d2i_func, free_func) \ | ||
2393 | SKM_ASN1_seq_unpack(X509_CRL, (buf), (len), (d2i_func), (free_func)) | ||
2299 | 2394 | ||
2300 | #define d2i_ASN1_SET_OF_X509_EXTENSION(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2395 | #define d2i_ASN1_SET_OF_X509_EXTENSION(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2301 | SKM_ASN1_SET_OF_d2i(X509_EXTENSION, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2396 | SKM_ASN1_SET_OF_d2i(X509_EXTENSION, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2302 | #define i2d_ASN1_SET_OF_X509_EXTENSION(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2397 | #define i2d_ASN1_SET_OF_X509_EXTENSION(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2303 | SKM_ASN1_SET_OF_i2d(X509_EXTENSION, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2398 | SKM_ASN1_SET_OF_i2d(X509_EXTENSION, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2399 | #define ASN1_seq_pack_X509_EXTENSION(st, i2d_func, buf, len) \ | ||
2400 | SKM_ASN1_seq_pack(X509_EXTENSION, (st), (i2d_func), (buf), (len)) | ||
2401 | #define ASN1_seq_unpack_X509_EXTENSION(buf, len, d2i_func, free_func) \ | ||
2402 | SKM_ASN1_seq_unpack(X509_EXTENSION, (buf), (len), (d2i_func), (free_func)) | ||
2304 | 2403 | ||
2305 | #define d2i_ASN1_SET_OF_X509_NAME_ENTRY(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2404 | #define d2i_ASN1_SET_OF_X509_NAME_ENTRY(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2306 | SKM_ASN1_SET_OF_d2i(X509_NAME_ENTRY, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2405 | SKM_ASN1_SET_OF_d2i(X509_NAME_ENTRY, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2307 | #define i2d_ASN1_SET_OF_X509_NAME_ENTRY(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2406 | #define i2d_ASN1_SET_OF_X509_NAME_ENTRY(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2308 | SKM_ASN1_SET_OF_i2d(X509_NAME_ENTRY, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2407 | SKM_ASN1_SET_OF_i2d(X509_NAME_ENTRY, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2408 | #define ASN1_seq_pack_X509_NAME_ENTRY(st, i2d_func, buf, len) \ | ||
2409 | SKM_ASN1_seq_pack(X509_NAME_ENTRY, (st), (i2d_func), (buf), (len)) | ||
2410 | #define ASN1_seq_unpack_X509_NAME_ENTRY(buf, len, d2i_func, free_func) \ | ||
2411 | SKM_ASN1_seq_unpack(X509_NAME_ENTRY, (buf), (len), (d2i_func), (free_func)) | ||
2309 | 2412 | ||
2310 | #define d2i_ASN1_SET_OF_X509_REVOKED(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2413 | #define d2i_ASN1_SET_OF_X509_REVOKED(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2311 | SKM_ASN1_SET_OF_d2i(X509_REVOKED, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2414 | SKM_ASN1_SET_OF_d2i(X509_REVOKED, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2312 | #define i2d_ASN1_SET_OF_X509_REVOKED(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2415 | #define i2d_ASN1_SET_OF_X509_REVOKED(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2313 | SKM_ASN1_SET_OF_i2d(X509_REVOKED, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2416 | SKM_ASN1_SET_OF_i2d(X509_REVOKED, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2417 | #define ASN1_seq_pack_X509_REVOKED(st, i2d_func, buf, len) \ | ||
2418 | SKM_ASN1_seq_pack(X509_REVOKED, (st), (i2d_func), (buf), (len)) | ||
2419 | #define ASN1_seq_unpack_X509_REVOKED(buf, len, d2i_func, free_func) \ | ||
2420 | SKM_ASN1_seq_unpack(X509_REVOKED, (buf), (len), (d2i_func), (free_func)) | ||
2314 | 2421 | ||
2315 | #define PKCS12_decrypt_d2i_PKCS12_SAFEBAG(algor, d2i_func, free_func, pass, passlen, oct, seq) \ | 2422 | #define PKCS12_decrypt_d2i_PKCS12_SAFEBAG(algor, d2i_func, free_func, pass, passlen, oct, seq) \ |
2316 | SKM_PKCS12_decrypt_d2i(PKCS12_SAFEBAG, (algor), (d2i_func), (free_func), (pass), (passlen), (oct), (seq)) | 2423 | SKM_PKCS12_decrypt_d2i(PKCS12_SAFEBAG, (algor), (d2i_func), (free_func), (pass), (passlen), (oct), (seq)) |
diff --git a/src/lib/libssl/src/crypto/asn1/asn1.h b/src/lib/libssl/src/crypto/asn1/asn1.h index 176a3d5b82..78705da909 100644 --- a/src/lib/libssl/src/crypto/asn1/asn1.h +++ b/src/lib/libssl/src/crypto/asn1/asn1.h | |||
@@ -760,6 +760,10 @@ typedef struct BIT_STRING_BITNAME_st { | |||
760 | (ASN1_UTF8STRING *)d2i_ASN1_type_bytes\ | 760 | (ASN1_UTF8STRING *)d2i_ASN1_type_bytes\ |
761 | ((ASN1_STRING **)a,pp,l,B_ASN1_UTF8STRING) | 761 | ((ASN1_STRING **)a,pp,l,B_ASN1_UTF8STRING) |
762 | 762 | ||
763 | /* for the is_set parameter to i2d_ASN1_SET */ | ||
764 | #define IS_SEQUENCE 0 | ||
765 | #define IS_SET 1 | ||
766 | |||
763 | DECLARE_ASN1_FUNCTIONS_fname(ASN1_TYPE, ASN1_ANY, ASN1_TYPE) | 767 | DECLARE_ASN1_FUNCTIONS_fname(ASN1_TYPE, ASN1_ANY, ASN1_TYPE) |
764 | 768 | ||
765 | int ASN1_TYPE_get(ASN1_TYPE *a); | 769 | int ASN1_TYPE_get(ASN1_TYPE *a); |
@@ -1035,7 +1039,14 @@ int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num, | |||
1035 | int ASN1_TYPE_get_int_octetstring(ASN1_TYPE *a,long *num, | 1039 | int ASN1_TYPE_get_int_octetstring(ASN1_TYPE *a,long *num, |
1036 | unsigned char *data, int max_len); | 1040 | unsigned char *data, int max_len); |
1037 | 1041 | ||
1042 | STACK_OF(OPENSSL_BLOCK) *ASN1_seq_unpack(const unsigned char *buf, int len, | ||
1043 | d2i_of_void *d2i, void (*free_func)(OPENSSL_BLOCK)); | ||
1044 | unsigned char *ASN1_seq_pack(STACK_OF(OPENSSL_BLOCK) *safes, i2d_of_void *i2d, | ||
1045 | unsigned char **buf, int *len ); | ||
1046 | void *ASN1_unpack_string(ASN1_STRING *oct, d2i_of_void *d2i); | ||
1038 | void *ASN1_item_unpack(ASN1_STRING *oct, const ASN1_ITEM *it); | 1047 | void *ASN1_item_unpack(ASN1_STRING *oct, const ASN1_ITEM *it); |
1048 | ASN1_STRING *ASN1_pack_string(void *obj, i2d_of_void *i2d, | ||
1049 | ASN1_OCTET_STRING **oct); | ||
1039 | 1050 | ||
1040 | ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it, ASN1_OCTET_STRING **oct); | 1051 | ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it, ASN1_OCTET_STRING **oct); |
1041 | 1052 | ||
diff --git a/src/lib/libssl/src/crypto/asn1/asn_pack.c b/src/lib/libssl/src/crypto/asn1/asn_pack.c index 9752a68206..8eb39e6a9b 100644 --- a/src/lib/libssl/src/crypto/asn1/asn_pack.c +++ b/src/lib/libssl/src/crypto/asn1/asn_pack.c | |||
@@ -60,6 +60,103 @@ | |||
60 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
61 | #include <openssl/asn1.h> | 61 | #include <openssl/asn1.h> |
62 | 62 | ||
63 | #ifndef NO_ASN1_OLD | ||
64 | |||
65 | /* ASN1 packing and unpacking functions */ | ||
66 | |||
67 | /* Turn an ASN1 encoded SEQUENCE OF into a STACK of structures */ | ||
68 | |||
69 | STACK_OF(OPENSSL_BLOCK) * | ||
70 | ASN1_seq_unpack(const unsigned char *buf, int len, d2i_of_void *d2i, | ||
71 | void (*free_func)(OPENSSL_BLOCK)) | ||
72 | { | ||
73 | STACK_OF(OPENSSL_BLOCK) *sk; | ||
74 | const unsigned char *pbuf; | ||
75 | |||
76 | pbuf = buf; | ||
77 | if (!(sk = d2i_ASN1_SET(NULL, &pbuf, len, d2i, free_func, | ||
78 | V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL))) | ||
79 | ASN1err(ASN1_F_ASN1_SEQ_UNPACK,ASN1_R_DECODE_ERROR); | ||
80 | return sk; | ||
81 | } | ||
82 | |||
83 | /* Turn a STACK structures into an ASN1 encoded SEQUENCE OF structure in a | ||
84 | * OPENSSL_malloc'ed buffer | ||
85 | */ | ||
86 | |||
87 | unsigned char * | ||
88 | ASN1_seq_pack(STACK_OF(OPENSSL_BLOCK) *safes, i2d_of_void *i2d, | ||
89 | unsigned char **buf, int *len) | ||
90 | { | ||
91 | int safelen; | ||
92 | unsigned char *safe, *p; | ||
93 | |||
94 | if (!(safelen = i2d_ASN1_SET(safes, NULL, i2d, V_ASN1_SEQUENCE, | ||
95 | V_ASN1_UNIVERSAL, IS_SEQUENCE))) { | ||
96 | ASN1err(ASN1_F_ASN1_SEQ_PACK,ASN1_R_ENCODE_ERROR); | ||
97 | return NULL; | ||
98 | } | ||
99 | if (!(safe = malloc(safelen))) { | ||
100 | ASN1err(ASN1_F_ASN1_SEQ_PACK,ERR_R_MALLOC_FAILURE); | ||
101 | return NULL; | ||
102 | } | ||
103 | p = safe; | ||
104 | i2d_ASN1_SET(safes, &p, i2d, V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL, | ||
105 | IS_SEQUENCE); | ||
106 | if (len) | ||
107 | *len = safelen; | ||
108 | if (buf) | ||
109 | *buf = safe; | ||
110 | return safe; | ||
111 | } | ||
112 | |||
113 | /* Extract an ASN1 object from an ASN1_STRING */ | ||
114 | |||
115 | void * | ||
116 | ASN1_unpack_string(ASN1_STRING *oct, d2i_of_void *d2i) | ||
117 | { | ||
118 | const unsigned char *p; | ||
119 | char *ret; | ||
120 | |||
121 | p = oct->data; | ||
122 | if (!(ret = d2i(NULL, &p, oct->length))) | ||
123 | ASN1err(ASN1_F_ASN1_UNPACK_STRING,ASN1_R_DECODE_ERROR); | ||
124 | return ret; | ||
125 | } | ||
126 | |||
127 | /* Pack an ASN1 object into an ASN1_STRING */ | ||
128 | |||
129 | ASN1_STRING * | ||
130 | ASN1_pack_string(void *obj, i2d_of_void *i2d, ASN1_STRING **oct) | ||
131 | { | ||
132 | unsigned char *p; | ||
133 | ASN1_STRING *octmp; | ||
134 | |||
135 | if (!oct || !*oct) { | ||
136 | if (!(octmp = ASN1_STRING_new())) { | ||
137 | ASN1err(ASN1_F_ASN1_PACK_STRING,ERR_R_MALLOC_FAILURE); | ||
138 | return NULL; | ||
139 | } | ||
140 | if (oct) | ||
141 | *oct = octmp; | ||
142 | } else | ||
143 | octmp = *oct; | ||
144 | |||
145 | if (!(octmp->length = i2d(obj, NULL))) { | ||
146 | ASN1err(ASN1_F_ASN1_PACK_STRING,ASN1_R_ENCODE_ERROR); | ||
147 | return NULL; | ||
148 | } | ||
149 | if (!(p = malloc (octmp->length))) { | ||
150 | ASN1err(ASN1_F_ASN1_PACK_STRING,ERR_R_MALLOC_FAILURE); | ||
151 | return NULL; | ||
152 | } | ||
153 | octmp->data = p; | ||
154 | i2d (obj, &p); | ||
155 | return octmp; | ||
156 | } | ||
157 | |||
158 | #endif | ||
159 | |||
63 | /* ASN1_ITEM versions of the above */ | 160 | /* ASN1_ITEM versions of the above */ |
64 | 161 | ||
65 | ASN1_STRING * | 162 | ASN1_STRING * |
diff --git a/src/lib/libssl/src/crypto/stack/safestack.h b/src/lib/libssl/src/crypto/stack/safestack.h index f2a36fd64b..ea3aa0d800 100644 --- a/src/lib/libssl/src/crypto/stack/safestack.h +++ b/src/lib/libssl/src/crypto/stack/safestack.h | |||
@@ -191,6 +191,13 @@ DECLARE_SPECIAL_STACK_OF(OPENSSL_BLOCK, void) | |||
191 | CHECKED_I2D_OF(type, i2d_func), \ | 191 | CHECKED_I2D_OF(type, i2d_func), \ |
192 | ex_tag, ex_class, is_set) | 192 | ex_tag, ex_class, is_set) |
193 | 193 | ||
194 | #define SKM_ASN1_seq_pack(type, st, i2d_func, buf, len) \ | ||
195 | ASN1_seq_pack(CHECKED_PTR_OF(STACK_OF(type), st), \ | ||
196 | CHECKED_I2D_OF(type, i2d_func), buf, len) | ||
197 | |||
198 | #define SKM_ASN1_seq_unpack(type, buf, len, d2i_func, free_func) \ | ||
199 | (STACK_OF(type) *)ASN1_seq_unpack(buf, len, CHECKED_D2I_OF(type, d2i_func), CHECKED_SK_FREE_FUNC(type, free_func)) | ||
200 | |||
194 | #define SKM_PKCS12_decrypt_d2i(type, algor, d2i_func, free_func, pass, passlen, oct, seq) \ | 201 | #define SKM_PKCS12_decrypt_d2i(type, algor, d2i_func, free_func, pass, passlen, oct, seq) \ |
195 | (STACK_OF(type) *)PKCS12_decrypt_d2i(algor, \ | 202 | (STACK_OF(type) *)PKCS12_decrypt_d2i(algor, \ |
196 | CHECKED_D2I_OF(type, d2i_func), \ | 203 | CHECKED_D2I_OF(type, d2i_func), \ |
@@ -2191,126 +2198,226 @@ DECLARE_SPECIAL_STACK_OF(OPENSSL_BLOCK, void) | |||
2191 | SKM_ASN1_SET_OF_d2i(ACCESS_DESCRIPTION, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2198 | SKM_ASN1_SET_OF_d2i(ACCESS_DESCRIPTION, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2192 | #define i2d_ASN1_SET_OF_ACCESS_DESCRIPTION(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2199 | #define i2d_ASN1_SET_OF_ACCESS_DESCRIPTION(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2193 | SKM_ASN1_SET_OF_i2d(ACCESS_DESCRIPTION, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2200 | SKM_ASN1_SET_OF_i2d(ACCESS_DESCRIPTION, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2201 | #define ASN1_seq_pack_ACCESS_DESCRIPTION(st, i2d_func, buf, len) \ | ||
2202 | SKM_ASN1_seq_pack(ACCESS_DESCRIPTION, (st), (i2d_func), (buf), (len)) | ||
2203 | #define ASN1_seq_unpack_ACCESS_DESCRIPTION(buf, len, d2i_func, free_func) \ | ||
2204 | SKM_ASN1_seq_unpack(ACCESS_DESCRIPTION, (buf), (len), (d2i_func), (free_func)) | ||
2194 | 2205 | ||
2195 | #define d2i_ASN1_SET_OF_ASN1_INTEGER(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2206 | #define d2i_ASN1_SET_OF_ASN1_INTEGER(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2196 | SKM_ASN1_SET_OF_d2i(ASN1_INTEGER, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2207 | SKM_ASN1_SET_OF_d2i(ASN1_INTEGER, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2197 | #define i2d_ASN1_SET_OF_ASN1_INTEGER(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2208 | #define i2d_ASN1_SET_OF_ASN1_INTEGER(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2198 | SKM_ASN1_SET_OF_i2d(ASN1_INTEGER, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2209 | SKM_ASN1_SET_OF_i2d(ASN1_INTEGER, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2210 | #define ASN1_seq_pack_ASN1_INTEGER(st, i2d_func, buf, len) \ | ||
2211 | SKM_ASN1_seq_pack(ASN1_INTEGER, (st), (i2d_func), (buf), (len)) | ||
2212 | #define ASN1_seq_unpack_ASN1_INTEGER(buf, len, d2i_func, free_func) \ | ||
2213 | SKM_ASN1_seq_unpack(ASN1_INTEGER, (buf), (len), (d2i_func), (free_func)) | ||
2199 | 2214 | ||
2200 | #define d2i_ASN1_SET_OF_ASN1_OBJECT(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2215 | #define d2i_ASN1_SET_OF_ASN1_OBJECT(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2201 | SKM_ASN1_SET_OF_d2i(ASN1_OBJECT, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2216 | SKM_ASN1_SET_OF_d2i(ASN1_OBJECT, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2202 | #define i2d_ASN1_SET_OF_ASN1_OBJECT(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2217 | #define i2d_ASN1_SET_OF_ASN1_OBJECT(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2203 | SKM_ASN1_SET_OF_i2d(ASN1_OBJECT, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2218 | SKM_ASN1_SET_OF_i2d(ASN1_OBJECT, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2219 | #define ASN1_seq_pack_ASN1_OBJECT(st, i2d_func, buf, len) \ | ||
2220 | SKM_ASN1_seq_pack(ASN1_OBJECT, (st), (i2d_func), (buf), (len)) | ||
2221 | #define ASN1_seq_unpack_ASN1_OBJECT(buf, len, d2i_func, free_func) \ | ||
2222 | SKM_ASN1_seq_unpack(ASN1_OBJECT, (buf), (len), (d2i_func), (free_func)) | ||
2204 | 2223 | ||
2205 | #define d2i_ASN1_SET_OF_ASN1_TYPE(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2224 | #define d2i_ASN1_SET_OF_ASN1_TYPE(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2206 | SKM_ASN1_SET_OF_d2i(ASN1_TYPE, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2225 | SKM_ASN1_SET_OF_d2i(ASN1_TYPE, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2207 | #define i2d_ASN1_SET_OF_ASN1_TYPE(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2226 | #define i2d_ASN1_SET_OF_ASN1_TYPE(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2208 | SKM_ASN1_SET_OF_i2d(ASN1_TYPE, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2227 | SKM_ASN1_SET_OF_i2d(ASN1_TYPE, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2228 | #define ASN1_seq_pack_ASN1_TYPE(st, i2d_func, buf, len) \ | ||
2229 | SKM_ASN1_seq_pack(ASN1_TYPE, (st), (i2d_func), (buf), (len)) | ||
2230 | #define ASN1_seq_unpack_ASN1_TYPE(buf, len, d2i_func, free_func) \ | ||
2231 | SKM_ASN1_seq_unpack(ASN1_TYPE, (buf), (len), (d2i_func), (free_func)) | ||
2209 | 2232 | ||
2210 | #define d2i_ASN1_SET_OF_ASN1_UTF8STRING(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2233 | #define d2i_ASN1_SET_OF_ASN1_UTF8STRING(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2211 | SKM_ASN1_SET_OF_d2i(ASN1_UTF8STRING, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2234 | SKM_ASN1_SET_OF_d2i(ASN1_UTF8STRING, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2212 | #define i2d_ASN1_SET_OF_ASN1_UTF8STRING(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2235 | #define i2d_ASN1_SET_OF_ASN1_UTF8STRING(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2213 | SKM_ASN1_SET_OF_i2d(ASN1_UTF8STRING, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2236 | SKM_ASN1_SET_OF_i2d(ASN1_UTF8STRING, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2237 | #define ASN1_seq_pack_ASN1_UTF8STRING(st, i2d_func, buf, len) \ | ||
2238 | SKM_ASN1_seq_pack(ASN1_UTF8STRING, (st), (i2d_func), (buf), (len)) | ||
2239 | #define ASN1_seq_unpack_ASN1_UTF8STRING(buf, len, d2i_func, free_func) \ | ||
2240 | SKM_ASN1_seq_unpack(ASN1_UTF8STRING, (buf), (len), (d2i_func), (free_func)) | ||
2214 | 2241 | ||
2215 | #define d2i_ASN1_SET_OF_DIST_POINT(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2242 | #define d2i_ASN1_SET_OF_DIST_POINT(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2216 | SKM_ASN1_SET_OF_d2i(DIST_POINT, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2243 | SKM_ASN1_SET_OF_d2i(DIST_POINT, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2217 | #define i2d_ASN1_SET_OF_DIST_POINT(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2244 | #define i2d_ASN1_SET_OF_DIST_POINT(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2218 | SKM_ASN1_SET_OF_i2d(DIST_POINT, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2245 | SKM_ASN1_SET_OF_i2d(DIST_POINT, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2246 | #define ASN1_seq_pack_DIST_POINT(st, i2d_func, buf, len) \ | ||
2247 | SKM_ASN1_seq_pack(DIST_POINT, (st), (i2d_func), (buf), (len)) | ||
2248 | #define ASN1_seq_unpack_DIST_POINT(buf, len, d2i_func, free_func) \ | ||
2249 | SKM_ASN1_seq_unpack(DIST_POINT, (buf), (len), (d2i_func), (free_func)) | ||
2219 | 2250 | ||
2220 | #define d2i_ASN1_SET_OF_ESS_CERT_ID(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2251 | #define d2i_ASN1_SET_OF_ESS_CERT_ID(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2221 | SKM_ASN1_SET_OF_d2i(ESS_CERT_ID, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2252 | SKM_ASN1_SET_OF_d2i(ESS_CERT_ID, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2222 | #define i2d_ASN1_SET_OF_ESS_CERT_ID(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2253 | #define i2d_ASN1_SET_OF_ESS_CERT_ID(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2223 | SKM_ASN1_SET_OF_i2d(ESS_CERT_ID, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2254 | SKM_ASN1_SET_OF_i2d(ESS_CERT_ID, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2255 | #define ASN1_seq_pack_ESS_CERT_ID(st, i2d_func, buf, len) \ | ||
2256 | SKM_ASN1_seq_pack(ESS_CERT_ID, (st), (i2d_func), (buf), (len)) | ||
2257 | #define ASN1_seq_unpack_ESS_CERT_ID(buf, len, d2i_func, free_func) \ | ||
2258 | SKM_ASN1_seq_unpack(ESS_CERT_ID, (buf), (len), (d2i_func), (free_func)) | ||
2224 | 2259 | ||
2225 | #define d2i_ASN1_SET_OF_EVP_MD(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2260 | #define d2i_ASN1_SET_OF_EVP_MD(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2226 | SKM_ASN1_SET_OF_d2i(EVP_MD, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2261 | SKM_ASN1_SET_OF_d2i(EVP_MD, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2227 | #define i2d_ASN1_SET_OF_EVP_MD(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2262 | #define i2d_ASN1_SET_OF_EVP_MD(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2228 | SKM_ASN1_SET_OF_i2d(EVP_MD, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2263 | SKM_ASN1_SET_OF_i2d(EVP_MD, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2264 | #define ASN1_seq_pack_EVP_MD(st, i2d_func, buf, len) \ | ||
2265 | SKM_ASN1_seq_pack(EVP_MD, (st), (i2d_func), (buf), (len)) | ||
2266 | #define ASN1_seq_unpack_EVP_MD(buf, len, d2i_func, free_func) \ | ||
2267 | SKM_ASN1_seq_unpack(EVP_MD, (buf), (len), (d2i_func), (free_func)) | ||
2229 | 2268 | ||
2230 | #define d2i_ASN1_SET_OF_GENERAL_NAME(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2269 | #define d2i_ASN1_SET_OF_GENERAL_NAME(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2231 | SKM_ASN1_SET_OF_d2i(GENERAL_NAME, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2270 | SKM_ASN1_SET_OF_d2i(GENERAL_NAME, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2232 | #define i2d_ASN1_SET_OF_GENERAL_NAME(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2271 | #define i2d_ASN1_SET_OF_GENERAL_NAME(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2233 | SKM_ASN1_SET_OF_i2d(GENERAL_NAME, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2272 | SKM_ASN1_SET_OF_i2d(GENERAL_NAME, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2273 | #define ASN1_seq_pack_GENERAL_NAME(st, i2d_func, buf, len) \ | ||
2274 | SKM_ASN1_seq_pack(GENERAL_NAME, (st), (i2d_func), (buf), (len)) | ||
2275 | #define ASN1_seq_unpack_GENERAL_NAME(buf, len, d2i_func, free_func) \ | ||
2276 | SKM_ASN1_seq_unpack(GENERAL_NAME, (buf), (len), (d2i_func), (free_func)) | ||
2234 | 2277 | ||
2235 | #define d2i_ASN1_SET_OF_OCSP_ONEREQ(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2278 | #define d2i_ASN1_SET_OF_OCSP_ONEREQ(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2236 | SKM_ASN1_SET_OF_d2i(OCSP_ONEREQ, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2279 | SKM_ASN1_SET_OF_d2i(OCSP_ONEREQ, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2237 | #define i2d_ASN1_SET_OF_OCSP_ONEREQ(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2280 | #define i2d_ASN1_SET_OF_OCSP_ONEREQ(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2238 | SKM_ASN1_SET_OF_i2d(OCSP_ONEREQ, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2281 | SKM_ASN1_SET_OF_i2d(OCSP_ONEREQ, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2282 | #define ASN1_seq_pack_OCSP_ONEREQ(st, i2d_func, buf, len) \ | ||
2283 | SKM_ASN1_seq_pack(OCSP_ONEREQ, (st), (i2d_func), (buf), (len)) | ||
2284 | #define ASN1_seq_unpack_OCSP_ONEREQ(buf, len, d2i_func, free_func) \ | ||
2285 | SKM_ASN1_seq_unpack(OCSP_ONEREQ, (buf), (len), (d2i_func), (free_func)) | ||
2239 | 2286 | ||
2240 | #define d2i_ASN1_SET_OF_OCSP_SINGLERESP(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2287 | #define d2i_ASN1_SET_OF_OCSP_SINGLERESP(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2241 | SKM_ASN1_SET_OF_d2i(OCSP_SINGLERESP, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2288 | SKM_ASN1_SET_OF_d2i(OCSP_SINGLERESP, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2242 | #define i2d_ASN1_SET_OF_OCSP_SINGLERESP(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2289 | #define i2d_ASN1_SET_OF_OCSP_SINGLERESP(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2243 | SKM_ASN1_SET_OF_i2d(OCSP_SINGLERESP, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2290 | SKM_ASN1_SET_OF_i2d(OCSP_SINGLERESP, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2291 | #define ASN1_seq_pack_OCSP_SINGLERESP(st, i2d_func, buf, len) \ | ||
2292 | SKM_ASN1_seq_pack(OCSP_SINGLERESP, (st), (i2d_func), (buf), (len)) | ||
2293 | #define ASN1_seq_unpack_OCSP_SINGLERESP(buf, len, d2i_func, free_func) \ | ||
2294 | SKM_ASN1_seq_unpack(OCSP_SINGLERESP, (buf), (len), (d2i_func), (free_func)) | ||
2244 | 2295 | ||
2245 | #define d2i_ASN1_SET_OF_PKCS12_SAFEBAG(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2296 | #define d2i_ASN1_SET_OF_PKCS12_SAFEBAG(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2246 | SKM_ASN1_SET_OF_d2i(PKCS12_SAFEBAG, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2297 | SKM_ASN1_SET_OF_d2i(PKCS12_SAFEBAG, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2247 | #define i2d_ASN1_SET_OF_PKCS12_SAFEBAG(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2298 | #define i2d_ASN1_SET_OF_PKCS12_SAFEBAG(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2248 | SKM_ASN1_SET_OF_i2d(PKCS12_SAFEBAG, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2299 | SKM_ASN1_SET_OF_i2d(PKCS12_SAFEBAG, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2300 | #define ASN1_seq_pack_PKCS12_SAFEBAG(st, i2d_func, buf, len) \ | ||
2301 | SKM_ASN1_seq_pack(PKCS12_SAFEBAG, (st), (i2d_func), (buf), (len)) | ||
2302 | #define ASN1_seq_unpack_PKCS12_SAFEBAG(buf, len, d2i_func, free_func) \ | ||
2303 | SKM_ASN1_seq_unpack(PKCS12_SAFEBAG, (buf), (len), (d2i_func), (free_func)) | ||
2249 | 2304 | ||
2250 | #define d2i_ASN1_SET_OF_PKCS7(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2305 | #define d2i_ASN1_SET_OF_PKCS7(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2251 | SKM_ASN1_SET_OF_d2i(PKCS7, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2306 | SKM_ASN1_SET_OF_d2i(PKCS7, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2252 | #define i2d_ASN1_SET_OF_PKCS7(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2307 | #define i2d_ASN1_SET_OF_PKCS7(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2253 | SKM_ASN1_SET_OF_i2d(PKCS7, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2308 | SKM_ASN1_SET_OF_i2d(PKCS7, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2309 | #define ASN1_seq_pack_PKCS7(st, i2d_func, buf, len) \ | ||
2310 | SKM_ASN1_seq_pack(PKCS7, (st), (i2d_func), (buf), (len)) | ||
2311 | #define ASN1_seq_unpack_PKCS7(buf, len, d2i_func, free_func) \ | ||
2312 | SKM_ASN1_seq_unpack(PKCS7, (buf), (len), (d2i_func), (free_func)) | ||
2254 | 2313 | ||
2255 | #define d2i_ASN1_SET_OF_PKCS7_RECIP_INFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2314 | #define d2i_ASN1_SET_OF_PKCS7_RECIP_INFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2256 | SKM_ASN1_SET_OF_d2i(PKCS7_RECIP_INFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2315 | SKM_ASN1_SET_OF_d2i(PKCS7_RECIP_INFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2257 | #define i2d_ASN1_SET_OF_PKCS7_RECIP_INFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2316 | #define i2d_ASN1_SET_OF_PKCS7_RECIP_INFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2258 | SKM_ASN1_SET_OF_i2d(PKCS7_RECIP_INFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2317 | SKM_ASN1_SET_OF_i2d(PKCS7_RECIP_INFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2318 | #define ASN1_seq_pack_PKCS7_RECIP_INFO(st, i2d_func, buf, len) \ | ||
2319 | SKM_ASN1_seq_pack(PKCS7_RECIP_INFO, (st), (i2d_func), (buf), (len)) | ||
2320 | #define ASN1_seq_unpack_PKCS7_RECIP_INFO(buf, len, d2i_func, free_func) \ | ||
2321 | SKM_ASN1_seq_unpack(PKCS7_RECIP_INFO, (buf), (len), (d2i_func), (free_func)) | ||
2259 | 2322 | ||
2260 | #define d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2323 | #define d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2261 | SKM_ASN1_SET_OF_d2i(PKCS7_SIGNER_INFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2324 | SKM_ASN1_SET_OF_d2i(PKCS7_SIGNER_INFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2262 | #define i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2325 | #define i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2263 | SKM_ASN1_SET_OF_i2d(PKCS7_SIGNER_INFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2326 | SKM_ASN1_SET_OF_i2d(PKCS7_SIGNER_INFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2327 | #define ASN1_seq_pack_PKCS7_SIGNER_INFO(st, i2d_func, buf, len) \ | ||
2328 | SKM_ASN1_seq_pack(PKCS7_SIGNER_INFO, (st), (i2d_func), (buf), (len)) | ||
2329 | #define ASN1_seq_unpack_PKCS7_SIGNER_INFO(buf, len, d2i_func, free_func) \ | ||
2330 | SKM_ASN1_seq_unpack(PKCS7_SIGNER_INFO, (buf), (len), (d2i_func), (free_func)) | ||
2264 | 2331 | ||
2265 | #define d2i_ASN1_SET_OF_POLICYINFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2332 | #define d2i_ASN1_SET_OF_POLICYINFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2266 | SKM_ASN1_SET_OF_d2i(POLICYINFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2333 | SKM_ASN1_SET_OF_d2i(POLICYINFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2267 | #define i2d_ASN1_SET_OF_POLICYINFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2334 | #define i2d_ASN1_SET_OF_POLICYINFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2268 | SKM_ASN1_SET_OF_i2d(POLICYINFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2335 | SKM_ASN1_SET_OF_i2d(POLICYINFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2336 | #define ASN1_seq_pack_POLICYINFO(st, i2d_func, buf, len) \ | ||
2337 | SKM_ASN1_seq_pack(POLICYINFO, (st), (i2d_func), (buf), (len)) | ||
2338 | #define ASN1_seq_unpack_POLICYINFO(buf, len, d2i_func, free_func) \ | ||
2339 | SKM_ASN1_seq_unpack(POLICYINFO, (buf), (len), (d2i_func), (free_func)) | ||
2269 | 2340 | ||
2270 | #define d2i_ASN1_SET_OF_POLICYQUALINFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2341 | #define d2i_ASN1_SET_OF_POLICYQUALINFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2271 | SKM_ASN1_SET_OF_d2i(POLICYQUALINFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2342 | SKM_ASN1_SET_OF_d2i(POLICYQUALINFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2272 | #define i2d_ASN1_SET_OF_POLICYQUALINFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2343 | #define i2d_ASN1_SET_OF_POLICYQUALINFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2273 | SKM_ASN1_SET_OF_i2d(POLICYQUALINFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2344 | SKM_ASN1_SET_OF_i2d(POLICYQUALINFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2345 | #define ASN1_seq_pack_POLICYQUALINFO(st, i2d_func, buf, len) \ | ||
2346 | SKM_ASN1_seq_pack(POLICYQUALINFO, (st), (i2d_func), (buf), (len)) | ||
2347 | #define ASN1_seq_unpack_POLICYQUALINFO(buf, len, d2i_func, free_func) \ | ||
2348 | SKM_ASN1_seq_unpack(POLICYQUALINFO, (buf), (len), (d2i_func), (free_func)) | ||
2274 | 2349 | ||
2275 | #define d2i_ASN1_SET_OF_SXNETID(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2350 | #define d2i_ASN1_SET_OF_SXNETID(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2276 | SKM_ASN1_SET_OF_d2i(SXNETID, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2351 | SKM_ASN1_SET_OF_d2i(SXNETID, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2277 | #define i2d_ASN1_SET_OF_SXNETID(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2352 | #define i2d_ASN1_SET_OF_SXNETID(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2278 | SKM_ASN1_SET_OF_i2d(SXNETID, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2353 | SKM_ASN1_SET_OF_i2d(SXNETID, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2354 | #define ASN1_seq_pack_SXNETID(st, i2d_func, buf, len) \ | ||
2355 | SKM_ASN1_seq_pack(SXNETID, (st), (i2d_func), (buf), (len)) | ||
2356 | #define ASN1_seq_unpack_SXNETID(buf, len, d2i_func, free_func) \ | ||
2357 | SKM_ASN1_seq_unpack(SXNETID, (buf), (len), (d2i_func), (free_func)) | ||
2279 | 2358 | ||
2280 | #define d2i_ASN1_SET_OF_X509(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2359 | #define d2i_ASN1_SET_OF_X509(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2281 | SKM_ASN1_SET_OF_d2i(X509, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2360 | SKM_ASN1_SET_OF_d2i(X509, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2282 | #define i2d_ASN1_SET_OF_X509(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2361 | #define i2d_ASN1_SET_OF_X509(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2283 | SKM_ASN1_SET_OF_i2d(X509, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2362 | SKM_ASN1_SET_OF_i2d(X509, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2363 | #define ASN1_seq_pack_X509(st, i2d_func, buf, len) \ | ||
2364 | SKM_ASN1_seq_pack(X509, (st), (i2d_func), (buf), (len)) | ||
2365 | #define ASN1_seq_unpack_X509(buf, len, d2i_func, free_func) \ | ||
2366 | SKM_ASN1_seq_unpack(X509, (buf), (len), (d2i_func), (free_func)) | ||
2284 | 2367 | ||
2285 | #define d2i_ASN1_SET_OF_X509_ALGOR(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2368 | #define d2i_ASN1_SET_OF_X509_ALGOR(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2286 | SKM_ASN1_SET_OF_d2i(X509_ALGOR, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2369 | SKM_ASN1_SET_OF_d2i(X509_ALGOR, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2287 | #define i2d_ASN1_SET_OF_X509_ALGOR(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2370 | #define i2d_ASN1_SET_OF_X509_ALGOR(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2288 | SKM_ASN1_SET_OF_i2d(X509_ALGOR, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2371 | SKM_ASN1_SET_OF_i2d(X509_ALGOR, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2372 | #define ASN1_seq_pack_X509_ALGOR(st, i2d_func, buf, len) \ | ||
2373 | SKM_ASN1_seq_pack(X509_ALGOR, (st), (i2d_func), (buf), (len)) | ||
2374 | #define ASN1_seq_unpack_X509_ALGOR(buf, len, d2i_func, free_func) \ | ||
2375 | SKM_ASN1_seq_unpack(X509_ALGOR, (buf), (len), (d2i_func), (free_func)) | ||
2289 | 2376 | ||
2290 | #define d2i_ASN1_SET_OF_X509_ATTRIBUTE(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2377 | #define d2i_ASN1_SET_OF_X509_ATTRIBUTE(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2291 | SKM_ASN1_SET_OF_d2i(X509_ATTRIBUTE, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2378 | SKM_ASN1_SET_OF_d2i(X509_ATTRIBUTE, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2292 | #define i2d_ASN1_SET_OF_X509_ATTRIBUTE(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2379 | #define i2d_ASN1_SET_OF_X509_ATTRIBUTE(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2293 | SKM_ASN1_SET_OF_i2d(X509_ATTRIBUTE, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2380 | SKM_ASN1_SET_OF_i2d(X509_ATTRIBUTE, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2381 | #define ASN1_seq_pack_X509_ATTRIBUTE(st, i2d_func, buf, len) \ | ||
2382 | SKM_ASN1_seq_pack(X509_ATTRIBUTE, (st), (i2d_func), (buf), (len)) | ||
2383 | #define ASN1_seq_unpack_X509_ATTRIBUTE(buf, len, d2i_func, free_func) \ | ||
2384 | SKM_ASN1_seq_unpack(X509_ATTRIBUTE, (buf), (len), (d2i_func), (free_func)) | ||
2294 | 2385 | ||
2295 | #define d2i_ASN1_SET_OF_X509_CRL(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2386 | #define d2i_ASN1_SET_OF_X509_CRL(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2296 | SKM_ASN1_SET_OF_d2i(X509_CRL, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2387 | SKM_ASN1_SET_OF_d2i(X509_CRL, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2297 | #define i2d_ASN1_SET_OF_X509_CRL(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2388 | #define i2d_ASN1_SET_OF_X509_CRL(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2298 | SKM_ASN1_SET_OF_i2d(X509_CRL, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2389 | SKM_ASN1_SET_OF_i2d(X509_CRL, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2390 | #define ASN1_seq_pack_X509_CRL(st, i2d_func, buf, len) \ | ||
2391 | SKM_ASN1_seq_pack(X509_CRL, (st), (i2d_func), (buf), (len)) | ||
2392 | #define ASN1_seq_unpack_X509_CRL(buf, len, d2i_func, free_func) \ | ||
2393 | SKM_ASN1_seq_unpack(X509_CRL, (buf), (len), (d2i_func), (free_func)) | ||
2299 | 2394 | ||
2300 | #define d2i_ASN1_SET_OF_X509_EXTENSION(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2395 | #define d2i_ASN1_SET_OF_X509_EXTENSION(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2301 | SKM_ASN1_SET_OF_d2i(X509_EXTENSION, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2396 | SKM_ASN1_SET_OF_d2i(X509_EXTENSION, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2302 | #define i2d_ASN1_SET_OF_X509_EXTENSION(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2397 | #define i2d_ASN1_SET_OF_X509_EXTENSION(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2303 | SKM_ASN1_SET_OF_i2d(X509_EXTENSION, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2398 | SKM_ASN1_SET_OF_i2d(X509_EXTENSION, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2399 | #define ASN1_seq_pack_X509_EXTENSION(st, i2d_func, buf, len) \ | ||
2400 | SKM_ASN1_seq_pack(X509_EXTENSION, (st), (i2d_func), (buf), (len)) | ||
2401 | #define ASN1_seq_unpack_X509_EXTENSION(buf, len, d2i_func, free_func) \ | ||
2402 | SKM_ASN1_seq_unpack(X509_EXTENSION, (buf), (len), (d2i_func), (free_func)) | ||
2304 | 2403 | ||
2305 | #define d2i_ASN1_SET_OF_X509_NAME_ENTRY(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2404 | #define d2i_ASN1_SET_OF_X509_NAME_ENTRY(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2306 | SKM_ASN1_SET_OF_d2i(X509_NAME_ENTRY, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2405 | SKM_ASN1_SET_OF_d2i(X509_NAME_ENTRY, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2307 | #define i2d_ASN1_SET_OF_X509_NAME_ENTRY(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2406 | #define i2d_ASN1_SET_OF_X509_NAME_ENTRY(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2308 | SKM_ASN1_SET_OF_i2d(X509_NAME_ENTRY, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2407 | SKM_ASN1_SET_OF_i2d(X509_NAME_ENTRY, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2408 | #define ASN1_seq_pack_X509_NAME_ENTRY(st, i2d_func, buf, len) \ | ||
2409 | SKM_ASN1_seq_pack(X509_NAME_ENTRY, (st), (i2d_func), (buf), (len)) | ||
2410 | #define ASN1_seq_unpack_X509_NAME_ENTRY(buf, len, d2i_func, free_func) \ | ||
2411 | SKM_ASN1_seq_unpack(X509_NAME_ENTRY, (buf), (len), (d2i_func), (free_func)) | ||
2309 | 2412 | ||
2310 | #define d2i_ASN1_SET_OF_X509_REVOKED(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ | 2413 | #define d2i_ASN1_SET_OF_X509_REVOKED(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \ |
2311 | SKM_ASN1_SET_OF_d2i(X509_REVOKED, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) | 2414 | SKM_ASN1_SET_OF_d2i(X509_REVOKED, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class)) |
2312 | #define i2d_ASN1_SET_OF_X509_REVOKED(st, pp, i2d_func, ex_tag, ex_class, is_set) \ | 2415 | #define i2d_ASN1_SET_OF_X509_REVOKED(st, pp, i2d_func, ex_tag, ex_class, is_set) \ |
2313 | SKM_ASN1_SET_OF_i2d(X509_REVOKED, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) | 2416 | SKM_ASN1_SET_OF_i2d(X509_REVOKED, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set)) |
2417 | #define ASN1_seq_pack_X509_REVOKED(st, i2d_func, buf, len) \ | ||
2418 | SKM_ASN1_seq_pack(X509_REVOKED, (st), (i2d_func), (buf), (len)) | ||
2419 | #define ASN1_seq_unpack_X509_REVOKED(buf, len, d2i_func, free_func) \ | ||
2420 | SKM_ASN1_seq_unpack(X509_REVOKED, (buf), (len), (d2i_func), (free_func)) | ||
2314 | 2421 | ||
2315 | #define PKCS12_decrypt_d2i_PKCS12_SAFEBAG(algor, d2i_func, free_func, pass, passlen, oct, seq) \ | 2422 | #define PKCS12_decrypt_d2i_PKCS12_SAFEBAG(algor, d2i_func, free_func, pass, passlen, oct, seq) \ |
2316 | SKM_PKCS12_decrypt_d2i(PKCS12_SAFEBAG, (algor), (d2i_func), (free_func), (pass), (passlen), (oct), (seq)) | 2423 | SKM_PKCS12_decrypt_d2i(PKCS12_SAFEBAG, (algor), (d2i_func), (free_func), (pass), (passlen), (oct), (seq)) |