diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2004-10-30 02:36:58 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2004-10-30 02:36:58 +0000 |
commit | b1e1e18ad1f62329131c8c4a40ce76be48a84374 (patch) | |
tree | 9876efaf78a3e323698f54968bdc88e935e27481 /asn1/x509af | |
parent | 805f948c298ce5b3613328b5c20cd56b78e8fe95 (diff) | |
download | wireshark-b1e1e18ad1f62329131c8c4a40ce76be48a84374.tar.gz wireshark-b1e1e18ad1f62329131c8c4a40ce76be48a84374.tar.bz2 wireshark-b1e1e18ad1f62329131c8c4a40ce76be48a84374.zip |
change Extension to be implemented inside the conformance file and remove it from the template
svn path=/trunk/; revision=12438
Diffstat (limited to 'asn1/x509af')
-rw-r--r-- | asn1/x509af/AuthenticationFramework.asn | 4 | ||||
-rw-r--r-- | asn1/x509af/packet-x509af-template.c | 44 | ||||
-rw-r--r-- | asn1/x509af/x509af.cnf | 16 |
3 files changed, 16 insertions, 48 deletions
diff --git a/asn1/x509af/AuthenticationFramework.asn b/asn1/x509af/AuthenticationFramework.asn index 7799f8ddbf..8fd8064a04 100644 --- a/asn1/x509af/AuthenticationFramework.asn +++ b/asn1/x509af/AuthenticationFramework.asn @@ -82,8 +82,8 @@ Extensions ::= SEQUENCE OF Extension -- specification of those individual extensions shall include the rules for the significance of the order therein Extension ::= SEQUENCE { extnId OBJECT IDENTIFIER, - critical BOOLEAN DEFAULT FALSE, - extnValue Any + critical BOOLEAN OPTIONAL, + extnValue OCTET STRING -- contains a DER encoding of a value of type &ExtnType -- for the extension object identified by extnId } diff --git a/asn1/x509af/packet-x509af-template.c b/asn1/x509af/packet-x509af-template.c index b2d4eb9a77..e202523d5d 100644 --- a/asn1/x509af/packet-x509af-template.c +++ b/asn1/x509af/packet-x509af-template.c @@ -47,7 +47,6 @@ static int proto_x509af = -1; static int hf_x509af_algorithm_id = -1; static int hf_x509af_extension_id = -1; -static int hf_x509af_critical = -1; /* BOOLEAN */ #include "packet-x509af-hf.c" /* Initialize the subtree pointers */ @@ -57,46 +56,7 @@ static char algorithm_id[64]; /*64 chars should be long enough? */ static char extension_id[64]; /*64 chars should be long enough? */ -static int -dissect_hf_x509af_extension_id(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) -{ - offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset, - hf_x509af_extension_id, extension_id); - return offset; -} -/* BOOLEAN from template, remove later if the compiler starts generating it */ -static int -dissect_x509af_BOOLEAN(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) { - offset = dissect_ber_boolean(pinfo, tree, tvb, offset, hf_index); - - return offset; -} -static int dissect_critical(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) { - return dissect_x509af_BOOLEAN(FALSE, tvb, offset, pinfo, tree, hf_x509af_critical); -} - -static int -dissect_hf_x509af_extension_type(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) -{ - offset=call_ber_oid_callback(extension_id, tvb, offset, pinfo, tree); - return offset; -} - -static const ber_sequence Extension_sequence[] = { - { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_hf_x509af_extension_id }, - { BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_critical }, - { BER_CLASS_ANY, 0, 0, dissect_hf_x509af_extension_type }, - { 0, 0, 0, NULL } -}; - -static int -dissect_x509af_Extension(gboolean implicit_tag _U_, 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, - Extension_sequence, hf_index, ett_x509af_Extension); - - return offset; -} #include "packet-x509af-fn.c" @@ -114,10 +74,6 @@ void proto_register_x509af(void) { { "Extension Id", "x509af.extension.id", FT_STRING, BASE_NONE, NULL, 0, "Extension Id", HFILL }}, - { &hf_x509af_critical, - { "critical", "x509af.critical", - FT_BOOLEAN, 8, NULL, 0, - "Extension/critical", HFILL }}, #include "packet-x509af-hfarr.c" }; diff --git a/asn1/x509af/x509af.cnf b/asn1/x509af/x509af.cnf index 51ad2154e2..54b4ec1f8e 100644 --- a/asn1/x509af/x509af.cnf +++ b/asn1/x509af/x509af.cnf @@ -38,8 +38,6 @@ CertificateList B "2.5.4.59" "id-at-attributeCertificateRevocationList" #.NO_EMIT -Extension - #.TYPE_RENAME AttributeCertificateInfo/subject InfoSubject AttributeCertificateAssertion/subject AssertionSubject @@ -64,3 +62,17 @@ CertificateList/signedCertificateList/revokedCertificates/_item/userCertificate #.FN_BODY AlgorithmIdentifier/parameters offset=call_ber_oid_callback(algorithm_id, tvb, offset, pinfo, tree); +#.FN_BODY Extension/extnId + offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset, + hf_x509af_extension_id, extension_id); + +#.FN_BODY Extension/extnValue + guint8 class; + gboolean pc, ind; + guint32 tag; + guint32 len; + /* skip past the T and L */ + offset = dissect_ber_identifier(pinfo, tree, tvb, offset, &class, &pc, &tag); + offset = dissect_ber_length(pinfo, tree, tvb, offset, &len, &ind); + offset=call_ber_oid_callback(extension_id, tvb, offset, pinfo, tree); + |