aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ldap.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-12-24 09:10:12 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-12-24 09:10:12 +0000
commit9ad2f5a9c78e1c693067301342dfe0b703ad53ed (patch)
tree46694794d0a173b5ee48a0763ed49f62aa28ef34 /packet-ldap.c
parent4ecc900c7012bc3a8bd524595500e47a61a8ec5b (diff)
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2777 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-ldap.c')
-rw-r--r--packet-ldap.c9
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;