3b8da2e174de8c6f477a8eb22031924b72433a84
[metze/wireshark/wip.git] / asn1 / x411 / x411.cnf
1 #.TYPE_ATTR
2 CountryName             TYPE = FT_UINT32  DISPLAY = BASE_DEC   STRINGS = VALS(x411_CountryName_vals)  BITMASK = 0
3 Time                    TYPE = FT_STRING  DISPLAY = BASE_NONE  STRING = NULL BITMASK = 0
4
5 #.MODULE_IMPORT
6 InformationFramework x509if
7 CertificateExtensions x509ce
8 SelectedAttributeTypes x509sat
9 AuthenticationFramework x509af
10
11 #.INCLUDE ../x509ce/x509ce-exp.cnf
12 #.INCLUDE ../x509if/x509if-exp.cnf
13 #.INCLUDE ../x509sat/x509sat-exp.cnf
14 #.INCLUDE ../x509af/x509af-exp.cnf
15
16 #.EXPORTS
17 EncodedInformationTypes
18 ExtendedCertificates
19 G3FacsimileNonBasicParameters
20 MessageDeliveryTime
21 ORName
22 OtherMessageDeliveryFields
23 SupplementaryInformation
24 TeletexNonBasicParameters
25 SecurityLabel
26 UniversalOrBMPString
27 MessageDeliveryIdentifier
28 ProofOfSubmission
29 OriginatingMTACertificate
30 MessageSubmissionEnvelope
31
32 #.TYPE_RENAME
33 MTABindArgument/authenticated   AuthenticatedArgument
34 MTABindResult/authenticated     AuthenticatedResult
35
36 ExtensionField/value            ExtensionValue
37 SecurityCategory/value          CategoryValue
38
39 #.FIELD_RENAME
40 TeletexPersonalName/surname     teletex-surname
41 PersonalName/surname            printable-surname
42 UniversalPersonalName/surname   universal-surname
43
44 TeletexPersonalName/given-name  teletex-given-name
45 PersonalName/given-name         printable-given-name
46 UniversalPersonalName/given-name        universal-given-name
47
48 TeletexPersonalName/initials    teletex-initials
49 PersonalName/initials           printable-initials
50 UniversalPersonalName/initials  universal-initials
51
52 TeletexPersonalName/generation-qualifier        teletex-generation-qualifier
53 PersonalName/generation-qualifier               printable-generation-qualifier
54 UniversalPersonalName/generation-qualifier      universal-generation-qualifier
55
56 BuiltInDomainDefinedAttribute/type      printable-type
57 UniversalDomainDefinedAttribute/type    universal-type
58 SecurityCategory/type                   category-type
59 ExtensionField/type                     extension-type
60
61 TeletexDomainDefinedAttribute/value     teletex-value
62 BuiltInDomainDefinedAttribute/value     printable-value
63 UniversalDomainDefinedAttribute/value   universal-value
64 SecurityCategory/value                  category-value
65 ExtensionField/value                    extension-value
66
67 LastTraceInformation/report-type        trace-report-type
68 PerRecipientReportDeliveryFields/report-type    delivery-report-type
69 PerRecipientReportFields/report-type/delivery           report-type-delivery
70
71 PerRecipientMessageSubmissionFields/recipient-name      submission-recipient-name
72 PerRecipientProbeSubmissionFields/recipient-name        probe-recipient-name
73
74 PerRecipientReportTransferFields/actual-recipient-name  mta-actual-recipient-name
75
76 MessageClass/priority                   class-priority
77 DeliveryQueue/octets                    delivery-queue-octets
78 PerRecipientReportFields/report-type/non-delivery       non-delivery-report
79
80 MTABindResult/authenticated     authenticated-result
81 MTABindArgument/authenticated   authenticated-argument
82
83 MTABindResult/authenticated/responder-name      authenticated-responder-name
84 MTABindArgument/authenticated/initiator-name    authenticated-initiator-name
85
86 RegistrationTypes/extensions            type-extensions
87 RegistrationTypes/extensions/_item      type-extensions-item
88
89 MessageSubmissionArgument/envelope      message-submission-envelope
90
91 OtherMessageDeliveryFields/content-type delivered-content-type
92 Report/content                          report-content
93
94 PerDomainBilateralInformation/domain    bilateral-domain
95
96 Report/envelope                         report-envelope
97 Message/envelope                        message-envelope
98
99 PerRecipientReportTransferFields/originally-intended-recipient-name     report-originally-intended-recipient-name
100
101 MessageSubmissionEnvelope/originator-name       mts-originator-name
102 ProbeSubmissionEnvelope/originator-name         mts-originator-name
103
104 MessageTransferEnvelope/originator-name         mta-originator-name
105 ProbeTransferEnvelope/originator-name           mta-originator-name
106
107 MessageSubmissionEnvelope/per-recipient-fields  per-recipient-message-submission-fields
108 ProbeTransferEnvelope/per-recipient-fields      per-recipient-probe-transfer-fields
109 ProbeSubmissionEnvelope/per-recipient-fields    per-recipient-probe-submission-fields
110 ReportDeliveryArgument/per-recipient-fields     per-recipient-report-delivery-fields
111 ReportDeliveryEnvelope/per-recipient-fields     per-recipient-report-delivery-fields
112
113 MessageSubmissionEnvelope/per-recipient-fields/_item    per-recipient-message-submission-fields-item
114 ProbeTransferEnvelope/per-recipient-fields/_item        per-recipient-probe-transfer-fields-item
115 ProbeSubmissionEnvelope/per-recipient-fields/_item      per-recipient-probe-submission-fields-item
116 ReportDeliveryArgument/per-recipient-fields/_item       per-recipient-report-delivery-fields-item
117 ReportDeliveryEnvelope/per-recipient-fields/_item       per-recipient-report-delivery-fields-item
118
119 MessageTransferEnvelope/per-recipient-fields/_item      per-recipient-message-fields-item
120
121
122
123 MessageTransferEnvelope/per-recipient-fields            per-recipient-message-fields
124 ReportTransferContent/per-recipient-fields              per-recipient-report-fields
125
126 #.PDU
127 MTABindArgument
128 MTABindResult
129 MTABindError
130 MTS-APDU
131
132 #.REGISTER
133 RecipientReassignmentProhibited B "x411.extension.1" "recipient-reassignment-prohibited"
134 MTSOriginatorRequestedAlternateRecipient B "x411.extension.2" "originator-requested-alternate-recipient"
135 DLExpansionProhibited B "x411.extension.3" "dl-expansion-prohibited"
136 ConversionWithLossProhibited B "x411.extension.4" "conversion-with-loss-prohibited"
137 LatestDeliveryTime B "x411.extension.5" "latest-delivery-time"
138 RequestedDeliveryMethod B "x411.extension.6" "requested-delivery-method"
139 PhysicalForwardingProhibited B "x411.extension.7" "physical-forwarding-prohibited"
140 PhysicalForwardingAddressRequest B "x411.extension.8" "physical-forwarding-address-request"
141 PhysicalDeliveryModes B "x411.extension.9" "physical-delivery-modes"
142 RegisteredMailType B "x411.extension.10" "registered-mail-type"
143 RecipientNumberForAdvice B "x411.extension.11" "recipient-number-for-advice"
144 PhysicalRenditionAttributes B "x411.extension.12" "physical-rendition-attributes"
145 OriginatorReturnAddress B "x411.extension.13" "originator-return-address"
146 PhysicalDeliveryReportRequest B "x411.extension.14" "physical-delivery-report-request"
147 OriginatorCertificate B "x411.extension.15" "originator-certificate"
148
149 ContentConfidentialityAlgorithmIdentifier B "x411.extension.17" "content-confidentiality-algorithm-identifier"
150 ContentIntegrityCheck B "x411.extension.18" "content-integrity-check"
151 MessageOriginAuthenticationCheck B "x411.extension.19" "message-origin-authentication-check"
152 MessageSecurityLabel B "x411.extension.20" "message-security-label"
153 ProofOfSubmissionRequest B "x411.extension.21" "proof-of-submission-request"
154 ProofOfDeliveryRequest B "x411.extension.22" "proof-of-delivery-request"
155 ContentCorrelator B "x411.extension.23" "content-correlator"
156 ProbeOriginAuthenticationCheck B "x411.extension.24" "probe-origin-authentication-check"
157 RedirectionHistory B "x411.extension.25" "redirection-history"
158 DLExpansionHistory B "x411.extension.26" "dl-expansion-history"
159 PhysicalForwardingAddress B "x411.extension.27" "physical-forwarding-address"
160
161
162 OriginatorAndDLExpansionHistory B "x411.extension.30" "originator-and-DL-expansion-history"
163 ReportingDLName B "x411.extension.31" "reporting-DL-name"
164 ReportingMTACertificate B "x411.extension.32" "reporting-MTA-certificate"
165 ReportOriginAuthenticationCheck B "x411.extension.33" "report-origin-authentication-check"
166 ProofOfSubmission       B "x411.extension.35" "proof-of-submission"
167
168 TraceInformation B "x411.extension.37" "trace-information"
169 InternalTraceInformation B "x411.extension.38" "internal-trace-information"
170 ReportingMTAName B "x411.extension.39" "reporting-MTA-name"
171 ExtendedCertificates B "x411.extension.40" "multiple-originator-certificates"
172
173 DLExemptedRecipients B "x411.extension.42" "dl-exempted-recipients"
174
175
176 CertificateSelectors B "x411.extension.45" "certificate-selectors"
177
178 CommonName B "x411.extension-attribute.1" "common-name"
179 TeletexCommonName B "x411.extension-attribute.2" "teletex-common-name"
180 TeletexOrganizationName B "x411.extension-attribute.3" "teletex-organization-name"
181 TeletexPersonalName B "x411.extension-attribute.4" "teletex-personal-name"
182 TeletexOrganizationalUnitNames B "x411.extension-attribute.5" "teletex-organizational-unit-names"
183
184 PDSName B "x411.extension-attribute.7" "pds-name"
185 PhysicalDeliveryCountryName B "x411.extension-attribute.8" "physical-delivery-country-name"
186 PostalCode B "x411.extension-attribute.9" "postal-code"
187 PhysicalDeliveryOfficeName B "x411.extension-attribute.10" "physical-delivery-office-name"
188
189 UniversalCommonName B "x411.extension-attribute.24" "universal-common-name"
190 UniversalOrganizationName B "x411.extension-attribute.25" "universal-organization-name"
191 UniversalPersonalName B "x411.extension-attribute.26" "universal-personal-name"
192 UniversalOrganizationalUnitNames B "x411.extension-attribute.27" "universal-organizational-unit-names"
193
194 ReportDeliveryArgument  B       "2.6.1.4.14"    "id-et-report"
195
196 #.FN_BODY AdditionalInformation
197 /*XXX not implemented yet */
198
199 #.FN_BODY T_extensions_item
200 /*XXX not implemented yet */
201
202 #.FN_BODY ExtensionValue
203         const char *name;
204
205         if(extension_id != -1) 
206                 offset=call_x411_oid_callback("x411.extension", tvb, offset, pinfo, tree);
207         else if(object_identifier_id) {
208                 call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
209                 name = get_ber_oid_name(object_identifier_id);
210                 proto_item_append_text(tree, " (%%s)", name ? name : object_identifier_id); 
211         }
212                 
213
214 #.FN_BODY CategoryValue
215
216         offset = dissect_unknown_ber(pinfo, tvb, offset, tree);
217
218 #.FN_BODY T_extension_attribute_value
219
220         offset=call_x411_oid_callback("x411.extension-attribute", tvb, offset, pinfo, tree);
221
222 #.FN_BODY T_refused_extension
223 /*XXX not implemented yet */
224
225 #.FN_BODY CountryName
226  gint8 class;
227  gboolean pc, ind_field;
228  gint32 tag;
229  guint32 len1;
230
231  if(!implicit_tag){
232    /* XXX  asn2eth can not yet handle tagged assignment yes so this
233     * XXX is some conformance file magic to work around that bug
234     */
235     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
236     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
237  }
238
239  if(doing_address)
240     g_strlcat(oraddress, "/C=", MAX_ORA_STR_LEN);
241
242   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
243                               CountryName_choice, hf_index, ett_x411_CountryName, NULL);
244
245
246
247 #.FN_BODY AdministrationDomainName
248  gint8 class;
249  gboolean pc, ind_field;
250  gint32 tag;
251  guint32 len1;
252
253  if(!implicit_tag){
254    /* XXX  asn2eth can not yet handle tagged assignment yes so this
255     * XXX is some conformance file magic to work around that bug
256     */
257     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
258     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
259  }
260
261   if(doing_address)
262     g_strlcat(oraddress, "/A=", MAX_ORA_STR_LEN);
263
264   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
265                               AdministrationDomainName_choice, hf_index, ett_x411_AdministrationDomainName, NULL);
266
267 #.FN_BODY ContentIdentifier
268  gint8 class;
269  gboolean pc, ind_field;
270  gint32 tag;
271  guint32 len1;
272
273  if(!implicit_tag){
274    /* XXX  asn2eth can not yet handle tagged assignment yes so this
275     * XXX is some conformance file magic to work around that bug
276     */
277     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
278     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
279  }
280
281   /* this is magic I haven't seen used before - I've stripped the tag - but now I'm going to say it is IMPLICIT! */
282   offset = dissect_ber_restricted_string(TRUE, BER_UNI_TAG_PrintableString,
283                                          pinfo, tree, tvb, offset, hf_index,
284                                          NULL);
285
286
287 #.FN_PARS INTEGER
288         VAL_PTR = &extension_id
289
290 #.FN_PARS OBJECT_IDENTIFIER
291         FN_VARIANT = _str  VAL_PTR = &object_identifier_id
292
293 #.FN_BODY OBJECT_IDENTIFIER
294
295         %(DEFAULT_BODY)s
296         extension_id = -1;
297
298 #.FN_PARS ExtendedContentType
299         FN_VARIANT = _str  VAL_PTR = &content_type_id
300
301 #.FN_BODY ExtendedContentType
302         const char *name = NULL;
303
304         %(DEFAULT_BODY)s
305
306         if(content_type_id) {
307           name = get_ber_oid_name(content_type_id);
308
309           if(!name) name = content_type_id;
310
311           proto_item_append_text(tree, " (%%s)", name);
312         }
313
314 #.FN_PARS BuiltInContentType
315         VAL_PTR = &ict
316
317 #.FN_BODY BuiltInContentType
318   guint32       ict = -1;       
319
320   %(DEFAULT_BODY)s
321
322   /* convert integer content type to oid for dispatch when the content is found */
323   switch(ict) {
324         case 2:
325         content_type_id = ep_strdup("2.6.1.10.0");
326         break;
327         case 22:
328         content_type_id = ep_strdup("2.6.1.10.1");
329         break;
330         default:
331         break;
332         }
333
334 #.FN_BODY Content
335   tvbuff_t *next_tvb;
336
337   /* we can do this now constructed octet strings are supported */
338   offset = dissect_ber_octet_string(FALSE, pinfo, NULL, tvb, offset, hf_index, &next_tvb);
339
340   if (next_tvb && content_type_id)
341     (void) call_ber_oid_callback(content_type_id, next_tvb, 0, pinfo, top_tree ? top_tree : tree);
342
343 #.FN_PARS MTAName
344         VAL_PTR = &mtaname
345
346 #.FN_BODY MTAName
347         tvbuff_t        *mtaname = NULL;
348
349         %(DEFAULT_BODY)s
350
351         if(doing_address) {
352
353                 proto_item_append_text(address_item, " %%s", tvb_format_text(mtaname, 0, tvb_length(mtaname)));
354
355         } else {
356
357         if (check_col(pinfo->cinfo, COL_INFO) && mtaname) {
358                 col_append_fstr(pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(mtaname, 0, tvb_length(mtaname)));
359         }
360
361         }
362
363 #.FN_PARS X121Address
364         VAL_PTR=&string
365
366 #.FN_BODY X121Address
367         tvbuff_t        *string = NULL;
368
369         %(DEFAULT_BODY)s
370
371         if(doing_address && string) {
372                 g_strlcat(oraddress, "/X121=", MAX_ORA_STR_LEN);
373                 g_strlcat(oraddress, tvb_format_text(string, 0, tvb_length(string)), MAX_ORA_STR_LEN);
374         }
375
376
377 #.FN_PARS TerminalIdentifier
378         VAL_PTR=&string
379
380 #.FN_BODY TerminalIdentifier
381         tvbuff_t        *string = NULL;
382
383         %(DEFAULT_BODY)s
384
385         if(doing_address && string) {
386                 g_strlcat(oraddress, "/UA-ID=", MAX_ORA_STR_LEN);
387                 g_strlcat(oraddress, tvb_format_text(string, 0, tvb_length(string)), MAX_ORA_STR_LEN);
388         }
389
390 #.FN_BODY PrivateDomainName
391
392         if(doing_address)
393                 g_strlcat(oraddress, "/P=", MAX_ORA_STR_LEN);
394
395         %(DEFAULT_BODY)s
396
397 #.FN_BODY PrivateDomainIdentifier
398
399         if(doing_address)
400                 g_strlcat(oraddress, "/P=", MAX_ORA_STR_LEN);
401
402         %(DEFAULT_BODY)s
403
404 #.FN_PARS OrganizationName
405         VAL_PTR=&string
406
407 #.FN_BODY OrganizationName
408         tvbuff_t        *string = NULL;
409
410         %(DEFAULT_BODY)s
411
412         if(doing_address && string) {
413                 g_strlcat(oraddress, "/O=", MAX_ORA_STR_LEN);
414                 g_strlcat(oraddress, tvb_format_text(string, 0, tvb_length(string)), MAX_ORA_STR_LEN);
415         }
416
417 #.FN_PARS CommonName
418         VAL_PTR=&string
419
420 #.FN_BODY CommonName
421         tvbuff_t        *string = NULL;
422
423         %(DEFAULT_BODY)s
424
425         if(doing_address && string) {
426                 g_strlcat(oraddress, "/CN=", MAX_ORA_STR_LEN);
427                 g_strlcat(oraddress, tvb_format_text(string, 0, tvb_length(string)), MAX_ORA_STR_LEN);
428         }
429
430
431
432 #.FN_PARS NumericString
433         VAL_PTR=&nstring
434
435 #.FN_BODY NumericString
436         tvbuff_t        *nstring = NULL;
437
438         %(DEFAULT_BODY)s
439
440         if(doing_address && nstring)
441                 g_strlcat(oraddress, tvb_format_text(nstring, 0, tvb_length(nstring)), MAX_ORA_STR_LEN);
442
443 #.FN_PARS TeletexString
444
445 #.FN_BODY TeletexString
446         tvbuff_t        *tstring = NULL;
447
448         %(DEFAULT_BODY)s
449
450         if(doing_address && tstring) 
451                 g_strlcat(oraddress, tvb_format_text(tstring, 0, tvb_length(tstring)), MAX_ORA_STR_LEN);
452
453
454 #.FN_PARS PrintableString
455         VAL_PTR=&pstring
456
457 #.FN_BODY PrintableString
458         tvbuff_t        *pstring = NULL;
459         char            *fmt = NULL;
460
461         %(DEFAULT_BODY)s
462
463         if(doing_address && pstring) {
464           if(hf_index == hf_x411_printable_surname)                     fmt = "/S=";
465           else if(hf_index == hf_x411_printable_given_name)             fmt = "/G=";
466           else if(hf_index == hf_x411_printable_initials)               fmt = "/I=";
467           else if(hf_index == hf_x411_printable_generation_qualifier)   fmt = "/GQ=";
468           else if(hf_index == hf_x411_printable_type)                   fmt = "/DD.";
469           else if(hf_index == hf_x411_printable_value)                  fmt = "=";
470                 
471           if(fmt)
472             g_strlcat(oraddress, fmt, MAX_ORA_STR_LEN);
473
474           g_strlcat(oraddress, tvb_format_text(pstring, 0, tvb_length(pstring)), MAX_ORA_STR_LEN);
475
476         }
477
478 #.FN_BODY ORAddress
479         
480         oraddress = ep_alloc(MAX_ORA_STR_LEN); oraddress[0] = '\0';     
481         doing_address = TRUE;
482         address_item = NULL;
483
484         %(DEFAULT_BODY)s
485
486         if(*oraddress && address_item)
487                 proto_item_append_text(address_item, " %%s/", oraddress);
488
489         doing_address = FALSE;
490
491 #.FN_BODY ORName
492         
493         oraddress = ep_alloc(MAX_ORA_STR_LEN); oraddress[0] = '\0';     
494         address_item = NULL;
495         doing_address = TRUE;
496
497         %(DEFAULT_BODY)s
498
499         if(*oraddress && address_item)
500                 proto_item_append_text(address_item, " (%%s/)", oraddress);
501
502         doing_address = FALSE;
503
504 #.FN_BODY GlobalDomainIdentifier
505         
506         oraddress = ep_alloc(MAX_ORA_STR_LEN); oraddress[0] = '\0';     
507         address_item = tree;
508
509         %(DEFAULT_BODY)s
510
511         if(*oraddress)
512                 proto_item_append_text(address_item, " (%%s/", oraddress);
513
514
515 #.FN_PARS LocalIdentifier
516         VAL_PTR=&id
517
518 #.FN_BODY LocalIdentifier
519         tvbuff_t        *id = NULL;
520         
521         %(DEFAULT_BODY)s
522         
523         if(doing_address && id)
524           proto_item_append_text(address_item, " $ %%s)", tvb_format_text(id, 0, tvb_length(id)));
525
526 #.FN_BODY MTSIdentifier
527
528         doing_address = TRUE;
529
530         %(DEFAULT_BODY)s
531
532         doing_address = FALSE;
533
534 #.FN_BODY BuiltInStandardAttributes
535
536         address_item = tree;    
537
538         %(DEFAULT_BODY)s
539
540 #.FN_BODY TraceInformationElement
541
542         doing_address = TRUE;
543
544         %(DEFAULT_BODY)s
545
546         doing_address = FALSE;
547
548 #.FN_BODY InternalTraceInformationElement
549
550         doing_address = TRUE;
551
552         %(DEFAULT_BODY)s
553
554         doing_address = FALSE;
555
556
557 #.FN_BODY DomainSuppliedInformation
558
559         doing_address = FALSE;
560
561         %(DEFAULT_BODY)s
562
563         doing_address = TRUE;
564         proto_item_append_text(tree, ")");
565
566 #.FN_BODY MTASuppliedInformation
567
568         doing_address = FALSE;
569
570         %(DEFAULT_BODY)s
571
572         doing_address = TRUE;
573         proto_item_append_text(tree, ")");
574
575 #.FN_PARS Time
576         VAL_PTR = &arrival
577
578 #.FN_BODY Time
579         tvbuff_t *arrival = NULL;
580
581         %(DEFAULT_BODY)s
582
583         if(arrival)
584                 proto_item_append_text(address_item, " %%s", tvb_format_text(arrival, 0, tvb_length(arrival)));
585
586 #.FN_PARS RoutingAction
587         VAL_PTR = &action
588
589 #.FN_BODY RoutingAction
590         int action = 0;
591
592         %(DEFAULT_BODY)s
593
594         proto_item_append_text(address_item, " %%s", val_to_str(action, x411_RoutingAction_vals, "action(%%d)"));
595
596 #.FN_PARS MTABindError
597   VAL_PTR=&error
598
599 #.FN_BODY MTABindError
600   int error = -1;
601   %(DEFAULT_BODY)s
602   if((error != -1) && check_col(pinfo->cinfo, COL_INFO))
603     col_append_fstr(pinfo->cinfo, COL_INFO, " (%%s)", val_to_str(error, x411_MTABindError_vals, "error(%%d)"));
604
605
606 #.END