source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/msasn1.h@ 1186

Last change on this file since 1186 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 17.9 KB
Line 
1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6#ifndef __MS_ASN1_H__
7#define __MS_ASN1_H__
8
9#include <pshpack8.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15 typedef unsigned char ASN1uint8_t;
16 typedef signed char ASN1int8_t;
17 typedef unsigned short ASN1uint16_t;
18 typedef signed short ASN1int16_t;
19 typedef unsigned __LONG32 ASN1uint32_t;
20 typedef signed __LONG32 ASN1int32_t;
21
22#ifndef WINAPI
23#if defined(_ARM_)
24#define WINAPI
25#else
26#define WINAPI __stdcall
27#endif
28#endif
29
30#define ASN1_PUBLIC __declspec(dllimport)
31#define ASN1API WINAPI
32#define ASN1CALL WINAPI
33#define ASN1API_INLINE WINAPI
34
35 typedef ASN1uint8_t ASN1octet_t;
36 typedef ASN1uint8_t ASN1bool_t;
37
38 typedef struct tagASN1intx_t {
39 ASN1uint32_t length;
40 ASN1octet_t *value;
41 } ASN1intx_t;
42
43 typedef struct tagASN1octetstring_t {
44 ASN1uint32_t length;
45 ASN1octet_t *value;
46 } ASN1octetstring_t;
47
48 typedef struct tagASN1octetstring2_t {
49 ASN1uint32_t length;
50 ASN1octet_t value[1];
51 } ASN1octetstring2_t;
52
53 typedef struct ASN1iterator_s {
54 struct ASN1iterator_s *next;
55 void *value;
56 } ASN1iterator_t;
57
58 typedef struct tagASN1bitstring_t {
59 ASN1uint32_t length;
60 ASN1octet_t *value;
61 } ASN1bitstring_t;
62
63 typedef char ASN1char_t;
64
65 typedef struct tagASN1charstring_t {
66 ASN1uint32_t length;
67 ASN1char_t *value;
68 } ASN1charstring_t;
69
70 typedef ASN1uint16_t ASN1char16_t;
71
72 typedef struct tagASN1char16string_t {
73 ASN1uint32_t length;
74 ASN1char16_t *value;
75 } ASN1char16string_t;
76
77 typedef ASN1uint32_t ASN1char32_t;
78
79 typedef struct tagASN1char32string_t {
80 ASN1uint32_t length;
81 ASN1char32_t *value;
82 } ASN1char32string_t;
83
84 typedef ASN1char_t *ASN1ztcharstring_t;
85 typedef ASN1char16_t *ASN1ztchar16string_t;
86 typedef ASN1char32_t *ASN1ztchar32string_t;
87
88 typedef struct tagASN1wstring_t {
89 ASN1uint32_t length;
90 WCHAR *value;
91 } ASN1wstring_t;
92
93 typedef struct ASN1objectidentifier_s {
94 struct ASN1objectidentifier_s *next;
95 ASN1uint32_t value;
96 } *ASN1objectidentifier_t;
97
98 typedef struct tagASN1objectidentifier2_t {
99 ASN1uint16_t count;
100 ASN1uint32_t value[16];
101 } ASN1objectidentifier2_t;
102
103 typedef struct tagASN1encodedOID_t {
104 ASN1uint16_t length;
105 ASN1octet_t *value;
106 } ASN1encodedOID_t;
107
108 typedef struct tagASN1stringtableentry_t {
109 ASN1char32_t lower;
110 ASN1char32_t upper;
111 ASN1uint32_t value;
112 } ASN1stringtableentry_t;
113
114 typedef struct tagASN1stringtable_t {
115 ASN1uint32_t length;
116 ASN1stringtableentry_t *values;
117 } ASN1stringtable_t;
118
119 typedef ASN1ztcharstring_t ASN1objectdescriptor_t;
120
121 typedef struct tagASN1generalizedtime_t {
122 ASN1uint16_t year;
123 ASN1uint8_t month;
124 ASN1uint8_t day;
125 ASN1uint8_t hour;
126 ASN1uint8_t minute;
127 ASN1uint8_t second;
128 ASN1uint16_t millisecond;
129 ASN1bool_t universal;
130 ASN1int16_t diff;
131 } ASN1generalizedtime_t;
132
133 typedef struct tagASN1utctime_t {
134 ASN1uint8_t year;
135 ASN1uint8_t month;
136 ASN1uint8_t day;
137 ASN1uint8_t hour;
138 ASN1uint8_t minute;
139 ASN1uint8_t second;
140 ASN1bool_t universal;
141 ASN1int16_t diff;
142 } ASN1utctime_t;
143
144 typedef struct tagASN1open_t {
145 ASN1uint32_t length;
146 __C89_NAMELESS union {
147 void *encoded;
148 void *value;
149 };
150 } ASN1open_t;
151
152 typedef enum tagASN1blocktype_e {
153 ASN1_DER_SET_OF_BLOCK
154 } ASN1blocktype_e;
155
156 typedef ASN1int32_t ASN1enum_t;
157 typedef ASN1uint16_t ASN1choice_t;
158 typedef ASN1uint32_t ASN1magic_t;
159
160#define ASN1_MAKE_VERSION(major,minor) (((major) << 16) | (minor))
161#define ASN1_THIS_VERSION ASN1_MAKE_VERSION(1,0)
162
163 enum {
164 ASN1_CHOICE_BASE = 1,ASN1_CHOICE_INVALID = -1,ASN1_CHOICE_EXTENSION = 0
165 };
166
167 typedef enum tagASN1error_e {
168 ASN1_SUCCESS = 0,ASN1_ERR_INTERNAL = (-1001),ASN1_ERR_EOD = (-1002),ASN1_ERR_CORRUPT = (-1003),ASN1_ERR_LARGE = (-1004),
169 ASN1_ERR_CONSTRAINT = (-1005),ASN1_ERR_MEMORY = (-1006),ASN1_ERR_OVERFLOW = (-1007),ASN1_ERR_BADPDU = (-1008),ASN1_ERR_BADARGS = (-1009),
170 ASN1_ERR_BADREAL = (-1010),ASN1_ERR_BADTAG = (-1011),ASN1_ERR_CHOICE = (-1012),ASN1_ERR_RULE = (-1013),ASN1_ERR_UTF8 = (-1014),
171 ASN1_ERR_PDU_TYPE = (-1051),ASN1_ERR_NYI = (-1052),ASN1_WRN_EXTENDED = 1001,ASN1_WRN_NOEOD = 1002
172 } ASN1error_e;
173
174#define ASN1_SUCCEEDED(ret) (((int) (ret)) >= 0)
175#define ASN1_FAILED(ret) (((int) (ret)) < 0)
176
177 typedef enum {
178 ASN1_PER_RULE_ALIGNED = 0x0001,ASN1_PER_RULE_UNALIGNED = 0x0002,ASN1_PER_RULE = ASN1_PER_RULE_ALIGNED | ASN1_PER_RULE_UNALIGNED,
179 ASN1_BER_RULE_BER = 0x0100,ASN1_BER_RULE_CER = 0x0200,ASN1_BER_RULE_DER = 0x0400,
180 ASN1_BER_RULE = ASN1_BER_RULE_BER | ASN1_BER_RULE_CER | ASN1_BER_RULE_DER
181 } ASN1encodingrule_e;
182
183 typedef struct ASN1encoding_s *ASN1encoding_t;
184 typedef struct ASN1decoding_s *ASN1decoding_t;
185 typedef ASN1int32_t (WINAPI *ASN1PerEncFun_t)(ASN1encoding_t enc,void *data);
186 typedef ASN1int32_t (WINAPI *ASN1PerDecFun_t)(ASN1decoding_t enc,void *data);
187
188 typedef struct tagASN1PerFunArr_t {
189 const ASN1PerEncFun_t *apfnEncoder;
190 const ASN1PerDecFun_t *apfnDecoder;
191 } ASN1PerFunArr_t;
192
193 typedef ASN1int32_t (WINAPI *ASN1BerEncFun_t)(ASN1encoding_t enc,ASN1uint32_t tag,void *data);
194 typedef ASN1int32_t (WINAPI *ASN1BerDecFun_t)(ASN1decoding_t enc,ASN1uint32_t tag,void *data);
195
196 typedef struct tagASN1BerFunArr_t {
197 const ASN1BerEncFun_t *apfnEncoder;
198 const ASN1BerDecFun_t *apfnDecoder;
199 } ASN1BerFunArr_t;
200
201 typedef void (WINAPI *ASN1GenericFun_t)(void);
202 typedef void (WINAPI *ASN1FreeFun_t)(void *data);
203
204 typedef struct tagASN1module_t {
205 ASN1magic_t nModuleName;
206 ASN1encodingrule_e eRule;
207 ASN1uint32_t dwFlags;
208 ASN1uint32_t cPDUs;
209 const ASN1FreeFun_t *apfnFreeMemory;
210 const ASN1uint32_t *acbStructSize;
211 __C89_NAMELESS union {
212 ASN1PerFunArr_t PER;
213 ASN1BerFunArr_t BER;
214 };
215 } *ASN1module_t;
216
217 struct ASN1encoding_s {
218 ASN1magic_t magic;
219 ASN1uint32_t version;
220 ASN1module_t module;
221 ASN1octet_t *buf;
222 ASN1uint32_t size;
223 ASN1uint32_t len;
224 ASN1error_e err;
225 ASN1uint32_t bit;
226 ASN1octet_t *pos;
227 ASN1uint32_t cbExtraHeader;
228 ASN1encodingrule_e eRule;
229 ASN1uint32_t dwFlags;
230 };
231
232 struct ASN1decoding_s {
233 ASN1magic_t magic;
234 ASN1uint32_t version;
235 ASN1module_t module;
236 ASN1octet_t *buf;
237 ASN1uint32_t size;
238 ASN1uint32_t len;
239 ASN1error_e err;
240 ASN1uint32_t bit;
241 ASN1octet_t *pos;
242 ASN1encodingrule_e eRule;
243 ASN1uint32_t dwFlags;
244 };
245
246#define ASN1DECFREE_NON_PDU_ID ((ASN1uint32_t) -1)
247
248 enum {
249 ASN1FLAGS_NONE = 0x00000000,ASN1FLAGS_NOASSERT = 0x00001000
250 };
251
252 enum {
253 ASN1ENCODE_APPEND = 0x00000001,ASN1ENCODE_REUSEBUFFER = 0x00000004,ASN1ENCODE_SETBUFFER = 0x00000008,ASN1ENCODE_ALLOCATEBUFFER = 0x00000010,
254 ASN1ENCODE_NOASSERT = ASN1FLAGS_NOASSERT
255 };
256
257 enum {
258 ASN1DECODE_APPENDED = 0x00000001,ASN1DECODE_REWINDBUFFER = 0x00000004,ASN1DECODE_SETBUFFER = 0x00000008,ASN1DECODE_AUTOFREEBUFFER = 0x00000010,
259 ASN1DECODE_NOASSERT = ASN1FLAGS_NOASSERT
260 };
261
262 extern ASN1_PUBLIC ASN1module_t WINAPI ASN1_CreateModule(ASN1uint32_t nVersion,ASN1encodingrule_e eRule,ASN1uint32_t dwFlags,ASN1uint32_t cPDU,const ASN1GenericFun_t apfnEncoder[],const ASN1GenericFun_t apfnDecoder[],const ASN1FreeFun_t apfnFreeMemory[],const ASN1uint32_t acbStructSize[],ASN1magic_t nModuleName);
263 extern ASN1_PUBLIC void WINAPI ASN1_CloseModule(ASN1module_t pModule);
264 extern ASN1_PUBLIC ASN1error_e WINAPI ASN1_CreateEncoder(ASN1module_t pModule,ASN1encoding_t *ppEncoderInfo,ASN1octet_t *pbBuf,ASN1uint32_t cbBufSize,ASN1encoding_t pParent);
265 extern ASN1_PUBLIC ASN1error_e WINAPI ASN1_Encode(ASN1encoding_t pEncoderInfo,void *pDataStruct,ASN1uint32_t nPduNum,ASN1uint32_t dwFlags,ASN1octet_t *pbBuf,ASN1uint32_t cbBufSize);
266 extern ASN1_PUBLIC void WINAPI ASN1_CloseEncoder(ASN1encoding_t pEncoderInfo);
267 extern ASN1_PUBLIC void WINAPI ASN1_CloseEncoder2(ASN1encoding_t pEncoderInfo);
268 extern ASN1_PUBLIC ASN1error_e WINAPI ASN1_CreateDecoder(ASN1module_t pModule,ASN1decoding_t *ppDecoderInfo,ASN1octet_t *pbBuf,ASN1uint32_t cbBufSize,ASN1decoding_t pParent);
269 extern ASN1_PUBLIC ASN1error_e WINAPI ASN1_CreateDecoderEx(ASN1module_t pModule,ASN1decoding_t *ppDecoderInfo,ASN1octet_t *pbBuf,ASN1uint32_t cbBufSize,ASN1decoding_t pParent,ASN1uint32_t dwFlags);
270 extern ASN1_PUBLIC ASN1error_e WINAPI ASN1_Decode(ASN1decoding_t pDecoderInfo,void **ppDataStruct,ASN1uint32_t nPduNum,ASN1uint32_t dwFlags,ASN1octet_t *pbBuf,ASN1uint32_t cbBufSize);
271 extern ASN1_PUBLIC void WINAPI ASN1_CloseDecoder(ASN1decoding_t pDecoderInfo);
272 extern ASN1_PUBLIC void WINAPI ASN1_FreeEncoded(ASN1encoding_t pEncoderInfo,void *pBuf);
273 extern ASN1_PUBLIC void WINAPI ASN1_FreeDecoded(ASN1decoding_t pDecoderInfo,void *pDataStruct,ASN1uint32_t nPduNum);
274
275 typedef enum {
276 ASN1OPT_CHANGE_RULE = 0x101,ASN1OPT_GET_RULE = 0x201,ASN1OPT_NOT_REUSE_BUFFER = 0x301,ASN1OPT_REWIND_BUFFER = 0x302,
277 ASN1OPT_SET_DECODED_BUFFER = 0x501,ASN1OPT_DEL_DECODED_BUFFER = 0x502,ASN1OPT_GET_DECODED_BUFFER_SIZE = 0x601
278 } ASN1option_e;
279
280 typedef struct tagASN1optionparam_t {
281 ASN1option_e eOption;
282 __C89_NAMELESS union {
283 ASN1encodingrule_e eRule;
284 ASN1uint32_t cbRequiredDecodedBufSize;
285 struct {
286 ASN1octet_t *pbBuf;
287 ASN1uint32_t cbBufSize;
288 } Buffer;
289 };
290 } ASN1optionparam_t,ASN1optionparam_s;
291
292 extern ASN1_PUBLIC ASN1error_e WINAPI ASN1_SetEncoderOption(ASN1encoding_t pEncoderInfo,ASN1optionparam_t *pOptParam);
293 extern ASN1_PUBLIC ASN1error_e WINAPI ASN1_GetEncoderOption(ASN1encoding_t pEncoderInfo,ASN1optionparam_t *pOptParam);
294 extern ASN1_PUBLIC ASN1error_e WINAPI ASN1_SetDecoderOption(ASN1decoding_t pDecoderInfo,ASN1optionparam_t *pOptParam);
295 extern ASN1_PUBLIC ASN1error_e WINAPI ASN1_GetDecoderOption(ASN1decoding_t pDecoderInfo,ASN1optionparam_t *pOptParam);
296 extern ASN1_PUBLIC void WINAPI ASN1bitstring_free(ASN1bitstring_t *);
297 extern ASN1_PUBLIC void WINAPI ASN1octetstring_free(ASN1octetstring_t *);
298 extern ASN1_PUBLIC void WINAPI ASN1objectidentifier_free(ASN1objectidentifier_t *);
299 extern ASN1_PUBLIC void WINAPI ASN1charstring_free(ASN1charstring_t *);
300 extern ASN1_PUBLIC void WINAPI ASN1char16string_free(ASN1char16string_t *);
301 extern ASN1_PUBLIC void WINAPI ASN1char32string_free(ASN1char32string_t *);
302 extern ASN1_PUBLIC void WINAPI ASN1ztcharstring_free(ASN1ztcharstring_t);
303 extern ASN1_PUBLIC void WINAPI ASN1ztchar16string_free(ASN1ztchar16string_t);
304 extern ASN1_PUBLIC void WINAPI ASN1ztchar32string_free(ASN1ztchar32string_t);
305 extern ASN1_PUBLIC void WINAPI ASN1open_free(ASN1open_t *);
306 extern ASN1_PUBLIC void WINAPI ASN1utf8string_free(ASN1wstring_t *);
307 extern ASN1_PUBLIC void *WINAPI ASN1DecAlloc(ASN1decoding_t dec,ASN1uint32_t size);
308 extern ASN1_PUBLIC void *WINAPI ASN1DecRealloc(ASN1decoding_t dec,void *ptr,ASN1uint32_t size);
309 extern ASN1_PUBLIC void WINAPI ASN1Free(void *ptr);
310 extern ASN1_PUBLIC ASN1error_e WINAPI ASN1EncSetError(ASN1encoding_t enc,ASN1error_e err);
311 extern ASN1_PUBLIC ASN1error_e WINAPI ASN1DecSetError(ASN1decoding_t dec,ASN1error_e err);
312 extern ASN1_PUBLIC void WINAPI ASN1intx_sub(ASN1intx_t *,ASN1intx_t *,ASN1intx_t *);
313 extern ASN1_PUBLIC ASN1uint32_t WINAPI ASN1intx_uoctets(ASN1intx_t *);
314 extern ASN1_PUBLIC void WINAPI ASN1intx_free(ASN1intx_t *);
315 extern ASN1_PUBLIC void WINAPI ASN1intx_add(ASN1intx_t *,ASN1intx_t *,ASN1intx_t *);
316 extern ASN1_PUBLIC ASN1int32_t WINAPI ASN1intx2int32(ASN1intx_t *val);
317 extern ASN1_PUBLIC ASN1uint32_t WINAPI ASN1intx2uint32(ASN1intx_t *val);
318 extern ASN1_PUBLIC int WINAPI ASN1intxisuint32(ASN1intx_t *val);
319 extern ASN1_PUBLIC void WINAPI ASN1intx_setuint32(ASN1intx_t *dst,ASN1uint32_t val);
320 extern ASN1_PUBLIC void WINAPI ASN1DbgMemTrackDumpCurrent (ASN1uint32_t nModuleName);
321 extern ASN1_PUBLIC ASN1uint32_t WINAPI ASN1uint32_uoctets(ASN1uint32_t);
322 extern ASN1_PUBLIC int WINAPI ASN1objectidentifier_cmp(ASN1objectidentifier_t *v1,ASN1objectidentifier_t *v2);
323 extern ASN1_PUBLIC int WINAPI ASN1objectidentifier2_cmp(ASN1objectidentifier2_t *v1,ASN1objectidentifier2_t *v2);
324 extern ASN1_PUBLIC int WINAPI ASN1bitstring_cmp(ASN1bitstring_t *,ASN1bitstring_t *,int);
325 extern ASN1_PUBLIC int WINAPI ASN1octetstring_cmp(ASN1octetstring_t *,ASN1octetstring_t *);
326 extern ASN1_PUBLIC int WINAPI ASN1objectidentifier_cmp(ASN1objectidentifier_t *,ASN1objectidentifier_t *);
327 extern ASN1_PUBLIC int WINAPI ASN1charstring_cmp(ASN1charstring_t *,ASN1charstring_t *);
328 extern ASN1_PUBLIC int WINAPI ASN1char16string_cmp(ASN1char16string_t *,ASN1char16string_t *);
329 extern ASN1_PUBLIC int WINAPI ASN1char32string_cmp(ASN1char32string_t *,ASN1char32string_t *);
330 extern ASN1_PUBLIC int WINAPI ASN1ztcharstring_cmp(ASN1ztcharstring_t,ASN1ztcharstring_t);
331 extern ASN1_PUBLIC int WINAPI ASN1ztchar16string_cmp(ASN1ztchar16string_t,ASN1ztchar16string_t);
332 extern ASN1_PUBLIC int WINAPI ASN1open_cmp(ASN1open_t *,ASN1open_t *);
333 extern ASN1_PUBLIC int WINAPI ASN1generalizedtime_cmp(ASN1generalizedtime_t *,ASN1generalizedtime_t *);
334 extern ASN1_PUBLIC int WINAPI ASN1utctime_cmp(ASN1utctime_t *,ASN1utctime_t *);
335
336 typedef enum tagASN1real_e {
337 eReal_Normal,eReal_PlusInfinity,eReal_MinusInfinity
338 } ASN1real_e;
339
340 typedef struct tagASN1real_t {
341 ASN1real_e type;
342 ASN1intx_t mantissa;
343 ASN1uint32_t base;
344 ASN1intx_t exponent;
345 } ASN1real_t;
346
347 typedef struct tagASN1external_t {
348#define ASN1external_data_value_descriptor_o 0
349 ASN1octet_t o[1];
350 struct ASN1external_identification_s {
351 ASN1uint8_t o;
352 union {
353#define ASN1external_identification_syntax_o 1
354 ASN1objectidentifier_t syntax;
355#define ASN1external_identification_presentation_context_id_o 2
356 ASN1uint32_t presentation_context_id;
357#define ASN1external_identification_context_negotiation_o 3
358 struct ASN1external_identification_context_negotiation_s {
359 ASN1uint32_t presentation_context_id;
360 ASN1objectidentifier_t transfer_syntax;
361 } context_negotiation;
362 } u;
363 } identification;
364 ASN1objectdescriptor_t data_value_descriptor;
365 struct ASN1external_data_value_s {
366 ASN1uint8_t o;
367 union {
368#define ASN1external_data_value_notation_o 0
369 ASN1open_t notation;
370#define ASN1external_data_value_encoded_o 1
371 ASN1bitstring_t encoded;
372 } u;
373 } data_value;
374 } ASN1external_t;
375
376 typedef struct ASN1external_identification_s ASN1external_identification_t;
377 typedef struct ASN1external_identification_context_negotiation_s ASN1external_identification_context_negotiation_t;
378 typedef struct ASN1external_data_value_s ASN1external_data_value_t;
379
380 typedef struct tagASN1embeddedpdv_t {
381 struct ASN1embeddedpdv_identification_s {
382 ASN1uint8_t o;
383 union {
384#define ASN1embeddedpdv_identification_syntaxes_o 0
385 struct ASN1embeddedpdv_identification_syntaxes_s {
386 ASN1objectidentifier_t abstract;
387 ASN1objectidentifier_t transfer;
388 } syntaxes;
389#define ASN1embeddedpdv_identification_syntax_o 1
390 ASN1objectidentifier_t syntax;
391#define ASN1embeddedpdv_identification_presentation_context_id_o 2
392 ASN1uint32_t presentation_context_id;
393#define ASN1embeddedpdv_identification_context_negotiation_o 3
394 struct ASN1embeddedpdv_identification_context_negotiation_s {
395 ASN1uint32_t presentation_context_id;
396 ASN1objectidentifier_t transfer_syntax;
397 } context_negotiation;
398#define ASN1embeddedpdv_identification_transfer_syntax_o 4
399 ASN1objectidentifier_t transfer_syntax;
400#define ASN1embeddedpdv_identification_fixed_o 5
401 } u;
402 } identification;
403 struct ASN1embeddedpdv_data_value_s {
404 ASN1uint8_t o;
405 union {
406#define ASN1embeddedpdv_data_value_notation_o 0
407 ASN1open_t notation;
408#define ASN1embeddedpdv_data_value_encoded_o 1
409 ASN1bitstring_t encoded;
410 } u;
411 } data_value;
412 } ASN1embeddedpdv_t;
413
414 typedef struct ASN1embeddedpdv_identification_s ASN1embeddedpdv_identification_t;
415 typedef struct ASN1embeddedpdv_identification_syntaxes_s ASN1embeddedpdv_identification_syntaxes_t;
416 typedef struct ASN1embeddedpdv_identification_context_negotiation_s ASN1embeddedpdv_identification_context_negotiation_t;
417 typedef struct ASN1embeddedpdv_data_value_s ASN1embeddedpdv_data_value_t;
418
419 typedef struct tagASN1characterstring_t {
420 struct ASN1characterstring_identification_s {
421 ASN1uint8_t o;
422 union {
423#define ASN1characterstring_identification_syntaxes_o 0
424 struct ASN1characterstring_identification_syntaxes_s {
425 ASN1objectidentifier_t abstract;
426 ASN1objectidentifier_t transfer;
427 } syntaxes;
428#define ASN1characterstring_identification_syntax_o 1
429 ASN1objectidentifier_t syntax;
430#define ASN1characterstring_identification_presentation_context_id_o 2
431 ASN1uint32_t presentation_context_id;
432#define ASN1characterstring_identification_context_negotiation_o 3
433 struct ASN1characterstring_identification_context_negotiation_s {
434 ASN1uint32_t presentation_context_id;
435 ASN1objectidentifier_t transfer_syntax;
436 } context_negotiation;
437#define ASN1characterstring_identification_transfer_syntax_o 4
438 ASN1objectidentifier_t transfer_syntax;
439#define ASN1characterstring_identification_fixed_o 5
440 } u;
441 } identification;
442 struct ASN1characterstring_data_value_s {
443 ASN1uint8_t o;
444 union {
445#define ASN1characterstring_data_value_notation_o 0
446 ASN1open_t notation;
447#define ASN1characterstring_data_value_encoded_o 1
448 ASN1octetstring_t encoded;
449 } u;
450 } data_value;
451 } ASN1characterstring_t;
452
453 typedef struct ASN1characterstring_identification_s ASN1characterstring_identification_t;
454 typedef struct ASN1characterstring_identification_syntaxes_s ASN1characterstring_identification_syntaxes_t;
455 typedef struct ASN1characterstring_identification_context_negotiation_s ASN1characterstring_identification_context_negotiation_t;
456 typedef struct ASN1characterstring_data_value_s ASN1characterstring_data_value_t;
457
458 extern ASN1_PUBLIC void WINAPI ASN1real_free(ASN1real_t *);
459 extern ASN1_PUBLIC void WINAPI ASN1external_free(ASN1external_t *);
460 extern ASN1_PUBLIC void WINAPI ASN1embeddedpdv_free(ASN1embeddedpdv_t *);
461 extern ASN1_PUBLIC void WINAPI ASN1characterstring_free(ASN1characterstring_t *);
462
463#ifdef __cplusplus
464}
465#endif
466
467#include <poppack.h>
468#endif
Note: See TracBrowser for help on using the repository browser.