Coverage Report

Created: 2025-06-11 06:41

/src/boringssl/include/openssl/asn1t.h
Line
Count
Source (jump to first uncovered line)
1
// Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
//     https://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
15
#ifndef OPENSSL_HEADER_ASN1T_H
16
#define OPENSSL_HEADER_ASN1T_H
17
18
#include <openssl/asn1.h>
19
#include <openssl/base.h>   // IWYU pragma: export
20
21
#if defined(__cplusplus)
22
extern "C" {
23
#endif
24
25
26
/* Legacy ASN.1 library template definitions.
27
 *
28
 * This header is used to define new types in OpenSSL's ASN.1 implementation. It
29
 * is deprecated and will be unexported from the library. Use the new |CBS| and
30
 * |CBB| library in <openssl/bytestring.h> instead. */
31
32
33
typedef struct ASN1_TEMPLATE_st ASN1_TEMPLATE;
34
typedef struct ASN1_TLC_st ASN1_TLC;
35
36
/* Macro to obtain ASN1_ADB pointer from a type (only used internally) */
37
6.29k
#define ASN1_ADB_ptr(iptr) ((const ASN1_ADB *)(iptr))
38
39
40
/* Macros for start and end of ASN1_ITEM definition */
41
42
#define ASN1_ITEM_start(itname) const ASN1_ITEM itname##_it = {
43
#define ASN1_ITEM_end(itname) \
44
  }                           \
45
  ;
46
47
/* Macros to aid ASN1 template writing */
48
49
#define ASN1_ITEM_TEMPLATE(tname) static const ASN1_TEMPLATE tname##_item_tt
50
51
#define ASN1_ITEM_TEMPLATE_END(tname)                                         \
52
  ;                                                                           \
53
  ASN1_ITEM_start(tname) ASN1_ITYPE_PRIMITIVE, -1, &tname##_item_tt, 0, NULL, \
54
      0, #tname ASN1_ITEM_end(tname)
55
56
57
/* This is a ASN1 type which just embeds a template */
58
59
/* This pair helps declare a SEQUENCE. We can do:
60
 *
61
 *  ASN1_SEQUENCE(stname) = {
62
 *    ... SEQUENCE components ...
63
 *  } ASN1_SEQUENCE_END(stname)
64
 *
65
 *  This will produce an ASN1_ITEM called stname_it
66
 *  for a structure called stname.
67
 *
68
 *  If you want the same structure but a different
69
 *  name then use:
70
 *
71
 *  ASN1_SEQUENCE(itname) = {
72
 *    ... SEQUENCE components ...
73
 *  } ASN1_SEQUENCE_END_name(stname, itname)
74
 *
75
 *  This will create an item called itname_it using
76
 *  a structure called stname.
77
 */
78
79
#define ASN1_SEQUENCE(tname) static const ASN1_TEMPLATE tname##_seq_tt[]
80
81
#define ASN1_SEQUENCE_END(stname) ASN1_SEQUENCE_END_name(stname, stname)
82
83
#define ASN1_SEQUENCE_END_name(stname, tname)                                  \
84
  ;                                                                            \
85
  ASN1_ITEM_start(tname) ASN1_ITYPE_SEQUENCE, V_ASN1_SEQUENCE, tname##_seq_tt, \
86
      sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), NULL, sizeof(stname),    \
87
      #stname ASN1_ITEM_end(tname)
88
89
#define ASN1_SEQUENCE_cb(tname, cb)                        \
90
  static const ASN1_AUX tname##_aux = {NULL, 0, 0, cb, 0}; \
91
  ASN1_SEQUENCE(tname)
92
93
#define ASN1_SEQUENCE_ref(tname, cb)                                        \
94
  static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_REFCOUNT,            \
95
                                       offsetof(tname, references), cb, 0}; \
96
  ASN1_SEQUENCE(tname)
97
98
#define ASN1_SEQUENCE_enc(tname, enc, cb)                               \
99
  static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_ENCODING, 0, cb, \
100
                                       offsetof(tname, enc)};           \
101
  ASN1_SEQUENCE(tname)
102
103
#define ASN1_SEQUENCE_END_enc(stname, tname) \
104
  ASN1_SEQUENCE_END_ref(stname, tname)
105
106
#define ASN1_SEQUENCE_END_cb(stname, tname) ASN1_SEQUENCE_END_ref(stname, tname)
107
108
#define ASN1_SEQUENCE_END_ref(stname, tname)                                   \
109
  ;                                                                            \
110
  ASN1_ITEM_start(tname) ASN1_ITYPE_SEQUENCE, V_ASN1_SEQUENCE, tname##_seq_tt, \
111
      sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), &tname##_aux,            \
112
      sizeof(stname), #stname ASN1_ITEM_end(tname)
113
114
115
/* This pair helps declare a CHOICE type. We can do:
116
 *
117
 *  ASN1_CHOICE(chname) = {
118
 *    ... CHOICE options ...
119
 *  ASN1_CHOICE_END(chname)
120
 *
121
 *  This will produce an ASN1_ITEM called chname_it
122
 *  for a structure called chname. The structure
123
 *  definition must look like this:
124
 *  typedef struct {
125
 *    int type;
126
 *    union {
127
 *      ASN1_SOMETHING *opt1;
128
 *      ASN1_SOMEOTHER *opt2;
129
 *    } value;
130
 *  } chname;
131
 *
132
 *  the name of the selector must be 'type'.
133
 *  to use an alternative selector name use the
134
 *      ASN1_CHOICE_END_selector() version.
135
 */
136
137
#define ASN1_CHOICE(tname) static const ASN1_TEMPLATE tname##_ch_tt[]
138
139
#define ASN1_CHOICE_cb(tname, cb)                          \
140
  static const ASN1_AUX tname##_aux = {NULL, 0, 0, cb, 0}; \
141
  ASN1_CHOICE(tname)
142
143
#define ASN1_CHOICE_END(stname) ASN1_CHOICE_END_name(stname, stname)
144
145
#define ASN1_CHOICE_END_name(stname, tname) \
146
  ASN1_CHOICE_END_selector(stname, tname, type)
147
148
#define ASN1_CHOICE_END_selector(stname, tname, selname)                  \
149
  ;                                                                       \
150
  ASN1_ITEM_start(tname) ASN1_ITYPE_CHOICE, offsetof(stname, selname),    \
151
      tname##_ch_tt, sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE), NULL, \
152
      sizeof(stname), #stname ASN1_ITEM_end(tname)
153
154
#define ASN1_CHOICE_END_cb(stname, tname, selname)                     \
155
  ;                                                                    \
156
  ASN1_ITEM_start(tname) ASN1_ITYPE_CHOICE, offsetof(stname, selname), \
157
      tname##_ch_tt, sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE),    \
158
      &tname##_aux, sizeof(stname), #stname ASN1_ITEM_end(tname)
159
160
/* This helps with the template wrapper form of ASN1_ITEM */
161
162
#define ASN1_EX_TEMPLATE_TYPE(flags, tag, name, type) \
163
  { (flags), (tag), 0, #name, ASN1_ITEM_ref(type) }
164
165
/* These help with SEQUENCE or CHOICE components */
166
167
/* used to declare other types */
168
169
#define ASN1_EX_TYPE(flags, tag, stname, field, type) \
170
  { (flags), (tag), offsetof(stname, field), #field, ASN1_ITEM_ref(type) }
171
172
/* implicit and explicit helper macros */
173
174
#define ASN1_IMP_EX(stname, field, type, tag, ex) \
175
  ASN1_EX_TYPE(ASN1_TFLG_IMPLICIT | ex, tag, stname, field, type)
176
177
#define ASN1_EXP_EX(stname, field, type, tag, ex) \
178
  ASN1_EX_TYPE(ASN1_TFLG_EXPLICIT | ex, tag, stname, field, type)
179
180
/* Any defined by macros: the field used is in the table itself */
181
182
#define ASN1_ADB_OBJECT(tblname) \
183
  { ASN1_TFLG_ADB_OID, -1, 0, #tblname, (const ASN1_ITEM *)&(tblname##_adb) }
184
/* Plain simple type */
185
#define ASN1_SIMPLE(stname, field, type) ASN1_EX_TYPE(0, 0, stname, field, type)
186
187
/* OPTIONAL simple type */
188
#define ASN1_OPT(stname, field, type) \
189
  ASN1_EX_TYPE(ASN1_TFLG_OPTIONAL, 0, stname, field, type)
190
191
/* IMPLICIT tagged simple type */
192
#define ASN1_IMP(stname, field, type, tag) \
193
  ASN1_IMP_EX(stname, field, type, tag, 0)
194
195
/* IMPLICIT tagged OPTIONAL simple type */
196
#define ASN1_IMP_OPT(stname, field, type, tag) \
197
  ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL)
198
199
/* Same as above but EXPLICIT */
200
201
#define ASN1_EXP(stname, field, type, tag) \
202
  ASN1_EXP_EX(stname, field, type, tag, 0)
203
#define ASN1_EXP_OPT(stname, field, type, tag) \
204
  ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL)
205
206
/* SEQUENCE OF type */
207
#define ASN1_SEQUENCE_OF(stname, field, type) \
208
  ASN1_EX_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, stname, field, type)
209
210
/* OPTIONAL SEQUENCE OF */
211
#define ASN1_SEQUENCE_OF_OPT(stname, field, type)                            \
212
  ASN1_EX_TYPE(ASN1_TFLG_SEQUENCE_OF | ASN1_TFLG_OPTIONAL, 0, stname, field, \
213
               type)
214
215
/* Same as above but for SET OF */
216
217
#define ASN1_SET_OF(stname, field, type) \
218
  ASN1_EX_TYPE(ASN1_TFLG_SET_OF, 0, stname, field, type)
219
220
#define ASN1_SET_OF_OPT(stname, field, type) \
221
  ASN1_EX_TYPE(ASN1_TFLG_SET_OF | ASN1_TFLG_OPTIONAL, 0, stname, field, type)
222
223
/* Finally compound types of SEQUENCE, SET, IMPLICIT, EXPLICIT and OPTIONAL */
224
225
#define ASN1_IMP_SET_OF(stname, field, type, tag) \
226
  ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF)
227
228
#define ASN1_EXP_SET_OF(stname, field, type, tag) \
229
  ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF)
230
231
#define ASN1_IMP_SET_OF_OPT(stname, field, type, tag) \
232
  ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF | ASN1_TFLG_OPTIONAL)
233
234
#define ASN1_EXP_SET_OF_OPT(stname, field, type, tag) \
235
  ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF | ASN1_TFLG_OPTIONAL)
236
237
#define ASN1_IMP_SEQUENCE_OF(stname, field, type, tag) \
238
  ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF)
239
240
#define ASN1_IMP_SEQUENCE_OF_OPT(stname, field, type, tag) \
241
  ASN1_IMP_EX(stname, field, type, tag,                    \
242
              ASN1_TFLG_SEQUENCE_OF | ASN1_TFLG_OPTIONAL)
243
244
#define ASN1_EXP_SEQUENCE_OF(stname, field, type, tag) \
245
  ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF)
246
247
#define ASN1_EXP_SEQUENCE_OF_OPT(stname, field, type, tag) \
248
  ASN1_EXP_EX(stname, field, type, tag,                    \
249
              ASN1_TFLG_SEQUENCE_OF | ASN1_TFLG_OPTIONAL)
250
251
/* Macros for the ASN1_ADB structure */
252
253
#define ASN1_ADB(name) static const ASN1_ADB_TABLE name##_adbtbl[]
254
255
#define ASN1_ADB_END(name, flags, field, app_table, def, none) \
256
  ;                                                            \
257
  static const ASN1_ADB name##_adb = {                         \
258
      flags,                                                   \
259
      offsetof(name, field),                                   \
260
      app_table,                                               \
261
      name##_adbtbl,                                           \
262
      sizeof(name##_adbtbl) / sizeof(ASN1_ADB_TABLE),          \
263
      def,                                                     \
264
      none}
265
266
#define ADB_ENTRY(val, template) \
267
  { val, template }
268
269
#define ASN1_ADB_TEMPLATE(name) static const ASN1_TEMPLATE name##_tt
270
271
/* This is the ASN1 template structure that defines
272
 * a wrapper round the actual type. It determines the
273
 * actual position of the field in the value structure,
274
 * various flags such as OPTIONAL and the field name.
275
 */
276
277
struct ASN1_TEMPLATE_st {
278
  uint32_t flags;         /* Various flags */
279
  int tag;                /* tag, not used if no tagging */
280
  unsigned long offset;   /* Offset of this field in structure */
281
  const char *field_name; /* Field name */
282
  ASN1_ITEM_EXP *item;    /* Relevant ASN1_ITEM or ASN1_ADB */
283
};
284
285
/* Macro to extract ASN1_ITEM and ASN1_ADB pointer from ASN1_TEMPLATE */
286
287
#define ASN1_TEMPLATE_item(t) (t->item_ptr)
288
#define ASN1_TEMPLATE_adb(t) (t->item_ptr)
289
290
typedef struct ASN1_ADB_TABLE_st ASN1_ADB_TABLE;
291
typedef struct ASN1_ADB_st ASN1_ADB;
292
293
struct ASN1_ADB_st {
294
  uint32_t flags;       /* Various flags */
295
  unsigned long offset; /* Offset of selector field */
296
  CRYPTO_MUST_BE_NULL *unused;
297
  const ASN1_ADB_TABLE *tbl;       /* Table of possible types */
298
  long tblcount;                   /* Number of entries in tbl */
299
  const ASN1_TEMPLATE *default_tt; /* Type to use if no match */
300
  const ASN1_TEMPLATE *null_tt;    /* Type to use if selector is NULL */
301
};
302
303
struct ASN1_ADB_TABLE_st {
304
  int value;              /* NID for an object */
305
  const ASN1_TEMPLATE tt; /* item for this value */
306
};
307
308
/* template flags */
309
310
/* Field is optional */
311
6.17M
#define ASN1_TFLG_OPTIONAL (0x1)
312
313
/* Field is a SET OF */
314
451k
#define ASN1_TFLG_SET_OF (0x1 << 1)
315
316
/* Field is a SEQUENCE OF */
317
#define ASN1_TFLG_SEQUENCE_OF (0x2 << 1)
318
319
/* Mask for SET OF or SEQUENCE OF */
320
7.90M
#define ASN1_TFLG_SK_MASK (0x3 << 1)
321
322
/* These flags mean the tag should be taken from the
323
 * tag field. If EXPLICIT then the underlying type
324
 * is used for the inner tag.
325
 */
326
327
/* IMPLICIT tagging */
328
1.56M
#define ASN1_TFLG_IMPTAG (0x1 << 3)
329
330
331
/* EXPLICIT tagging, inner tag from underlying type */
332
5.70M
#define ASN1_TFLG_EXPTAG (0x2 << 3)
333
334
3.71M
#define ASN1_TFLG_TAG_MASK (0x3 << 3)
335
336
/* context specific IMPLICIT */
337
#define ASN1_TFLG_IMPLICIT ASN1_TFLG_IMPTAG | ASN1_TFLG_CONTEXT
338
339
/* context specific EXPLICIT */
340
#define ASN1_TFLG_EXPLICIT ASN1_TFLG_EXPTAG | ASN1_TFLG_CONTEXT
341
342
/* If tagging is in force these determine the
343
 * type of tag to use. Otherwise the tag is
344
 * determined by the underlying type. These
345
 * values reflect the actual octet format.
346
 */
347
348
/* Universal tag */
349
#define ASN1_TFLG_UNIVERSAL (0x0 << 6)
350
/* Application tag */
351
#define ASN1_TFLG_APPLICATION (0x1 << 6)
352
/* Context specific tag */
353
#define ASN1_TFLG_CONTEXT (0x2 << 6)
354
/* Private tag */
355
#define ASN1_TFLG_PRIVATE (0x3 << 6)
356
357
6.14M
#define ASN1_TFLG_TAG_CLASS (0x3 << 6)
358
359
/* These are for ANY DEFINED BY type. In this case
360
 * the 'item' field points to an ASN1_ADB structure
361
 * which contains a table of values to decode the
362
 * relevant type
363
 */
364
365
4.59M
#define ASN1_TFLG_ADB_MASK (0x3 << 8)
366
367
#define ASN1_TFLG_ADB_OID (0x1 << 8)
368
369
/* This is the actual ASN1 item itself */
370
371
struct ASN1_ITEM_st {
372
  char itype; /* The item type, primitive, SEQUENCE, CHOICE or extern */
373
  int utype;  /* underlying type */
374
  const ASN1_TEMPLATE
375
      *templates;    /* If SEQUENCE or CHOICE this contains the contents */
376
  long tcount;       /* Number of templates if SEQUENCE or CHOICE */
377
  const void *funcs; /* functions that handle this type */
378
  long size;         /* Structure size (usually)*/
379
  const char *sname; /* Structure name */
380
};
381
382
/* These are values for the itype field and
383
 * determine how the type is interpreted.
384
 *
385
 * For PRIMITIVE types the underlying type
386
 * determines the behaviour if items is NULL.
387
 *
388
 * Otherwise templates must contain a single
389
 * template and the type is treated in the
390
 * same way as the type specified in the template.
391
 *
392
 * For SEQUENCE types the templates field points
393
 * to the members, the size field is the
394
 * structure size.
395
 *
396
 * For CHOICE types the templates field points
397
 * to each possible member (typically a union)
398
 * and the 'size' field is the offset of the
399
 * selector.
400
 *
401
 * The 'funcs' field is used for application
402
 * specific functions.
403
 *
404
 * The EXTERN type uses a new style d2i/i2d.
405
 * The new style should be used where possible
406
 * because it avoids things like the d2i IMPLICIT
407
 * hack.
408
 *
409
 * MSTRING is a multiple string type, it is used
410
 * for a CHOICE of character strings where the
411
 * actual strings all occupy an ASN1_STRING
412
 * structure. In this case the 'utype' field
413
 * has a special meaning, it is used as a mask
414
 * of acceptable types using the B_ASN1 constants.
415
 *
416
 */
417
418
17.6M
#define ASN1_ITYPE_PRIMITIVE 0x0
419
420
2.94M
#define ASN1_ITYPE_SEQUENCE 0x1
421
422
2.53M
#define ASN1_ITYPE_CHOICE 0x2
423
424
155k
#define ASN1_ITYPE_EXTERN 0x4
425
426
7.81M
#define ASN1_ITYPE_MSTRING 0x5
427
428
/* Deprecated tag and length cache */
429
struct ASN1_TLC_st;
430
431
/* This is the ASN1_AUX structure: it handles various
432
 * miscellaneous requirements. For example the use of
433
 * reference counts and an informational callback.
434
 *
435
 * The "informational callback" is called at various
436
 * points during the ASN1 encoding and decoding. It can
437
 * be used to provide minor customisation of the structures
438
 * used. This is most useful where the supplied routines
439
 * *almost* do the right thing but need some extra help
440
 * at a few points. If the callback returns zero then
441
 * it is assumed a fatal error has occurred and the
442
 * main operation should be abandoned.
443
 *
444
 * If major changes in the default behaviour are required
445
 * then an external type is more appropriate.
446
 */
447
448
typedef int ASN1_aux_cb(int operation, ASN1_VALUE **in, const ASN1_ITEM *it,
449
                        void *exarg);
450
451
typedef struct ASN1_AUX_st {
452
  void *app_data;
453
  uint32_t flags;
454
  int ref_offset; /* Offset of reference value */
455
  ASN1_aux_cb *asn1_cb;
456
  int enc_offset; /* Offset of ASN1_ENCODING structure */
457
} ASN1_AUX;
458
459
/* Flags in ASN1_AUX */
460
461
/* Use a reference count */
462
95.0k
#define ASN1_AFLG_REFCOUNT 1
463
/* Save the encoding of structure (useful for signatures) */
464
95.0k
#define ASN1_AFLG_ENCODING 2
465
466
/* operation values for asn1_cb */
467
468
98.0k
#define ASN1_OP_NEW_PRE 0
469
172k
#define ASN1_OP_NEW_POST 1
470
98.0k
#define ASN1_OP_FREE_PRE 2
471
267k
#define ASN1_OP_FREE_POST 3
472
0
#define ASN1_OP_D2I_PRE 4
473
71.3k
#define ASN1_OP_D2I_POST 5
474
/* ASN1_OP_I2D_PRE and ASN1_OP_I2D_POST are not supported. We leave the
475
 * constants undefined so code relying on them does not accidentally compile. */
476
#define ASN1_OP_PRINT_PRE 8
477
#define ASN1_OP_PRINT_POST 9
478
#define ASN1_OP_STREAM_PRE 10
479
#define ASN1_OP_STREAM_POST 11
480
#define ASN1_OP_DETACHED_PRE 12
481
#define ASN1_OP_DETACHED_POST 13
482
483
/* Macro to implement a primitive type */
484
#define IMPLEMENT_ASN1_TYPE(stname) IMPLEMENT_ASN1_TYPE_ex(stname, stname, 0)
485
#define IMPLEMENT_ASN1_TYPE_ex(itname, vname, ex)                             \
486
  ASN1_ITEM_start(itname) ASN1_ITYPE_PRIMITIVE, V_##vname, NULL, 0, NULL, ex, \
487
      #itname ASN1_ITEM_end(itname)
488
489
/* Macro to implement a multi string type */
490
#define IMPLEMENT_ASN1_MSTRING(itname, mask)                       \
491
  ASN1_ITEM_start(itname) ASN1_ITYPE_MSTRING, mask, NULL, 0, NULL, \
492
      sizeof(ASN1_STRING), #itname ASN1_ITEM_end(itname)
493
494
#define IMPLEMENT_EXTERN_ASN1(sname, tag, fptrs)                     \
495
  ASN1_ITEM_start(sname) ASN1_ITYPE_EXTERN, tag, NULL, 0, &fptrs, 0, \
496
      #sname ASN1_ITEM_end(sname)
497
498
/* Macro to implement standard functions in terms of ASN1_ITEM structures */
499
500
#define IMPLEMENT_ASN1_FUNCTIONS(stname) \
501
  IMPLEMENT_ASN1_FUNCTIONS_fname(stname, stname, stname)
502
503
#define IMPLEMENT_ASN1_FUNCTIONS_name(stname, itname) \
504
  IMPLEMENT_ASN1_FUNCTIONS_fname(stname, itname, itname)
505
506
#define IMPLEMENT_ASN1_FUNCTIONS_ENCODE_name(stname, itname) \
507
  IMPLEMENT_ASN1_FUNCTIONS_ENCODE_fname(stname, itname, itname)
508
509
#define IMPLEMENT_STATIC_ASN1_ALLOC_FUNCTIONS(stname) \
510
  IMPLEMENT_ASN1_ALLOC_FUNCTIONS_pfname(static, stname, stname, stname)
511
512
#define IMPLEMENT_ASN1_ALLOC_FUNCTIONS(stname) \
513
  IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, stname, stname)
514
515
#define IMPLEMENT_ASN1_ALLOC_FUNCTIONS_pfname(pre, stname, itname, fname) \
516
  pre stname *fname##_new(void) {                                         \
517
    return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));               \
518
  }                                                                       \
519
  pre void fname##_free(stname *a) {                                      \
520
    ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));              \
521
  }
522
523
#define IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname) \
524
520k
  stname *fname##_new(void) {                                       \
525
520k
    return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));         \
526
520k
  }                                                                 \
GENERAL_SUBTREE_new
Line
Count
Source
524
2.47k
  stname *fname##_new(void) {                                       \
525
2.47k
    return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));         \
526
2.47k
  }                                                                 \
NAME_CONSTRAINTS_new
Line
Count
Source
524
421
  stname *fname##_new(void) {                                       \
525
421
    return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));         \
526
421
  }                                                                 \
POLICY_CONSTRAINTS_new
Line
Count
Source
524
609
  stname *fname##_new(void) {                                       \
525
609
    return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));         \
526
609
  }                                                                 \
POLICY_MAPPING_new
Line
Count
Source
524
284
  stname *fname##_new(void) {                                       \
525
284
    return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));         \
526
284
  }                                                                 \
Unexecuted instantiation: X509_ATTRIBUTE_new
X509_EXTENSION_new
Line
Count
Source
524
9.36k
  stname *fname##_new(void) {                                       \
525
9.36k
    return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));         \
526
9.36k
  }                                                                 \
X509_NAME_ENTRY_new
Line
Count
Source
524
23.8k
  stname *fname##_new(void) {                                       \
525
23.8k
    return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));         \
526
23.8k
  }                                                                 \
X509_NAME_new
Line
Count
Source
524
8.62k
  stname *fname##_new(void) {                                       \
525
8.62k
    return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));         \
526
8.62k
  }                                                                 \
Unexecuted instantiation: X509_PUBKEY_new
Unexecuted instantiation: X509_REQ_INFO_new
Unexecuted instantiation: X509_REQ_new
X509_CINF_new
Line
Count
Source
524
23.7k
  stname *fname##_new(void) {                                       \
525
23.7k
    return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));         \
526
23.7k
  }                                                                 \
Unexecuted instantiation: X509_CERT_AUX_new
ASN1_NULL_new
Line
Count
Source
524
35
  stname *fname##_new(void) {                                       \
525
35
    return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));         \
526
35
  }                                                                 \
ASN1_TYPE_new
Line
Count
Source
524
74.3k
  stname *fname##_new(void) {                                       \
525
74.3k
    return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));         \
526
74.3k
  }                                                                 \
Unexecuted instantiation: DISPLAYTEXT_new
Unexecuted instantiation: DIRECTORYSTRING_new
AUTHORITY_KEYID_new
Line
Count
Source
524
158
  stname *fname##_new(void) {                                       \
525
158
    return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));         \
526
158
  }                                                                 \
BASIC_CONSTRAINTS_new
Line
Count
Source
524
213
  stname *fname##_new(void) {                                       \
525
213
    return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));         \
526
213
  }                                                                 \
Unexecuted instantiation: CERTIFICATEPOLICIES_new
POLICYINFO_new
Line
Count
Source
524
5.53k
  stname *fname##_new(void) {                                       \
525
5.53k
    return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));         \
526
5.53k
  }                                                                 \
POLICYQUALINFO_new
Line
Count
Source
524
5.72k
  stname *fname##_new(void) {                                       \
525
5.72k
    return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));         \
526
5.72k
  }                                                                 \
USERNOTICE_new
Line
Count
Source
524
4.67k
  stname *fname##_new(void) {                                       \
525
4.67k
    return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));         \
526
4.67k
  }                                                                 \
NOTICEREF_new
Line
Count
Source
524
3.08k
  stname *fname##_new(void) {                                       \
525
3.08k
    return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));         \
526
3.08k
  }                                                                 \
DIST_POINT_NAME_new
Line
Count
Source
524
74.2k
  stname *fname##_new(void) {                                       \
525
74.2k
    return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));         \
526
74.2k
  }                                                                 \
DIST_POINT_new
Line
Count
Source
524
85.1k
  stname *fname##_new(void) {                                       \
525
85.1k
    return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));         \
526
85.1k
  }                                                                 \
Unexecuted instantiation: CRL_DIST_POINTS_new
ISSUING_DIST_POINT_new
Line
Count
Source
524
564
  stname *fname##_new(void) {                                       \
525
564
    return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));         \
526
564
  }                                                                 \
Unexecuted instantiation: EXTENDED_KEY_USAGE_new
OTHERNAME_new
Line
Count
Source
524
70.0k
  stname *fname##_new(void) {                                       \
525
70.0k
    return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));         \
526
70.0k
  }                                                                 \
Unexecuted instantiation: EDIPARTYNAME_new
GENERAL_NAME_new
Line
Count
Source
524
99.6k
  stname *fname##_new(void) {                                       \
525
99.6k
    return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));         \
526
99.6k
  }                                                                 \
GENERAL_NAMES_new
Line
Count
Source
524
3.29k
  stname *fname##_new(void) {                                       \
525
3.29k
    return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));         \
526
3.29k
  }                                                                 \
ACCESS_DESCRIPTION_new
Line
Count
Source
524
291
  stname *fname##_new(void) {                                       \
525
291
    return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));         \
526
291
  }                                                                 \
Unexecuted instantiation: AUTHORITY_INFO_ACCESS_new
X509_ALGOR_new
Line
Count
Source
524
23.7k
  stname *fname##_new(void) {                                       \
525
23.7k
    return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname));         \
526
23.7k
  }                                                                 \
Unexecuted instantiation: X509_REVOKED_new
Unexecuted instantiation: X509_CRL_INFO_new
Unexecuted instantiation: X509_CRL_new
Unexecuted instantiation: X509_SIG_new
Unexecuted instantiation: NETSCAPE_SPKAC_new
Unexecuted instantiation: NETSCAPE_SPKI_new
Unexecuted instantiation: X509_VAL_new
Unexecuted instantiation: ASN1_TIME_new
Unexecuted instantiation: PKCS8_PRIV_KEY_INFO_new
Unexecuted instantiation: RSA_PSS_PARAMS_new
527
534k
  void fname##_free(stname *a) {                                    \
528
534k
    ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));        \
529
534k
  }
GENERAL_SUBTREE_free
Line
Count
Source
527
377
  void fname##_free(stname *a) {                                    \
528
377
    ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));        \
529
377
  }
NAME_CONSTRAINTS_free
Line
Count
Source
527
24.1k
  void fname##_free(stname *a) {                                    \
528
24.1k
    ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));        \
529
24.1k
  }
POLICY_CONSTRAINTS_free
Line
Count
Source
527
589
  void fname##_free(stname *a) {                                    \
528
589
    ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));        \
529
589
  }
POLICY_MAPPING_free
Line
Count
Source
527
169
  void fname##_free(stname *a) {                                    \
528
169
    ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));        \
529
169
  }
Unexecuted instantiation: X509_ATTRIBUTE_free
X509_EXTENSION_free
Line
Count
Source
527
25.8k
  void fname##_free(stname *a) {                                    \
528
25.8k
    ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));        \
529
25.8k
  }
X509_NAME_ENTRY_free
Line
Count
Source
527
34.8k
  void fname##_free(stname *a) {                                    \
528
34.8k
    ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));        \
529
34.8k
  }
X509_NAME_free
Line
Count
Source
527
75.9k
  void fname##_free(stname *a) {                                    \
528
75.9k
    ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));        \
529
75.9k
  }
Unexecuted instantiation: X509_PUBKEY_free
Unexecuted instantiation: X509_REQ_INFO_free
Unexecuted instantiation: X509_REQ_free
X509_CINF_free
Line
Count
Source
527
23.7k
  void fname##_free(stname *a) {                                    \
528
23.7k
    ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));        \
529
23.7k
  }
X509_CERT_AUX_free
Line
Count
Source
527
23.7k
  void fname##_free(stname *a) {                                    \
528
23.7k
    ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));        \
529
23.7k
  }
Unexecuted instantiation: ASN1_NULL_free
ASN1_TYPE_free
Line
Count
Source
527
74.3k
  void fname##_free(stname *a) {                                    \
528
74.3k
    ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));        \
529
74.3k
  }
Unexecuted instantiation: DISPLAYTEXT_free
Unexecuted instantiation: DIRECTORYSTRING_free
AUTHORITY_KEYID_free
Line
Count
Source
527
23.7k
  void fname##_free(stname *a) {                                    \
528
23.7k
    ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));        \
529
23.7k
  }
BASIC_CONSTRAINTS_free
Line
Count
Source
527
172
  void fname##_free(stname *a) {                                    \
528
172
    ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));        \
529
172
  }
Unexecuted instantiation: CERTIFICATEPOLICIES_free
POLICYINFO_free
Line
Count
Source
527
2.05k
  void fname##_free(stname *a) {                                    \
528
2.05k
    ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));        \
529
2.05k
  }
POLICYQUALINFO_free
Line
Count
Source
527
164
  void fname##_free(stname *a) {                                    \
528
164
    ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));        \
529
164
  }
Unexecuted instantiation: USERNOTICE_free
Unexecuted instantiation: NOTICEREF_free
Unexecuted instantiation: DIST_POINT_NAME_free
DIST_POINT_free
Line
Count
Source
527
3.41k
  void fname##_free(stname *a) {                                    \
528
3.41k
    ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));        \
529
3.41k
  }
CRL_DIST_POINTS_free
Line
Count
Source
527
23.7k
  void fname##_free(stname *a) {                                    \
528
23.7k
    ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));        \
529
23.7k
  }
ISSUING_DIST_POINT_free
Line
Count
Source
527
531
  void fname##_free(stname *a) {                                    \
528
531
    ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));        \
529
531
  }
Unexecuted instantiation: EXTENDED_KEY_USAGE_free
OTHERNAME_free
Line
Count
Source
527
18
  void fname##_free(stname *a) {                                    \
528
18
    ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));        \
529
18
  }
Unexecuted instantiation: EDIPARTYNAME_free
GENERAL_NAME_free
Line
Count
Source
527
138k
  void fname##_free(stname *a) {                                    \
528
138k
    ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));        \
529
138k
  }
GENERAL_NAMES_free
Line
Count
Source
527
34.5k
  void fname##_free(stname *a) {                                    \
528
34.5k
    ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));        \
529
34.5k
  }
ACCESS_DESCRIPTION_free
Line
Count
Source
527
246
  void fname##_free(stname *a) {                                    \
528
246
    ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));        \
529
246
  }
Unexecuted instantiation: AUTHORITY_INFO_ACCESS_free
X509_ALGOR_free
Line
Count
Source
527
23.7k
  void fname##_free(stname *a) {                                    \
528
23.7k
    ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname));        \
529
23.7k
  }
Unexecuted instantiation: X509_REVOKED_free
Unexecuted instantiation: X509_CRL_INFO_free
Unexecuted instantiation: X509_CRL_free
Unexecuted instantiation: X509_SIG_free
Unexecuted instantiation: NETSCAPE_SPKAC_free
Unexecuted instantiation: NETSCAPE_SPKI_free
Unexecuted instantiation: X509_VAL_free
Unexecuted instantiation: ASN1_TIME_free
Unexecuted instantiation: PKCS8_PRIV_KEY_INFO_free
Unexecuted instantiation: RSA_PSS_PARAMS_free
530
531
#define IMPLEMENT_ASN1_FUNCTIONS_fname(stname, itname, fname)  \
532
  IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname) \
533
  IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname)
534
535
#define IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname)    \
536
0
  stname *d2i_##fname(stname **a, const unsigned char **in, long len) { \
537
0
    return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,           \
538
0
                                   ASN1_ITEM_rptr(itname));             \
539
0
  }                                                                     \
Unexecuted instantiation: d2i_X509_NAME
Unexecuted instantiation: d2i_X509_REQ_INFO
Unexecuted instantiation: d2i_X509_REQ
Unexecuted instantiation: d2i_X509_CINF
Unexecuted instantiation: d2i_AUTHORITY_KEYID
Unexecuted instantiation: d2i_CRL_DIST_POINTS
Unexecuted instantiation: d2i_ISSUING_DIST_POINT
Unexecuted instantiation: d2i_GENERAL_NAME
Unexecuted instantiation: d2i_GENERAL_NAMES
Unexecuted instantiation: d2i_AUTHORITY_INFO_ACCESS
Unexecuted instantiation: d2i_X509_CRL_INFO
Unexecuted instantiation: d2i_X509_CRL
540
0
  int i2d_##fname(stname *a, unsigned char **out) {                     \
541
0
    return ASN1_item_i2d((ASN1_VALUE *)a, out, ASN1_ITEM_rptr(itname)); \
542
0
  }
Unexecuted instantiation: i2d_X509_NAME
Unexecuted instantiation: i2d_X509_REQ_INFO
Unexecuted instantiation: i2d_X509_REQ
Unexecuted instantiation: i2d_X509_CINF
Unexecuted instantiation: i2d_AUTHORITY_KEYID
Unexecuted instantiation: i2d_CRL_DIST_POINTS
Unexecuted instantiation: i2d_ISSUING_DIST_POINT
Unexecuted instantiation: i2d_GENERAL_NAME
Unexecuted instantiation: i2d_GENERAL_NAMES
Unexecuted instantiation: i2d_AUTHORITY_INFO_ACCESS
Unexecuted instantiation: i2d_X509_CRL_INFO
Unexecuted instantiation: i2d_X509_CRL
543
544
/* This includes evil casts to remove const: they will go away when full
545
 * ASN1 constification is done.
546
 */
547
#define IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(stname, itname, fname) \
548
74.3k
  stname *d2i_##fname(stname **a, const unsigned char **in, long len) {    \
549
74.3k
    return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,              \
550
74.3k
                                   ASN1_ITEM_rptr(itname));                \
551
74.3k
  }                                                                        \
Unexecuted instantiation: d2i_X509_ATTRIBUTE
Unexecuted instantiation: d2i_X509_EXTENSION
Unexecuted instantiation: d2i_X509_EXTENSIONS
Unexecuted instantiation: d2i_X509_PUBKEY
Unexecuted instantiation: d2i_X509_CERT_AUX
Unexecuted instantiation: d2i_ASN1_OCTET_STRING
Unexecuted instantiation: d2i_ASN1_INTEGER
Unexecuted instantiation: d2i_ASN1_ENUMERATED
Unexecuted instantiation: d2i_ASN1_BIT_STRING
Unexecuted instantiation: d2i_ASN1_UTF8STRING
Unexecuted instantiation: d2i_ASN1_PRINTABLESTRING
Unexecuted instantiation: d2i_ASN1_T61STRING
Unexecuted instantiation: d2i_ASN1_IA5STRING
Unexecuted instantiation: d2i_ASN1_GENERALSTRING
Unexecuted instantiation: d2i_ASN1_UTCTIME
Unexecuted instantiation: d2i_ASN1_GENERALIZEDTIME
Unexecuted instantiation: d2i_ASN1_VISIBLESTRING
Unexecuted instantiation: d2i_ASN1_UNIVERSALSTRING
Unexecuted instantiation: d2i_ASN1_BMPSTRING
Unexecuted instantiation: d2i_ASN1_NULL
d2i_ASN1_TYPE
Line
Count
Source
548
74.3k
  stname *d2i_##fname(stname **a, const unsigned char **in, long len) {    \
549
74.3k
    return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,              \
550
74.3k
                                   ASN1_ITEM_rptr(itname));                \
551
74.3k
  }                                                                        \
Unexecuted instantiation: d2i_DISPLAYTEXT
Unexecuted instantiation: d2i_DIRECTORYSTRING
Unexecuted instantiation: d2i_ASN1_SEQUENCE_ANY
Unexecuted instantiation: d2i_ASN1_SET_ANY
Unexecuted instantiation: d2i_BASIC_CONSTRAINTS
Unexecuted instantiation: d2i_CERTIFICATEPOLICIES
Unexecuted instantiation: d2i_EXTENDED_KEY_USAGE
Unexecuted instantiation: d2i_X509_ALGOR
Unexecuted instantiation: d2i_X509_REVOKED
Unexecuted instantiation: d2i_X509_SIG
Unexecuted instantiation: d2i_NETSCAPE_SPKAC
Unexecuted instantiation: d2i_NETSCAPE_SPKI
Unexecuted instantiation: d2i_X509_VAL
Unexecuted instantiation: d2i_ASN1_TIME
Unexecuted instantiation: d2i_PKCS8_PRIV_KEY_INFO
Unexecuted instantiation: d2i_RSA_PSS_PARAMS
552
3.92k
  int i2d_##fname(const stname *a, unsigned char **out) {                  \
553
3.92k
    return ASN1_item_i2d((ASN1_VALUE *)a, out, ASN1_ITEM_rptr(itname));    \
554
3.92k
  }
Unexecuted instantiation: i2d_X509_ATTRIBUTE
Unexecuted instantiation: i2d_X509_EXTENSION
Unexecuted instantiation: i2d_X509_EXTENSIONS
Unexecuted instantiation: i2d_X509_PUBKEY
Unexecuted instantiation: i2d_X509_CERT_AUX
Unexecuted instantiation: i2d_ASN1_OCTET_STRING
Unexecuted instantiation: i2d_ASN1_INTEGER
Unexecuted instantiation: i2d_ASN1_ENUMERATED
Unexecuted instantiation: i2d_ASN1_BIT_STRING
Unexecuted instantiation: i2d_ASN1_UTF8STRING
Unexecuted instantiation: i2d_ASN1_PRINTABLESTRING
Unexecuted instantiation: i2d_ASN1_T61STRING
Unexecuted instantiation: i2d_ASN1_IA5STRING
Unexecuted instantiation: i2d_ASN1_GENERALSTRING
Unexecuted instantiation: i2d_ASN1_UTCTIME
Unexecuted instantiation: i2d_ASN1_GENERALIZEDTIME
Unexecuted instantiation: i2d_ASN1_VISIBLESTRING
Unexecuted instantiation: i2d_ASN1_UNIVERSALSTRING
Unexecuted instantiation: i2d_ASN1_BMPSTRING
Unexecuted instantiation: i2d_ASN1_NULL
i2d_ASN1_TYPE
Line
Count
Source
552
3.92k
  int i2d_##fname(const stname *a, unsigned char **out) {                  \
553
3.92k
    return ASN1_item_i2d((ASN1_VALUE *)a, out, ASN1_ITEM_rptr(itname));    \
554
3.92k
  }
Unexecuted instantiation: i2d_DISPLAYTEXT
Unexecuted instantiation: i2d_DIRECTORYSTRING
Unexecuted instantiation: i2d_ASN1_SEQUENCE_ANY
Unexecuted instantiation: i2d_ASN1_SET_ANY
Unexecuted instantiation: i2d_BASIC_CONSTRAINTS
Unexecuted instantiation: i2d_CERTIFICATEPOLICIES
Unexecuted instantiation: i2d_EXTENDED_KEY_USAGE
Unexecuted instantiation: i2d_X509_ALGOR
Unexecuted instantiation: i2d_X509_REVOKED
Unexecuted instantiation: i2d_X509_SIG
Unexecuted instantiation: i2d_NETSCAPE_SPKAC
Unexecuted instantiation: i2d_NETSCAPE_SPKI
Unexecuted instantiation: i2d_X509_VAL
Unexecuted instantiation: i2d_ASN1_TIME
Unexecuted instantiation: i2d_PKCS8_PRIV_KEY_INFO
Unexecuted instantiation: i2d_RSA_PSS_PARAMS
555
556
#define IMPLEMENT_ASN1_DUP_FUNCTION(stname)                    \
557
71
  stname *stname##_dup(stname *x) {                            \
558
71
    return (stname *)ASN1_item_dup(ASN1_ITEM_rptr(stname), x); \
559
71
  }
X509_NAME_dup
Line
Count
Source
557
71
  stname *stname##_dup(stname *x) {                            \
558
71
    return (stname *)ASN1_item_dup(ASN1_ITEM_rptr(stname), x); \
559
71
  }
Unexecuted instantiation: X509_REQ_dup
Unexecuted instantiation: GENERAL_NAME_dup
Unexecuted instantiation: X509_CRL_dup
560
561
#define IMPLEMENT_ASN1_DUP_FUNCTION_const(stname)                      \
562
22.8k
  stname *stname##_dup(const stname *x) {                              \
563
22.8k
    return (stname *)ASN1_item_dup(ASN1_ITEM_rptr(stname), (void *)x); \
564
22.8k
  }
Unexecuted instantiation: X509_ATTRIBUTE_dup
X509_EXTENSION_dup
Line
Count
Source
562
9.36k
  stname *stname##_dup(const stname *x) {                              \
563
9.36k
    return (stname *)ASN1_item_dup(ASN1_ITEM_rptr(stname), (void *)x); \
564
9.36k
  }
X509_NAME_ENTRY_dup
Line
Count
Source
562
13.5k
  stname *stname##_dup(const stname *x) {                              \
563
13.5k
    return (stname *)ASN1_item_dup(ASN1_ITEM_rptr(stname), (void *)x); \
564
13.5k
  }
Unexecuted instantiation: X509_ALGOR_dup
Unexecuted instantiation: X509_REVOKED_dup
565
566
#define IMPLEMENT_ASN1_FUNCTIONS_const(name) \
567
  IMPLEMENT_ASN1_FUNCTIONS_const_fname(name, name, name)
568
569
#define IMPLEMENT_ASN1_FUNCTIONS_const_fname(stname, itname, fname)  \
570
  IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(stname, itname, fname) \
571
  IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname)
572
573
/* external definitions for primitive types */
574
575
DECLARE_ASN1_ITEM(ASN1_SEQUENCE)
576
577
DEFINE_STACK_OF(ASN1_VALUE)
578
579
580
#if defined(__cplusplus)
581
}  // extern "C"
582
#endif
583
584
#endif  // OPENSSL_HEADER_ASN1T_H