diff options
-rw-r--r-- | asn1/x509if/packet-x509if-template.c | 7 | ||||
-rw-r--r-- | asn1/x509sat/SelectedAttributeTypes.asn | 12 | ||||
-rw-r--r-- | asn1/x509sat/packet-x509sat-template.c | 15 | ||||
-rw-r--r-- | epan/dissectors/packet-x509if.c | 7 | ||||
-rw-r--r-- | epan/dissectors/packet-x509sat.c | 15 |
5 files changed, 51 insertions, 5 deletions
diff --git a/asn1/x509if/packet-x509if-template.c b/asn1/x509if/packet-x509if-template.c index 524e78750d..ad72e71737 100644 --- a/asn1/x509if/packet-x509if-template.c +++ b/asn1/x509if/packet-x509if-template.c @@ -74,9 +74,16 @@ dissect_hf_x509if_ATADV_attribute_id(packet_info *pinfo, proto_tree *tree, tvbuf hf_x509if_ATADV_attribute_id, ATADV_attribute_id); return offset; } +static int +dissect_hf_x509if_ATADV_attribute_value(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) +{ + offset=call_ber_oid_callback(ATADV_attribute_id, tvb, offset, pinfo, tree); + return offset; +} static ber_sequence AttributeTypeAndDistinguishedValue_sequence[] = { { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_hf_x509if_ATADV_attribute_id }, + { BER_CLASS_ANY, 0, BER_FLAGS_NOOWNTAG, dissect_hf_x509if_ATADV_attribute_value }, /*XXX missing stuff here */ { 0, 0, 0, NULL } }; diff --git a/asn1/x509sat/SelectedAttributeTypes.asn b/asn1/x509sat/SelectedAttributeTypes.asn index 01fd8a8161..c9b5bee61d 100644 --- a/asn1/x509sat/SelectedAttributeTypes.asn +++ b/asn1/x509sat/SelectedAttributeTypes.asn @@ -10,7 +10,7 @@ BEGIN -- Directory services. Other applications may use them for their own purposes, but this will not constrain -- extensions and modifications needed to maintain or improve the Directory service. IMPORTS - informationFramework, upperBounds, id-at, id-mr, id-avc, + informationFramework, upperBounds, id-mr, id-avc, directoryAbstractService, id-pr, id-not, id-cat FROM UsefulDefinitions {joint-iso-itu-t ds(5) module(1) usefulDefinitions(0) 3} @@ -944,10 +944,12 @@ CriteriaItem ::= CHOICE { -- Object identifier assignments - -- object identifiers assigned in other modules are shown in comments -- Attributes +-- (id-at copied in from UsefulDefinitions) +id-at OBJECT IDENTIFIER ::= {joint-iso-itu-t ds(5) 4} -- id-at-objectClass OBJECT IDENTIFIER ::= {id-at 0} -- id-at-aliasedEntryName OBJECT IDENTIFIER ::= {id-at 1} -- id-at-encryptedAliasedEntryName OBJECT IDENTIFIER ::= --- {id-at 1 2} +-- {id-at 1 2} -- -- id-at-knowledgeInformation OBJECT IDENTIFIER ::= {id-at 2} -- @@ -962,9 +964,9 @@ CriteriaItem ::= CHOICE { -- id-at-serialNumber OBJECT IDENTIFIER ::= {id-at 5} -- -- id-at-encryptedSerialNumber OBJECT IDENTIFIER ::= {id-at 5 2} --- --- id-at-countryName OBJECT IDENTIFIER ::= {id-at 6} --- + +id-at-countryName OBJECT IDENTIFIER ::= {id-at 6} + -- id-at-encryptedCountryName OBJECT IDENTIFIER ::= {id-at 6 2} -- -- id-at-localityName OBJECT IDENTIFIER ::= {id-at 7} diff --git a/asn1/x509sat/packet-x509sat-template.c b/asn1/x509sat/packet-x509sat-template.c index e0abc07264..8722808daf 100644 --- a/asn1/x509sat/packet-x509sat-template.c +++ b/asn1/x509sat/packet-x509sat-template.c @@ -43,6 +43,7 @@ /* Initialize the protocol and registered fields */ int proto_x509sat = -1; +int hf_x509sat_countryName = -1; #include "packet-x509sat-hf.c" /* Initialize the subtree pointers */ @@ -51,11 +52,21 @@ int proto_x509sat = -1; #include "packet-x509sat-fn.c" +static void +dissect_x509sat_countryName_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +{ + dissect_x509sat_CountryName(FALSE, tvb, 0, pinfo, tree, hf_x509sat_countryName); +} + /*--- proto_register_x509sat ----------------------------------------------*/ void proto_register_x509sat(void) { /* List of fields */ static hf_register_info hf[] = { + { &hf_x509sat_countryName, + { "countryName", "x509sat.countryName", + FT_STRING, BASE_NONE, NULL, 0, + "Country Name", HFILL }}, #include "packet-x509sat-hfarr.c" }; @@ -76,5 +87,9 @@ void proto_register_x509sat(void) { /*--- proto_reg_handoff_x509sat -------------------------------------------*/ void proto_reg_handoff_x509sat(void) { + dissector_handle_t dissector_handle; + + dissector_handle=create_dissector_handle(dissect_x509sat_countryName_callback, proto_x509sat); + dissector_add_string("ber.oid", "2.5.4.6", dissector_handle); } diff --git a/epan/dissectors/packet-x509if.c b/epan/dissectors/packet-x509if.c index 6c372f462d..118503ac41 100644 --- a/epan/dissectors/packet-x509if.c +++ b/epan/dissectors/packet-x509if.c @@ -114,9 +114,16 @@ dissect_hf_x509if_ATADV_attribute_id(packet_info *pinfo, proto_tree *tree, tvbuf hf_x509if_ATADV_attribute_id, ATADV_attribute_id); return offset; } +static int +dissect_hf_x509if_ATADV_attribute_value(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) +{ + offset=call_ber_oid_callback(ATADV_attribute_id, tvb, offset, pinfo, tree); + return offset; +} static ber_sequence AttributeTypeAndDistinguishedValue_sequence[] = { { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_hf_x509if_ATADV_attribute_id }, + { BER_CLASS_ANY, 0, BER_FLAGS_NOOWNTAG, dissect_hf_x509if_ATADV_attribute_value }, /*XXX missing stuff here */ { 0, 0, 0, NULL } }; diff --git a/epan/dissectors/packet-x509sat.c b/epan/dissectors/packet-x509sat.c index 0478d9452d..87b40f870e 100644 --- a/epan/dissectors/packet-x509sat.c +++ b/epan/dissectors/packet-x509sat.c @@ -51,6 +51,7 @@ /* Initialize the protocol and registered fields */ int proto_x509sat = -1; +int hf_x509sat_countryName = -1; /*--- Included file: packet-x509sat-hf.c ---*/ @@ -157,11 +158,21 @@ dissect_x509sat_CriteriaItem(gboolean implicit_tag, tvbuff_t *tvb, int offset, p +static void +dissect_x509sat_countryName_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +{ + dissect_x509sat_CountryName(FALSE, tvb, 0, pinfo, tree, hf_x509sat_countryName); +} + /*--- proto_register_x509sat ----------------------------------------------*/ void proto_register_x509sat(void) { /* List of fields */ static hf_register_info hf[] = { + { &hf_x509sat_countryName, + { "countryName", "x509sat.countryName", + FT_STRING, BASE_NONE, NULL, 0, + "Country Name", HFILL }}, /*--- Included file: packet-x509sat-hfarr.c ---*/ @@ -223,5 +234,9 @@ void proto_register_x509sat(void) { /*--- proto_reg_handoff_x509sat -------------------------------------------*/ void proto_reg_handoff_x509sat(void) { + dissector_handle_t dissector_handle; + + dissector_handle=create_dissector_handle(dissect_x509sat_countryName_callback, proto_x509sat); + dissector_add_string("ber.oid", "2.5.4.6", dissector_handle); } |