diff options
author | Guy Harris <guy@alum.mit.edu> | 2000-12-24 09:10:12 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2000-12-24 09:10:12 +0000 |
commit | 60f9476740b196b029d68e2c05f86622610a8334 (patch) | |
tree | 46694794d0a173b5ee48a0763ed49f62aa28ef34 /packet-ldap.c | |
parent | 57e4216961a5d0bd4f73250e2f4171a25aa176e2 (diff) | |
download | wireshark-60f9476740b196b029d68e2c05f86622610a8334.tar.gz wireshark-60f9476740b196b029d68e2c05f86622610a8334.tar.bz2 wireshark-60f9476740b196b029d68e2c05f86622610a8334.zip |
Rename "asn1_octet_string_value_decode()" to
"asn1_string_value_decode()", as it can be used for various character
string types as well.
Turn "asn1_octet_string_decode()" into "asn1_string_decode()", which
takes an additional argument giving the tag expected for the string in
question, and make "asn1_octet_string_decode()" a wrapper around it.
Clean up the ASN.1 dissection in the Kerberos dissector, making more use
of the code in "asn1.c", wrapping more operations up in macros, and
doing some more type checking.
Use "REP" rather than "RESP" in names and strings; "REP" is what the
Kerberos spec uses.
Make the routines in the Kerberos dissector not used outside that
dissector static.
Fix some problems with the dissection of strings in the Kerberos
dissector (it was extracting the data from the wrong place in the
packet).
In Kerberos V5, the "kvno" item in the EncryptedData type is optional;
treat it as such.
Treat integers as unsigned in the Kerberos dissector.
svn path=/trunk/; revision=2777
Diffstat (limited to 'packet-ldap.c')
-rw-r--r-- | packet-ldap.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/packet-ldap.c b/packet-ldap.c index b75e2e7d67..06552f1e7b 100644 --- a/packet-ldap.c +++ b/packet-ldap.c @@ -1,7 +1,7 @@ /* packet-ldap.c * Routines for ldap packet dissection * - * $Id: packet-ldap.c,v 1.17 2000/11/19 08:53:59 guy Exp $ + * $Id: packet-ldap.c,v 1.18 2000/12/24 09:10:12 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -267,7 +267,7 @@ static void read_string_value(ASN1_SCK *a, proto_tree *tree, int hf_id, if (length) { - asn1_octet_string_value_decode(a, length, &string); + asn1_string_value_decode(a, length, &string); string = g_realloc(string, length + 1); string[length] = '\0'; } @@ -394,6 +394,7 @@ static int parse_filter_substrings(ASN1_SCK *a, char **filter, guint *filter_len if (ret != ASN1_ERR_NOERROR) return ret; + /* XXX - check the tag? */ if (cls != ASN1_CTX || con != ASN1_PRI) { /* XXX - handle the constructed encoding? */ return ASN1_ERR_WRONG_TYPE; @@ -401,7 +402,7 @@ static int parse_filter_substrings(ASN1_SCK *a, char **filter, guint *filter_len if (!def) return ASN1_ERR_LENGTH_NOT_DEFINITE; - ret = asn1_octet_string_value_decode(a, (int) string_length, &string); + ret = asn1_string_value_decode(a, (int) string_length, &string); if (ret != ASN1_ERR_NOERROR) return ret; @@ -553,7 +554,7 @@ static int parse_filter(ASN1_SCK *a, char **filter, guint *filter_length, const if (con != ASN1_PRI) return ASN1_ERR_WRONG_TYPE; - ret = asn1_octet_string_value_decode(a, length, &string); + ret = asn1_string_value_decode(a, length, &string); if (ret != ASN1_ERR_NOERROR) return ret; *filter_length += 4 + length; |