aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/x509sat
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2004-11-20 05:58:13 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2004-11-20 05:58:13 +0000
commita6d6309361a0a1b6e194c137e9d97797b78aeed7 (patch)
tree94656ba217ad22a0a1c8482448300bd44c3ab3bd /asn1/x509sat
parent2ba488f839d1d06a30321394b26014b9f919dfb5 (diff)
downloadwireshark-a6d6309361a0a1b6e194c137e9d97797b78aeed7.tar.gz
wireshark-a6d6309361a0a1b6e194c137e9d97797b78aeed7.tar.bz2
wireshark-a6d6309361a0a1b6e194c137e9d97797b78aeed7.zip
ean up SAT a bit remove the unneccesary implementation of DirectoryStr4ing in the template and make the export of it correct.
svn path=/trunk/; revision=12545
Diffstat (limited to 'asn1/x509sat')
-rw-r--r--asn1/x509sat/SelectedAttributeTypes.asn21
-rw-r--r--asn1/x509sat/packet-x509sat-template.c64
-rw-r--r--asn1/x509sat/packet-x509sat-template.h2
-rw-r--r--asn1/x509sat/x509sat.cnf2
-rw-r--r--asn1/x509sat/x509sat_exp.cnf2
5 files changed, 15 insertions, 76 deletions
diff --git a/asn1/x509sat/SelectedAttributeTypes.asn b/asn1/x509sat/SelectedAttributeTypes.asn
index 86d66d3b1d..29b3306dad 100644
--- a/asn1/x509sat/SelectedAttributeTypes.asn
+++ b/asn1/x509sat/SelectedAttributeTypes.asn
@@ -37,15 +37,18 @@ IMPORTS
FROM DirectoryAbstractService directoryAbstractService;
-- Directory string type
--- XXX DirectoryString is handimplemented inside the template
--- DirectoryString ::= CHOICE {
--- teletexString TeletexString(SIZE (1..maxSize)),
--- printableString PrintableString(SIZE (1..maxSize)),
--- universalString UniversalString(SIZE (1..maxSize)),
--- bmpString BMPString(SIZE (1..maxSize)),
--- uTF8String UTF8String(SIZE (1..maxSize))
--- }
---
+--This one is much better declared as this, it is prettier at least
+--the octet string dissector can handle all of them
+DirectoryString ::= OCTET STRING
+--DirectoryString ::= CHOICE {
+-- teletexString TeletexString,
+-- printableString PrintableString,
+-- universalString UniversalString,
+-- bmpString BMPString,
+-- uTF8String UTF8String
+--}
+
+
-- Attribute types
-- knowledgeInformation ATTRIBUTE ::= {
-- WITH SYNTAX DirectoryString {ub-knowledge-information}
diff --git a/asn1/x509sat/packet-x509sat-template.c b/asn1/x509sat/packet-x509sat-template.c
index 1f983b5aba..b309797151 100644
--- a/asn1/x509sat/packet-x509sat-template.c
+++ b/asn1/x509sat/packet-x509sat-template.c
@@ -1,3 +1,4 @@
+#define BER_UNI_TAG_TeletexString 20 /* until we fix the bug in asn2eth */
/* packet-x509sat.c
* Routines for X.509 Selected Attribute Types packet dissection
*
@@ -81,72 +82,10 @@ int hf_x509sat_id_at_collectiveTelephoneNumber = -1;
#include "packet-x509sat-hf.c"
/* Initialize the subtree pointers */
-static gint ett_x509sat_DirectoryString = -1;
#include "packet-x509sat-ett.c"
#include "packet-x509sat-fn.c"
-
-
-
-static int DirectoryString_hf_index;
-
-static int
-dissect_teletextString(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_ber_restricted_string(FALSE, BER_UNI_TAG_TeletextString,
- pinfo, tree, tvb, offset, DirectoryString_hf_index, NULL);
-}
-static int
-dissect_printableString(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_ber_restricted_string(FALSE, BER_UNI_TAG_PrintableString,
- pinfo, tree, tvb, offset, DirectoryString_hf_index, NULL);
-}
-static int
-dissect_universalString(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_ber_restricted_string(FALSE, BER_UNI_TAG_UniversalString,
- pinfo, tree, tvb, offset, DirectoryString_hf_index, NULL);
-}
-static int
-dissect_bmpString(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_ber_restricted_string(FALSE, BER_UNI_TAG_BMPString,
- pinfo, tree, tvb, offset, DirectoryString_hf_index, NULL);
-}
-static int
-dissect_uTF8String(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
- return dissect_ber_restricted_string(FALSE, BER_UNI_TAG_UTF8String,
- pinfo, tree, tvb, offset, DirectoryString_hf_index, NULL);
-}
-
-static const value_string DirectoryString_vals[] = {
- { 0, "teletextString" },
- { 1, "printableString" },
- { 2, "universalString" },
- { 3, "bmpString" },
- { 4, "uTF8String" },
- { 0, NULL }
-};
-
-static ber_choice DirectoryString_choice[] = {
- { 0, BER_CLASS_UNI, BER_UNI_TAG_TeletextString, BER_FLAGS_NOOWNTAG, dissect_teletextString },
- { 1, BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_printableString },
- { 2, BER_CLASS_UNI, BER_UNI_TAG_UniversalString, BER_FLAGS_NOOWNTAG, dissect_universalString },
- { 3, BER_CLASS_UNI, BER_UNI_TAG_BMPString, BER_FLAGS_NOOWNTAG, dissect_bmpString },
- { 4, BER_CLASS_UNI, BER_UNI_TAG_UTF8String, BER_FLAGS_NOOWNTAG, dissect_uTF8String },
- { 0, 0, 0, 0, NULL }
-};
-
-int
-dissect_x509sat_DirectoryString(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index) {
- DirectoryString_hf_index = hf_index;
- offset = dissect_ber_choice(pinfo, tree, tvb, offset,
- DirectoryString_choice, -1, ett_x509sat_DirectoryString);
-
- return offset;
-}
-
-
-
-
static void
dissect_x509sat_countryName_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
@@ -500,7 +439,6 @@ void proto_register_x509sat(void) {
/* List of subtrees */
static gint *ett[] = {
- &ett_x509sat_DirectoryString,
#include "packet-x509sat-ettarr.c"
};
diff --git a/asn1/x509sat/packet-x509sat-template.h b/asn1/x509sat/packet-x509sat-template.h
index ecde979f63..4e936a0a59 100644
--- a/asn1/x509sat/packet-x509sat-template.h
+++ b/asn1/x509sat/packet-x509sat-template.h
@@ -27,7 +27,5 @@
#include "packet-x509sat-exp.h"
-int dissect_x509sat_DirectoryString(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
-
#endif /* PACKET_X509SAT_H */
diff --git a/asn1/x509sat/x509sat.cnf b/asn1/x509sat/x509sat.cnf
index d611ce1ada..ce15ffa67b 100644
--- a/asn1/x509sat/x509sat.cnf
+++ b/asn1/x509sat/x509sat.cnf
@@ -7,7 +7,7 @@
InformationFramework x509if
#.EXPORTS
-
+DirectoryString
UniqueIdentifier
#.NO_EMIT
diff --git a/asn1/x509sat/x509sat_exp.cnf b/asn1/x509sat/x509sat_exp.cnf
index 426e88f57f..c404778617 100644
--- a/asn1/x509sat/x509sat_exp.cnf
+++ b/asn1/x509sat/x509sat_exp.cnf
@@ -1,4 +1,4 @@
#.IMPORT_TAG
UniqueIdentifier BER_CLASS_UNI BER_UNI_TAG_BITSTRING
-DirectoryString BER_CLASS_UNI BER_UNI_TAG_CHOICE
+DirectoryString BER_CLASS_UNI BER_UNI_TAG_PrintableString