This file is indexed.

/usr/include/heimdal/crmf_asn1.h is in heimdal-multidev 1.6~git20120311.dfsg.1-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
/* Generated from ./crmf.asn1 */
/* Do not edit */

#ifndef __crmf_asn1_h__
#define __crmf_asn1_h__

#include <stddef.h>
#include <time.h>

#ifndef __asn1_common_definitions__
#define __asn1_common_definitions__

typedef struct heim_integer {
  size_t length;
  void *data;
  int negative;
} heim_integer;

#ifndef __HEIM_OCTET_STRING__
#define __HEIM_OCTET_STRING__
typedef struct heim_octet_string {
  size_t length;
  void *data;
} heim_octet_string;
#endif

typedef char *heim_general_string;

typedef char *heim_utf8_string;

typedef struct heim_octet_string heim_printable_string;

typedef struct heim_octet_string heim_ia5_string;

typedef struct heim_bmp_string {
  size_t length;
  uint16_t *data;
} heim_bmp_string;

typedef struct heim_universal_string {
  size_t length;
  uint32_t *data;
} heim_universal_string;

typedef char *heim_visible_string;

typedef struct heim_oid {
  size_t length;
  unsigned *components;
} heim_oid;

typedef struct heim_bit_string {
  size_t length;
  void *data;
} heim_bit_string;

typedef struct heim_octet_string heim_any;
typedef struct heim_octet_string heim_any_set;

#define ASN1_MALLOC_ENCODE(T, B, BL, S, L, R)                  \
  do {                                                         \
    (BL) = length_##T((S));                                    \
    (B) = malloc((BL));                                        \
    if((B) == NULL) {                                          \
      (R) = ENOMEM;                                            \
    } else {                                                   \
      (R) = encode_##T(((unsigned char*)(B)) + (BL) - 1, (BL), \
                       (S), (L));                              \
      if((R) != 0) {                                           \
        free((B));                                             \
        (B) = NULL;                                            \
      }                                                        \
    }                                                          \
  } while (0)

#ifdef _WIN32
#ifndef ASN1_LIB
#define ASN1EXP  __declspec(dllimport)
#else
#define ASN1EXP
#endif
#define ASN1CALL __stdcall
#else
#define ASN1EXP
#define ASN1CALL
#endif
struct units;

#endif

#include <rfc2459_asn1.h>
#include <heim_asn1.h>
/*
CRMFRDNSequence ::= SEQUENCE OF RelativeDistinguishedName
*/

typedef struct CRMFRDNSequence {
  unsigned int len;
  RelativeDistinguishedName *val;
} CRMFRDNSequence;

ASN1EXP int    ASN1CALL decode_CRMFRDNSequence(const unsigned char *, size_t, CRMFRDNSequence *, size_t *);
ASN1EXP int    ASN1CALL encode_CRMFRDNSequence(unsigned char *, size_t, const CRMFRDNSequence *, size_t *);
ASN1EXP size_t ASN1CALL length_CRMFRDNSequence(const CRMFRDNSequence *);
ASN1EXP int    ASN1CALL copy_CRMFRDNSequence  (const CRMFRDNSequence *, CRMFRDNSequence *);
ASN1EXP void   ASN1CALL free_CRMFRDNSequence  (CRMFRDNSequence *);


/*
Controls ::= SEQUENCE OF AttributeTypeAndValue
*/

typedef struct Controls {
  unsigned int len;
  AttributeTypeAndValue *val;
} Controls;

ASN1EXP int    ASN1CALL decode_Controls(const unsigned char *, size_t, Controls *, size_t *);
ASN1EXP int    ASN1CALL encode_Controls(unsigned char *, size_t, const Controls *, size_t *);
ASN1EXP size_t ASN1CALL length_Controls(const Controls *);
ASN1EXP int    ASN1CALL copy_Controls  (const Controls *, Controls *);
ASN1EXP void   ASN1CALL free_Controls  (Controls *);


/*
POPOSigningKey ::= SEQUENCE {
  poposkInput           [0] IMPLICIT POPOSigningKeyInput OPTIONAL,
  algorithmIdentifier   AlgorithmIdentifier,
  signature               BIT STRING {
  },
}
*/

typedef struct POPOSigningKey {
  POPOSigningKeyInput *poposkInput;
  AlgorithmIdentifier algorithmIdentifier;
  heim_bit_string signature;
} POPOSigningKey;

ASN1EXP int    ASN1CALL decode_POPOSigningKey(const unsigned char *, size_t, POPOSigningKey *, size_t *);
ASN1EXP int    ASN1CALL encode_POPOSigningKey(unsigned char *, size_t, const POPOSigningKey *, size_t *);
ASN1EXP size_t ASN1CALL length_POPOSigningKey(const POPOSigningKey *);
ASN1EXP int    ASN1CALL copy_POPOSigningKey  (const POPOSigningKey *, POPOSigningKey *);
ASN1EXP void   ASN1CALL free_POPOSigningKey  (POPOSigningKey *);


/*
PKMACValue ::= SEQUENCE {
  algId           AlgorithmIdentifier,
  value             BIT STRING {
  },
}
*/

typedef struct PKMACValue {
  AlgorithmIdentifier algId;
  heim_bit_string value;
} PKMACValue;

ASN1EXP int    ASN1CALL decode_PKMACValue(const unsigned char *, size_t, PKMACValue *, size_t *);
ASN1EXP int    ASN1CALL encode_PKMACValue(unsigned char *, size_t, const PKMACValue *, size_t *);
ASN1EXP size_t ASN1CALL length_PKMACValue(const PKMACValue *);
ASN1EXP int    ASN1CALL copy_PKMACValue  (const PKMACValue *, PKMACValue *);
ASN1EXP void   ASN1CALL free_PKMACValue  (PKMACValue *);


/*
POPOSigningKeyInput ::= SEQUENCE {
  authInfo        CHOICE {
    sender          [0] IMPLICIT GeneralName,
    publicKeyMAC    PKMACValue,
  },
  publicKey       SubjectPublicKeyInfo,
}
*/

typedef struct POPOSigningKeyInput {
  struct POPOSigningKeyInput_authInfo {
    enum POPOSigningKeyInput_authInfo_enum {
      choice_POPOSigningKeyInput_authInfo_sender = 1,
      choice_POPOSigningKeyInput_authInfo_publicKeyMAC
    } element;
    union {
      GeneralName sender;
      PKMACValue publicKeyMAC;
    } u;
  } authInfo;
  SubjectPublicKeyInfo publicKey;
} POPOSigningKeyInput;

ASN1EXP int    ASN1CALL decode_POPOSigningKeyInput(const unsigned char *, size_t, POPOSigningKeyInput *, size_t *);
ASN1EXP int    ASN1CALL encode_POPOSigningKeyInput(unsigned char *, size_t, const POPOSigningKeyInput *, size_t *);
ASN1EXP size_t ASN1CALL length_POPOSigningKeyInput(const POPOSigningKeyInput *);
ASN1EXP int    ASN1CALL copy_POPOSigningKeyInput  (const POPOSigningKeyInput *, POPOSigningKeyInput *);
ASN1EXP void   ASN1CALL free_POPOSigningKeyInput  (POPOSigningKeyInput *);


/*
PBMParameter ::= SEQUENCE {
  salt             OCTET STRING,
  owf              AlgorithmIdentifier,
  iterationCount   INTEGER,
  mac              AlgorithmIdentifier,
}
*/

typedef struct PBMParameter {
  heim_octet_string salt;
  AlgorithmIdentifier owf;
  heim_integer iterationCount;
  AlgorithmIdentifier mac;
} PBMParameter;

ASN1EXP int    ASN1CALL decode_PBMParameter(const unsigned char *, size_t, PBMParameter *, size_t *);
ASN1EXP int    ASN1CALL encode_PBMParameter(unsigned char *, size_t, const PBMParameter *, size_t *);
ASN1EXP size_t ASN1CALL length_PBMParameter(const PBMParameter *);
ASN1EXP int    ASN1CALL copy_PBMParameter  (const PBMParameter *, PBMParameter *);
ASN1EXP void   ASN1CALL free_PBMParameter  (PBMParameter *);


/*
SubsequentMessage ::= INTEGER {
  encrCert(0),
  challengeResp(1)
}
*/

typedef enum SubsequentMessage {
  encrCert = 0,
  challengeResp = 1
} SubsequentMessage;

ASN1EXP int    ASN1CALL decode_SubsequentMessage(const unsigned char *, size_t, SubsequentMessage *, size_t *);
ASN1EXP int    ASN1CALL encode_SubsequentMessage(unsigned char *, size_t, const SubsequentMessage *, size_t *);
ASN1EXP size_t ASN1CALL length_SubsequentMessage(const SubsequentMessage *);
ASN1EXP int    ASN1CALL copy_SubsequentMessage  (const SubsequentMessage *, SubsequentMessage *);
ASN1EXP void   ASN1CALL free_SubsequentMessage  (SubsequentMessage *);


/*
POPOPrivKey ::= CHOICE {
  thisMessage         [0]   BIT STRING {
  },
  subsequentMessage   [1] IMPLICIT SubsequentMessage,
  dhMAC               [2]   BIT STRING {
  },
  agreeMAC            [3] IMPLICIT PKMACValue,
  encryptedKey        [4] heim_any,
}
*/

typedef struct POPOPrivKey {
  enum POPOPrivKey_enum {
    choice_POPOPrivKey_thisMessage = 1,
    choice_POPOPrivKey_subsequentMessage,
    choice_POPOPrivKey_dhMAC,
    choice_POPOPrivKey_agreeMAC,
    choice_POPOPrivKey_encryptedKey
  } element;
  union {
    heim_bit_string thisMessage;
    SubsequentMessage subsequentMessage;
    heim_bit_string dhMAC;
    PKMACValue agreeMAC;
    heim_any encryptedKey;
  } u;
} POPOPrivKey;

ASN1EXP int    ASN1CALL decode_POPOPrivKey(const unsigned char *, size_t, POPOPrivKey *, size_t *);
ASN1EXP int    ASN1CALL encode_POPOPrivKey(unsigned char *, size_t, const POPOPrivKey *, size_t *);
ASN1EXP size_t ASN1CALL length_POPOPrivKey(const POPOPrivKey *);
ASN1EXP int    ASN1CALL copy_POPOPrivKey  (const POPOPrivKey *, POPOPrivKey *);
ASN1EXP void   ASN1CALL free_POPOPrivKey  (POPOPrivKey *);


/*
ProofOfPossession ::= CHOICE {
  raVerified        [0]   NULL,
  signature         [1] POPOSigningKey,
  keyEncipherment   [2] POPOPrivKey,
  keyAgreement      [3] POPOPrivKey,
}
*/

typedef struct ProofOfPossession {
  enum ProofOfPossession_enum {
    choice_ProofOfPossession_raVerified = 1,
    choice_ProofOfPossession_signature,
    choice_ProofOfPossession_keyEncipherment,
    choice_ProofOfPossession_keyAgreement
  } element;
  union {
    int raVerified;
    POPOSigningKey signature;
    POPOPrivKey keyEncipherment;
    POPOPrivKey keyAgreement;
  } u;
} ProofOfPossession;

ASN1EXP int    ASN1CALL decode_ProofOfPossession(const unsigned char *, size_t, ProofOfPossession *, size_t *);
ASN1EXP int    ASN1CALL encode_ProofOfPossession(unsigned char *, size_t, const ProofOfPossession *, size_t *);
ASN1EXP size_t ASN1CALL length_ProofOfPossession(const ProofOfPossession *);
ASN1EXP int    ASN1CALL copy_ProofOfPossession  (const ProofOfPossession *, ProofOfPossession *);
ASN1EXP void   ASN1CALL free_ProofOfPossession  (ProofOfPossession *);


/*
CertTemplate ::= SEQUENCE {
  version         [0] INTEGER OPTIONAL,
  serialNumber    [1] INTEGER OPTIONAL,
  signingAlg      [2] SEQUENCE {
    algorithm           OBJECT IDENTIFIER,
    parameters      heim_any OPTIONAL,
  } OPTIONAL,
  issuer          [3] IMPLICIT CHOICE {
    rdnSequence     CRMFRDNSequence,
  } OPTIONAL,
  validity        [4] SEQUENCE {
    notBefore       [0] Time OPTIONAL,
    notAfter        [1] Time OPTIONAL,
  } OPTIONAL,
  subject         [5] IMPLICIT CHOICE {
    rdnSequence     CRMFRDNSequence,
  } OPTIONAL,
  publicKey       [6] IMPLICIT SEQUENCE {
    algorithm          AlgorithmIdentifier,
    subjectPublicKey       BIT STRING {
    } OPTIONAL,
  } OPTIONAL,
  issuerUID       [7] IMPLICIT   BIT STRING {
  } OPTIONAL,
  subjectUID      [8] IMPLICIT   BIT STRING {
  } OPTIONAL,
  extensions      [9] IMPLICIT SEQUENCE OF Extension OPTIONAL,
}
*/

typedef struct CertTemplate {
  heim_integer *version;
  heim_integer *serialNumber;
  struct CertTemplate_signingAlg {
    heim_oid algorithm;
    heim_any *parameters;
  } *signingAlg;
  struct CertTemplate_issuer {
    enum CertTemplate_issuer_enum {
      choice_CertTemplate_issuer_rdnSequence = 1
    } element;
    union {
      CRMFRDNSequence rdnSequence;
    } u;
  } *issuer;
  struct CertTemplate_validity {
    Time *notBefore;
    Time *notAfter;
  } *validity;
  struct CertTemplate_subject {
    enum CertTemplate_subject_enum {
      choice_CertTemplate_subject_rdnSequence = 1
    } element;
    union {
      CRMFRDNSequence rdnSequence;
    } u;
  } *subject;
  struct CertTemplate_publicKey {
    AlgorithmIdentifier algorithm;
    heim_bit_string *subjectPublicKey;
  } *publicKey;
  heim_bit_string *issuerUID;
  heim_bit_string *subjectUID;
  struct CertTemplate_extensions {
    unsigned int len;
    Extension *val;
  } *extensions;
} CertTemplate;

ASN1EXP int    ASN1CALL decode_CertTemplate(const unsigned char *, size_t, CertTemplate *, size_t *);
ASN1EXP int    ASN1CALL encode_CertTemplate(unsigned char *, size_t, const CertTemplate *, size_t *);
ASN1EXP size_t ASN1CALL length_CertTemplate(const CertTemplate *);
ASN1EXP int    ASN1CALL copy_CertTemplate  (const CertTemplate *, CertTemplate *);
ASN1EXP void   ASN1CALL free_CertTemplate  (CertTemplate *);


/*
CertRequest ::= SEQUENCE {
  certReqId       INTEGER,
  certTemplate    CertTemplate,
  controls        Controls OPTIONAL,
}
*/

typedef struct CertRequest {
  heim_integer certReqId;
  CertTemplate certTemplate;
  Controls *controls;
} CertRequest;

ASN1EXP int    ASN1CALL decode_CertRequest(const unsigned char *, size_t, CertRequest *, size_t *);
ASN1EXP int    ASN1CALL encode_CertRequest(unsigned char *, size_t, const CertRequest *, size_t *);
ASN1EXP size_t ASN1CALL length_CertRequest(const CertRequest *);
ASN1EXP int    ASN1CALL copy_CertRequest  (const CertRequest *, CertRequest *);
ASN1EXP void   ASN1CALL free_CertRequest  (CertRequest *);


/*
CertReqMsg ::= SEQUENCE {
  certReq         CertRequest,
  popo            ProofOfPossession OPTIONAL,
  regInfo         SEQUENCE OF AttributeTypeAndValue OPTIONAL,
}
*/

typedef struct CertReqMsg {
  CertRequest certReq;
  ProofOfPossession *popo;
  struct CertReqMsg_regInfo {
    unsigned int len;
    AttributeTypeAndValue *val;
  } *regInfo;
} CertReqMsg;

ASN1EXP int    ASN1CALL decode_CertReqMsg(const unsigned char *, size_t, CertReqMsg *, size_t *);
ASN1EXP int    ASN1CALL encode_CertReqMsg(unsigned char *, size_t, const CertReqMsg *, size_t *);
ASN1EXP size_t ASN1CALL length_CertReqMsg(const CertReqMsg *);
ASN1EXP int    ASN1CALL copy_CertReqMsg  (const CertReqMsg *, CertReqMsg *);
ASN1EXP void   ASN1CALL free_CertReqMsg  (CertReqMsg *);


/*
CertReqMessages ::= SEQUENCE OF CertReqMsg
*/

typedef struct CertReqMessages {
  unsigned int len;
  CertReqMsg *val;
} CertReqMessages;

ASN1EXP int    ASN1CALL decode_CertReqMessages(const unsigned char *, size_t, CertReqMessages *, size_t *);
ASN1EXP int    ASN1CALL encode_CertReqMessages(unsigned char *, size_t, const CertReqMessages *, size_t *);
ASN1EXP size_t ASN1CALL length_CertReqMessages(const CertReqMessages *);
ASN1EXP int    ASN1CALL copy_CertReqMessages  (const CertReqMessages *, CertReqMessages *);
ASN1EXP void   ASN1CALL free_CertReqMessages  (CertReqMessages *);


#endif /* __crmf_asn1_h__ */