aboutsummaryrefslogtreecommitdiffstats
path: root/packet-spnego.c
diff options
context:
space:
mode:
authorRichard Sharpe <sharpe@ns.aus.com>2002-08-29 19:45:01 +0000
committerRichard Sharpe <sharpe@ns.aus.com>2002-08-29 19:45:01 +0000
commit9ca2ca20cfe438f80239e7ec4b75c5285971d4c1 (patch)
treed666bae57314a7ce4fe08b1829539bd5f25e3c73 /packet-spnego.c
parent19216e7292c495fbaa82e5395bfe3c7658dcac86 (diff)
More support for SPNEGO ... Gotta handle the supportedMech and cache the
handle for the dissector routine yet ... Real work to do though ... svn path=/trunk/; revision=6131
Diffstat (limited to 'packet-spnego.c')
-rw-r--r--packet-spnego.c61
1 files changed, 51 insertions, 10 deletions
diff --git a/packet-spnego.c b/packet-spnego.c
index b4282d0e91..0c4e48dd46 100644
--- a/packet-spnego.c
+++ b/packet-spnego.c
@@ -48,12 +48,11 @@
#define SPNEGO_mechToken 2
#define SPNEGO_mechListMIC 3
#define SPNEGO_negResult 0
-#define SPNEGO_accept_completed 0
-#define SPNEGO_accept_incomplete 1
-#define SPNEGO_reject 2
#define SPNEGO_supportedMech 1
#define SPNEGO_responseToken 2
-#define SPNEGO_mechListMIC 3
+#define SPNEGO_negResult_accept_completed 0
+#define SPNEGO_negResult_accept_incomplete 1
+#define SPNEGO_negResult_accept_reject 2
static int proto_spnego = -1;
@@ -281,11 +280,6 @@ dissect_spnego_negTokenInit(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
while (len1) {
- /*
- * Another context header ... It could be MechTypeList, but that
- * is optional, Hmmm ... what if it was empty?
- */
-
ret = asn1_header_decode(hnd, &cls, &con, &tag, &def, &len);
if (ret != ASN1_ERR_NOERROR) {
@@ -420,7 +414,54 @@ dissect_spnego_negTokenTarg(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
goto done;
}
- /* Just add the blob so far ... */
+ offset = hnd->offset;
+
+ len -= 2; /* Account for the Header above ... */
+
+ while (len1) {
+
+ ret = asn1_header_decode(hnd, &cls, &con, &tag, &def, &len);
+
+ if (ret != ASN1_ERR_NOERROR) {
+ dissect_parse_error(tvb, offset, pinfo, subtree,
+ "SPNEGO context header", ret);
+ goto done;
+ }
+
+ if (!(cls == ASN1_CTX && con == ASN1_CON)) {
+ proto_tree_add_text(
+ subtree, tvb, offset, 0,
+ "Unknown header (cls=%d, con=%d, tag=%d)",
+ cls, con, tag);
+ goto done;
+ }
+
+ /* Should be one of the fields */
+
+ switch (tag) {
+
+ case SPNEGO_negResult:
+
+ break;
+
+ case SPNEGO_supportedMech:
+
+ break;
+
+ case SPNEGO_responseToken:
+
+ break;
+
+ case SPNEGO_mechListMIC:
+
+ break;
+
+ default:
+
+ break;
+ }
+
+ }
done:
return offset;