2 # X509IF conformation file
4 #.IMPORT ../x509sat/x509sat-exp.cnf
7 DirectoryAbstractService dap
13 &derivation ClassReference ATTRIBUTE
15 &equality-match ClassReference MATCHING-RULE
16 &ordering-match ClassReference MATCHING-RULE
17 &substrings-match ClassReference MATCHING-RULE
18 &single-valued BooleanType
19 &collective BooleanType
20 &no-user-modification BooleanType
21 &usage TypeReference AttributeUsage
22 &id ObjectIdentifierType
27 &id ObjectIdentifierType
30 &Superclasses ClassReference OBJECT-CLASS
31 &kind TypeReference ObjectClassKind
32 &MandatoryAttributes ClassReference ATTRIBUTE
33 &OptionalAttributes ClassReference ATTRIBUTE
34 &id ObjectIdentifierType
37 #.CLASS MATCHING-RESTRICTION
39 &Rules _FixedTypeValueSetFieldSpec
40 &id ObjectIdentifierType
44 &ParentMatchingRules ClassReference MATCHING-RULE
46 &uniqueMatchIndicator ClassReference ATTRIBUTE
47 &id ObjectIdentifierType
54 MAPPING-BASED-MATCHING
65 AttributeTypeAndDistinguishedValue
66 AttributeTypeAssertion
69 AttributeValueAssertion
90 RelativeDistinguishedName
107 AttributeTypeAndDistinguishedValue/valuesWithContext T_valWithContext
108 AttributeTypeAndDistinguishedValue/valuesWithContext/_item T_valWithContext_item
109 ChopSpecification/specificExclusions T_chopSpecificExclusions
110 ChopSpecification/specificExclusions/_item T_chopSpecificExclusions_item
113 AttributeTypeAssertion/assertedContexts ata_assertedContexts
114 AttributeTypeAndDistinguishedValue/value atadv_value
115 AttributeTypeAndDistinguishedValue/valuesWithContext valueswithContext
116 AttributeTypeAndDistinguishedValue/valuesWithContext/_item valueswithContext_item
117 ChopSpecification/specificExclusions chopSpecificExclusions
118 ChopSpecification/specificExclusions/_item chopSpecificExclusions_item
119 Refinement/and refinement_and
120 Refinement/and/_item refinement_and_item
121 Refinement/not refinement_not
122 Refinement/or refinement_or
123 Refinement/or/_item refinement_or_item
124 ContextAssertion/contextType ca_contextType
125 ContextAssertion/contextValues ca_contextValues
126 ContextAssertion/contextValues/_item ca_contextValues_item
127 ContextCombination/not contextcombination_not
128 ContextCombination/and contextcombination_and
129 ContextCombination/and/_item contextcombination_and_item
130 ContextCombination/or contextcombination_or
131 ContextCombination/or/_item contextcombination_or_item
132 RelaxationPolicy/maximum maximum_relaxation
133 RelaxationPolicy/minimum minimum_relaxation
134 RequestAttribute/defaultValues/_item/values ra_values
135 RequestAttribute/defaultValues/_item/values/_item ra_values_item
136 RequestAttribute/selectedValues ra_selectedValues
137 RequestAttribute/selectedValues/_item ra_selectedValues_item
140 DistinguishedName B "2.5.4.1" "id-at-aliasedEntryName"
141 DistinguishedName B "2.5.4.31" "id-at-member"
142 DistinguishedName B "2.5.4.32" "id-at-owner"
143 DistinguishedName B "2.5.4.33" "id-at-roleOccupant"
144 DistinguishedName B "2.5.4.34" "id-at-seeAlso"
145 DistinguishedName B "2.5.4.49" "id-at-distinguishedName"
147 DistinguishedName B "2.5.18.3" "id-oa-creatorsName"
148 DistinguishedName B "2.5.18.4" "id-oa-modifiersName"
149 SubtreeSpecification B "2.5.18.6" "id-oa-subtreeSpecification"
150 DistinguishedName B "2.5.18.10" "id-oa-subschemaSubentry"
151 DistinguishedName B "2.5.18.11" "id-oa-accessControlSubentry"
152 DistinguishedName B "2.5.18.12" "id-oa-collectiveAttributeSubentry"
153 DistinguishedName B "2.5.18.13" "id-oa-contextDefaultSubentry"
154 HierarchyLevel B "2.5.18.17" "id-oa-hierarchyLevel"
155 HierarchyBelow B "2.5.18.18" "iid-oa-hierarchyBelow"
156 # X402 - see master list in acp133.cnf
157 DistinguishedName B "2.6.5.2.5" "id-at-mhs-message-store-dn"
158 DistinguishedName B "2.6.5.2.14" "id-at-mhs-dl-related-lists"
160 # ACP133 - see master list in acp133.cnf
161 DistinguishedName B "2.16.840.1.101.2.2.1.3" "id-at-alternateRecipient"
162 DistinguishedName B "2.16.840.1.101.2.2.1.4" "id-at-associatedOrganization"
163 DistinguishedName B "2.16.840.1.101.2.2.1.6" "id-at-associatedPLA"
164 DistinguishedName B "2.16.840.1.101.2.2.1.49" "id-at-aliasPointer"
165 DistinguishedName B "2.16.840.1.101.2.2.1.61" "id-at-listPointer"
166 DistinguishedName B "2.16.840.1.101.2.2.1.110" "id-at-administrator"
167 DistinguishedName B "2.16.840.1.101.2.2.1.111" "id-at-aigsExpanded"
168 DistinguishedName B "2.16.840.1.101.2.2.1.113" "id-at-associatedAL"
169 DistinguishedName B "2.16.840.1.101.2.2.1.114" "id-at-copyMember"
170 DistinguishedName B "2.16.840.1.101.2.2.1.117" "id-at-guard"
171 DistinguishedName B "2.16.840.1.101.2.2.1.121" "id-at-networkDN"
172 DistinguishedName B "2.16.840.1.101.2.2.1.138" "id-at-plasServed"
173 DistinguishedName B "2.16.840.1.101.2.2.1.139" "id-at-deployed"
174 DistinguishedName B "2.16.840.1.101.2.2.1.140" "id-at-garrison"
175 DistinguishedName B "2.16.840.1.101.2.2.1.184" "id-at-aCPDutyOfficer"
176 DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember"
180 #.FN_PARS ContextAssertion/contextType
181 FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &actx->external.direct_reference
183 #.FN_BODY ContextAssertion/contextValues/_item
184 offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree, NULL);
186 #.FN_PARS AttributeTypeAndDistinguishedValue/type
187 FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &actx->external.direct_reference
189 #.FN_BODY AttributeTypeAndDistinguishedValue/type
195 if(actx->external.direct_reference) {
196 /* see if we can find a nice name */
197 name = oid_resolved_from_string(actx->pinfo->pool, actx->external.direct_reference);
198 if(!name) name = actx->external.direct_reference;
200 if(last_rdn_buf) { /* append it to the RDN */
201 wmem_strbuf_append(last_rdn_buf, name);
202 wmem_strbuf_append_c(last_rdn_buf, '=');
204 /* append it to the tree */
205 proto_item_append_text(tree, " (%%s=", name);
206 } else if(doing_attr) {
207 /* append it to the parent item */
208 proto_item_append_text(tree, " (%%s)", name);
211 if((fmt = val_to_str_const(hf_index, fmt_vals, "")) && *fmt) {
212 /* we have a format */
213 last_ava = (char *)wmem_alloc(actx->pinfo->pool, MAX_AVA_STR_LEN); *last_ava = '\0';
214 register_frame_end_routine (actx->pinfo, x509if_frame_end);
216 snprintf(last_ava, MAX_AVA_STR_LEN, "%%s %%s", name, fmt);
218 proto_item_append_text(tree, " %%s", last_ava);
223 #.FN_BODY AttributeTypeAndDistinguishedValue/value
224 int old_offset = offset;
228 const char *name = NULL;
229 const char *orig_oid = actx->external.direct_reference;
231 offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree, NULL);
233 /* in dissecting the value we may have overridden the OID of the value - which is
234 a problem if there are multiple values */
235 actx->external.direct_reference = orig_oid;
237 /* try and dissect as a string */
238 dissect_ber_octet_string(false, actx, NULL, tvb, old_offset, hf_x509if_any_string, &out_tvb);
240 /* should also try and dissect as an OID and integer */
241 /* of course, if I can look up the syntax .... */
244 /* it was a string - format it */
245 value = tvb_format_text(actx->pinfo->pool, out_tvb, 0, tvb_reported_length(out_tvb));
248 wmem_strbuf_append(last_rdn_buf, value);
250 /* append it to the tree*/
251 proto_item_append_text(tree, "%%s)", value);
254 if((fmt = val_to_str_const(ava_hf_index, fmt_vals, "")) && *fmt) {
255 /* we have a format */
258 last_ava = (char *)wmem_alloc(actx->pinfo->pool, MAX_AVA_STR_LEN);
261 if(!(name = oid_resolved_from_string(actx->pinfo->pool, actx->external.direct_reference)))
262 name = actx->external.direct_reference;
263 snprintf(last_ava, MAX_AVA_STR_LEN, "%%s %%s %%s", name, fmt, value);
265 proto_item_append_text(tree, " %%s", last_ava);
270 #.FN_PARS RequestAttribute/attributeType
271 FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &actx->external.direct_reference
273 #.FN_BODY RequestAttribute/selectedValues/_item
274 offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree, NULL);
276 #.FN_PARS RequestAttribute/defaultValues/_item/entryType
277 FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &actx->external.direct_reference
279 #.FN_BODY RequestAttribute/defaultValues/_item/values/_item
280 offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree, NULL);
282 #.FN_BODY Attribute/valuesWithContext/_item/value
283 offset=call_ber_oid_callback("unknown", tvb, offset, actx->pinfo, tree, NULL);
285 #.FN_PARS ResultAttribute/attributeType
286 FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &actx->external.direct_reference
288 #.FN_BODY ResultAttribute/outputValues/selectedValues/_item
289 offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree, NULL);
291 #.FN_PARS Context/contextType
292 FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &actx->external.direct_reference
294 #.FN_BODY Context/contextValues/_item
295 offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree, NULL);
297 #.FN_PARS AttributeType
298 FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &actx->external.direct_reference
300 #.FN_BODY AttributeValue
301 offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree, NULL);
303 #.FN_PARS AttributeValueAssertion/type
304 FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &actx->external.direct_reference
306 #.FN_BODY AttributeValueAssertion/assertion
307 offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree, NULL);
309 #.FN_PARS Attribute/type
310 FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &actx->external.direct_reference
312 #.FN_BODY Attribute/values/_item
313 offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree, NULL);
315 #.FN_PARS ContextProfile/contextType
316 FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &actx->external.direct_reference
318 #.FN_BODY ContextProfile/contextValue/_item
319 offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree, NULL);
321 #.FN_PARS MatchingUse/restrictionType
322 FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &actx->external.direct_reference
324 #.FN_BODY MatchingUse/restrictionValue
325 offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree, NULL);
327 #.FN_BODY AttributeTypeAndDistinguishedValue/valuesWithContext/_item/distingAttrValue
328 offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree, NULL);
330 #.FN_BODY RelativeDistinguishedName
331 rdn_one_value = false;
333 last_rdn_buf = wmem_strbuf_new(actx->pinfo->pool, "");
334 register_frame_end_routine (actx->pinfo, x509if_frame_end);
338 /* we've finished - close the bracket */
339 proto_item_append_text(top_of_rdn, " (%%s)", wmem_strbuf_get_str(last_rdn_buf));
341 /* now append this to the DN */
343 if(wmem_strbuf_get_len(last_dn_buf) > 0) {
344 wmem_strbuf_t *temp_dn_buf = wmem_strbuf_new_sized(actx->pinfo->pool, wmem_strbuf_get_len(last_rdn_buf) + wmem_strbuf_get_len(last_dn_buf) + 1);
345 wmem_strbuf_append(temp_dn_buf, wmem_strbuf_get_str(last_rdn_buf));
346 wmem_strbuf_append_c(temp_dn_buf, ',');
347 wmem_strbuf_append(temp_dn_buf, wmem_strbuf_get_str(last_dn_buf));
348 wmem_strbuf_destroy(last_dn_buf);
349 last_dn_buf = temp_dn_buf;
351 wmem_strbuf_append(last_dn_buf, wmem_strbuf_get_str(last_rdn_buf));
355 last_rdn_buf = NULL; /* it will get freed when the next packet is dissected */
357 #.FN_BODY RelativeDistinguishedName/_item
364 /* this is an additional value - delimit */
365 wmem_strbuf_append_c(last_rdn_buf, '+');
370 rdn_one_value = true;
372 #.FN_BODY RDNSequence
375 dn_one_rdn = false; /* reset */
376 last_dn_buf = wmem_strbuf_new(actx->pinfo->pool, "");
378 register_frame_end_routine (actx->pinfo, x509if_frame_end);
383 /* we've finished - append the dn */
384 proto_item_append_text(top_of_dn, " (%%s)", wmem_strbuf_get_str(last_dn_buf));
386 /* see if we should append this to the col info */
387 if((fmt = val_to_str_const(hf_index, fmt_vals, "")) && *fmt) {
388 /* we have a format */
389 col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s%%s", fmt, wmem_strbuf_get_str(last_dn_buf));
393 #.FN_BODY RDNSequence/_item
396 /* this is the first element - record the top */
404 #.FN_BODY AttributeValueAssertion
406 ava_hf_index = hf_index;
407 last_ava = (char *)wmem_alloc(actx->pinfo->pool, MAX_AVA_STR_LEN); *last_ava = '\0';
408 register_frame_end_routine (actx->pinfo, x509if_frame_end);
416 register_frame_end_routine (actx->pinfo, x509if_frame_end);