diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2004-10-29 11:10:31 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2004-10-29 11:10:31 +0000 |
commit | 0e7d35f8b43388af79cb34c9908c509c13e4a25a (patch) | |
tree | 97bb0bf1b043f8ed9b2a1505b413b69da1e7c23b /asn1/x509if | |
parent | 62612c70aa3f611c183849ab08e98a26c0e62f22 (diff) | |
download | wireshark-0e7d35f8b43388af79cb34c9908c509c13e4a25a.tar.gz |
Update to x509if use a workaround to emulate the type ANY and remove stuff from teh template
svn path=/trunk/; revision=12431
Diffstat (limited to 'asn1/x509if')
-rw-r--r-- | asn1/x509if/InformationFramework.asn | 12 | ||||
-rw-r--r-- | asn1/x509if/packet-x509if-template.c | 43 | ||||
-rw-r--r-- | asn1/x509if/x509if.cnf | 12 | ||||
-rw-r--r-- | asn1/x509if/x509if_dummy.cnf | 5 |
4 files changed, 29 insertions, 43 deletions
diff --git a/asn1/x509if/InformationFramework.asn b/asn1/x509if/InformationFramework.asn index e16b96af4b..9224a4e52e 100644 --- a/asn1/x509if/InformationFramework.asn +++ b/asn1/x509if/InformationFramework.asn @@ -21,7 +21,9 @@ IMPORTS HierarchySelections, FamilyGrouping, FamilyReturn FROM DirectoryAbstractService directoryAbstractService ub-search - FROM UpperBounds upperBounds; + FROM UpperBounds upperBounds + Any + FROM X509ifDummy; AttributeId ::= OBJECT IDENTIFIER @@ -94,11 +96,11 @@ DistinguishedName ::= RDNSequence RelativeDistinguishedName ::= SET SIZE (1..MAX) OF AttributeTypeAndDistinguishedValue --- XXX This function is implemented by hand inside the template AttributeTypeAndDistinguishedValue ::= SEQUENCE { --- type AttributeId --- value ATTRIBUTE.&Type({SupportedAttributes}{@type}), --- primaryDistinguished BOOLEAN DEFAULT TRUE, + type AttributeId, +-- value ATTRIBUTE.&Type({SupportedAttributes}{@type}), + value Any, + primaryDistinguished BOOLEAN OPTIONAL -- valuesWithContext -- SET SIZE (1..MAX) OF -- SEQUENCE {distingAttrValue diff --git a/asn1/x509if/packet-x509if-template.c b/asn1/x509if/packet-x509if-template.c index f3e5b008e2..5c304b052d 100644 --- a/asn1/x509if/packet-x509if-template.c +++ b/asn1/x509if/packet-x509if-template.c @@ -42,13 +42,15 @@ /* Initialize the protocol and registered fields */ int proto_x509if = -1; -int hf_x509if_ATADV_attribute_id = -1; +int hf_x509if_object_identifier_id = -1; #include "packet-x509if-hf.c" /* Initialize the subtree pointers */ static gint ett_x509if_Attribute = -1; #include "packet-x509if-ett.c" +static char object_identifier_id[64]; /*64 chars should be long enough? */ + static const ber_sequence Attribute_sequence[] = { /* { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_hf_x509if_type },*/ @@ -65,37 +67,6 @@ dissect_x509if_Attribute(gboolean implicit_tag, tvbuff_t *tvb, int offset, packe } - -static char ATADV_attribute_id[64]; /*64 chars should be long enough? */ -static int -dissect_hf_x509if_ATADV_attribute_id(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) -{ - offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset, - 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 const 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 } -}; - -static int -dissect_x509if_AttributeTypeAndDistinguishedValue(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) { - offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, - AttributeTypeAndDistinguishedValue_sequence, hf_index, ett_x509if_AttributeTypeAndDistinguishedValue); - - return offset; -} - #include "packet-x509if-fn.c" @@ -104,10 +75,10 @@ void proto_register_x509if(void) { /* List of fields */ static hf_register_info hf[] = { - { &hf_x509if_ATADV_attribute_id, - { "Attribute Id", "x509if.attribute.id", - FT_STRING, BASE_NONE, NULL, 0, - "Attribute Id", HFILL }}, + { &hf_x509if_object_identifier_id, + { "Id", "x509if.id", FT_STRING, BASE_NONE, NULL, 0, + "Object identifier Id", HFILL }}, + #include "packet-x509if-hfarr.c" }; diff --git a/asn1/x509if/x509if.cnf b/asn1/x509if/x509if.cnf index 6569ccfbb7..86d6fd8f5e 100644 --- a/asn1/x509if/x509if.cnf +++ b/asn1/x509if/x509if.cnf @@ -5,6 +5,8 @@ #.MODULE_IMPORT +#.INCLUDE ./x509if_dummy.cnf + #.EXPORTS AttributeType @@ -13,12 +15,18 @@ RelativeDistinguishedName #.NO_EMIT -AttributeTypeAndDistinguishedValue - #.TYPE_RENAME #.FIELD_RENAME +#.FN_BODY AttributeTypeAndDistinguishedValue/type + offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset, + hf_x509if_object_identifier_id, object_identifier_id); + +#.FN_BODY AttributeTypeAndDistinguishedValue/value + offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree); + + #.END diff --git a/asn1/x509if/x509if_dummy.cnf b/asn1/x509if/x509if_dummy.cnf new file mode 100644 index 0000000000..788d4bfe3c --- /dev/null +++ b/asn1/x509if/x509if_dummy.cnf @@ -0,0 +1,5 @@ +# this dummy is to handle Any type +# until when we can handle ANY properly + +#.IMPORT_TAG +Any BER_CLASS_ANY 0 |