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