2 * Routines for the simple and protected GSS-API negotiation mechanism
3 * as described in RFC 2478.
4 * Copyright 2002, Tim Potter <tpot@samba.org>
5 * Copyright 2002, Richard Sharpe <rsharpe@ns.aus.com>
6 * Copyright 2003, Richard Sharpe <rsharpe@richardsharpe.com>
8 * $Id: packet-spnego.c,v 1.51 2003/07/17 22:17:01 sharpe Exp $
10 * Ethereal - Network traffic analyzer
11 * By Gerald Combs <gerald@ethereal.com>
12 * Copyright 1998 Gerald Combs
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
33 #ifdef HAVE_SYS_TYPES_H
34 # include <sys/types.h>
38 #include <epan/packet.h>
41 #include "format-oid.h"
42 #include "packet-gssapi.h"
43 #include "packet-kerberos.h"
44 #include <epan/conversation.h>
46 #define SPNEGO_negTokenInit 0
47 #define SPNEGO_negTokenTarg 1
48 #define SPNEGO_mechTypes 0
49 #define SPNEGO_reqFlags 1
50 #define SPNEGO_mechToken 2
51 #define SPNEGO_mechListMIC 3
52 #define SPNEGO_negResult 0
53 #define SPNEGO_supportedMech 1
54 #define SPNEGO_responseToken 2
55 #define SPNEGO_negResult_accept_completed 0
56 #define SPNEGO_negResult_accept_incomplete 1
57 #define SPNEGO_negResult_accept_reject 2
59 static int proto_spnego = -1;
60 static int proto_spnego_krb5 = -1;
62 static int hf_spnego = -1;
63 static int hf_spnego_negtokeninit = -1;
64 static int hf_spnego_negtokentarg = -1;
65 static int hf_spnego_mechtype = -1;
66 static int hf_spnego_mechtoken = -1;
67 static int hf_spnego_negtokentarg_negresult = -1;
68 static int hf_spnego_mechlistmic = -1;
69 static int hf_spnego_responsetoken = -1;
70 static int hf_spnego_reqflags = -1;
71 static int hf_spnego_wraptoken = -1;
72 static int hf_spnego_krb5 = -1;
73 static int hf_spnego_krb5_tok_id = -1;
74 static int hf_spnego_krb5_sgn_alg = -1;
75 static int hf_spnego_krb5_seal_alg = -1;
76 static int hf_spnego_krb5_snd_seq = -1;
77 static int hf_spnego_krb5_sgn_cksum = -1;
78 static int hf_spnego_krb5_confounder = -1;
79 static int hf_gssapi_reqflags_deleg = -1;
80 static int hf_gssapi_reqflags_mutual = -1;
81 static int hf_gssapi_reqflags_replay = -1;
82 static int hf_gssapi_reqflags_sequence = -1;
83 static int hf_gssapi_reqflags_anon = -1;
84 static int hf_gssapi_reqflags_conf = -1;
85 static int hf_gssapi_reqflags_integ = -1;
87 static gint ett_spnego = -1;
88 static gint ett_spnego_negtokeninit = -1;
89 static gint ett_spnego_negtokentarg = -1;
90 static gint ett_spnego_mechtype = -1;
91 static gint ett_spnego_mechtoken = -1;
92 static gint ett_spnego_mechlistmic = -1;
93 static gint ett_spnego_responsetoken = -1;
94 static gint ett_spnego_wraptoken = -1;
95 static gint ett_spnego_krb5 = -1;
96 static gint ett_spnego_reqflags = -1;
98 static const value_string spnego_negResult_vals[] = {
99 { SPNEGO_negResult_accept_completed, "Accept Completed" },
100 { SPNEGO_negResult_accept_incomplete, "Accept Incomplete" },
101 { SPNEGO_negResult_accept_reject, "Accept Reject"},
106 * These should be in the GSSAPI dissector ... XXX
109 static const true_false_string tfs_reqflags_deleg = {
110 "Delegation Requested",
111 "Delegation NOT Requested"
114 static const true_false_string tfs_reqflags_mutual = {
115 "Mutual Authentication Requested",
116 "Mutual Authentication NOT Requested"
119 static const true_false_string tfs_reqflags_replay = {
120 "Replay Detection Requested",
121 "Replay Detection NOT Requested"
124 static const true_false_string tfs_reqflags_sequence = {
125 "Out-of-sequence Detection Requested",
126 "Out-of-sequence Detection NOT Requested"
129 static const true_false_string tfs_reqflags_anon = {
130 "Anonymous Authentication Requested",
131 "Anonymous Authentication NOT Requested"
134 static const true_false_string tfs_reqflags_conf = {
135 "Per-message Confidentiality Requested",
136 "Per-message Confidentiality NOT Requested"
139 static const true_false_string tfs_reqflags_integ = {
140 "Per-message Integrity Requested",
141 "Per-message Integrity NOT Requested"
144 /* Display an ASN1 parse error. Taken from packet-snmp.c */
146 static dissector_handle_t data_handle;
149 dissect_parse_error(tvbuff_t *tvb, int offset, packet_info *pinfo,
150 proto_tree *tree, const char *field_name, int ret)
154 errstr = asn1_err_to_str(ret);
157 proto_tree_add_text(tree, tvb, offset, 0,
158 "ERROR: Couldn't parse %s: %s", field_name, errstr);
159 call_dissector(data_handle,
160 tvb_new_subset(tvb, offset, -1, -1), pinfo, tree);
165 * This is the SPNEGO KRB5 dissector. It is not true KRB5, but some ASN.1
166 * wrapped blob with an OID, USHORT token ID, and a Ticket, that is also
167 * ASN.1 wrapped by the looks of it. It conforms to RFC1964.
170 #define KRB_TOKEN_AP_REQ 0x0001
171 #define KRB_TOKEN_AP_REP 0x0002
172 #define KRB_TOKEN_AP_ERR 0x0003
173 #define KRB_TOKEN_GETMIC 0x0101
174 #define KRB_TOKEN_WRAP 0x0102
175 #define KRB_TOKEN_DELETE_SEC_CONTEXT 0x0201
177 static const value_string spnego_krb5_tok_id_vals[] = {
178 { KRB_TOKEN_AP_REQ, "KRB5_AP_REQ"},
179 { KRB_TOKEN_AP_REP, "KRB5_AP_REP"},
180 { KRB_TOKEN_AP_ERR, "KRB5_ERROR"},
181 { KRB_TOKEN_GETMIC, "KRB5_GSS_GetMIC" },
182 { KRB_TOKEN_WRAP, "KRB5_GSS_Wrap" },
183 { KRB_TOKEN_DELETE_SEC_CONTEXT, "KRB5_GSS_Delete_sec_context" },
187 #define KRB_SGN_ALG_DES_MAC_MD5 0x0000
188 #define KRB_SGN_ALG_MD2_5 0x0001
189 #define KRB_SGN_ALG_DES_MAC 0x0002
190 #define KRB_SGN_ALG_HMAC 0x0011
192 static const value_string spnego_krb5_sgn_alg_vals[] = {
193 { KRB_SGN_ALG_DES_MAC_MD5, "DES MAC MD5"},
194 { KRB_SGN_ALG_MD2_5, "MD2.5"},
195 { KRB_SGN_ALG_DES_MAC, "DES MAC"},
196 { KRB_SGN_ALG_HMAC, "HMAC"},
200 #define KRB_SEAL_ALG_DES_CBC 0x0000
201 #define KRB_SEAL_ALG_RC4 0x0010
202 #define KRB_SEAL_ALG_NONE 0xffff
204 static const value_string spnego_krb5_seal_alg_vals[] = {
205 { KRB_SEAL_ALG_DES_CBC, "DES CBC"},
206 { KRB_SEAL_ALG_RC4, "RC4"},
207 { KRB_SEAL_ALG_NONE, "None"},
212 * XXX - is this for SPNEGO or just GSS-API?
213 * RFC 1964 is "The Kerberos Version 5 GSS-API Mechanism"; presumably one
214 * can directly designate Kerberos V5 as a mechanism in GSS-API, rather
215 * than designating SPNEGO as the mechanism, offering Kerberos V5, and
216 * getting it accepted.
219 dissect_spnego_krb5_getmic_base(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree);
221 dissect_spnego_krb5_wrap_base(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree);
224 dissect_spnego_krb5(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
231 guint len1, cls, con, tag, oid_len, nbytes;
235 gssapi_oid_value *value;
238 item = proto_tree_add_item(tree, hf_spnego_krb5, tvb, offset,
241 subtree = proto_item_add_subtree(item, ett_spnego_krb5);
244 * The KRB5 blob conforms to RFC1964:
247 * USHORT (0x0001 == AP-REQ, 0x0002 == AP-REP, 0x0003 == ERROR),
250 * However, for some protocols, the KRB5 blob starts at the SHORT
251 * and has no DER encoded header etc.
253 * It appears that for some other protocols the KRB5 blob is just
254 * a Kerberos message, with no [APPLICATION 0] header, no OID,
259 * If we see an [APPLICATION 0] HEADER, we show the OID and
260 * the USHORT, and then dissect the rest as a Kerberos message.
262 * If we see an [APPLICATION 14] or [APPLICATION 15] header,
263 * we assume it's an AP-REQ or AP-REP message, and dissect
264 * it all as a Kerberos message.
266 * Otherwise, we show the USHORT, and then dissect the rest
267 * as a Kerberos message.
270 asn1_open(&hnd, tvb, offset);
273 * Get the first header ...
276 ret = asn1_header_decode(&hnd, &cls, &con, &tag, &def, &len1);
278 if (ret != ASN1_ERR_NOERROR) {
279 dissect_parse_error(tvb, offset, pinfo, subtree,
280 "SPNEGO KRB5 Header", ret);
284 if (cls == ASN1_APL && con == ASN1_CON) {
286 * [APPLICATION <tag>]
299 ret = asn1_oid_decode(&hnd, &oid, &oid_len, &nbytes);
301 if (ret != ASN1_ERR_NOERROR) {
302 dissect_parse_error(tvb, offset, pinfo, subtree,
303 "SPNEGO supportedMech token", ret);
307 oid_string = format_oid(oid, oid_len);
309 value = gssapi_lookup_oid(oid, oid_len);
312 proto_tree_add_text(subtree, tvb, offset, nbytes,
314 oid_string, value->comment);
316 proto_tree_add_text(subtree, tvb, offset, nbytes,
324 /* Next, the token ID ... */
326 token_id = tvb_get_letohs(tvb, offset);
327 proto_tree_add_uint(subtree, hf_spnego_krb5_tok_id, tvb, offset, 2,
336 case 14: /* [APPLICATION 14] */
337 case 15: /* [APPLICATION 15] */
339 * No token ID - just dissect as a Kerberos message and
342 krb5_tvb = tvb_new_subset(tvb, offset, -1, -1);
343 offset = dissect_kerberos_main(krb5_tvb, pinfo, subtree, FALSE);
347 proto_tree_add_text(subtree, tvb, offset, 0,
348 "Unknown header (cls=%d, con=%d, tag=%d)",
353 /* Next, the token ID ... */
355 token_id = tvb_get_letohs(tvb, offset);
356 proto_tree_add_uint(subtree, hf_spnego_krb5_tok_id, tvb, offset, 2,
366 case KRB_TOKEN_AP_REQ:
367 case KRB_TOKEN_AP_REP:
368 case KRB_TOKEN_AP_ERR:
369 krb5_tvb = tvb_new_subset(tvb, offset, -1, -1);
370 offset = dissect_kerberos_main(krb5_tvb, pinfo, subtree, FALSE);
373 case KRB_TOKEN_GETMIC:
374 offset = dissect_spnego_krb5_getmic_base(tvb, offset, pinfo, subtree);
378 offset = dissect_spnego_krb5_wrap_base(tvb, offset, pinfo, subtree);
381 case KRB_TOKEN_DELETE_SEC_CONTEXT:
395 * XXX - This is for GSSAPI Wrap tokens ...
398 dissect_spnego_krb5_wrap_base(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
403 * The KRB5 blob conforms to RFC1964:
404 * USHORT (0x0102 == GSS_Wrap)
408 /* Now, the sign and seal algorithms ... */
410 sgn_alg = tvb_get_letohs(tvb, offset);
411 proto_tree_add_uint(tree, hf_spnego_krb5_sgn_alg, tvb, offset, 2,
416 proto_tree_add_item(tree, hf_spnego_krb5_seal_alg, tvb, offset, 2,
421 /* Skip the filler */
425 /* Encrypted sequence number */
427 proto_tree_add_item(tree, hf_spnego_krb5_snd_seq, tvb, offset, 8,
432 /* Checksum of plaintext padded data */
434 proto_tree_add_item(tree, hf_spnego_krb5_sgn_cksum, tvb, offset, 8,
440 * At least according to draft-brezak-win2k-krb-rc4-hmac-04,
441 * if the signing algorithm is KRB_SGN_ALG_HMAC, there's an
442 * extra 8 bytes of "Random confounder" after the checksum.
443 * It certainly confounds code expecting all Kerberos 5
444 * GSS_Wrap() tokens to look the same....
446 if (sgn_alg == KRB_SGN_ALG_HMAC) {
447 proto_tree_add_item(tree, hf_spnego_krb5_confounder, tvb, offset, 8,
454 * Return the offset past the checksum, so that we know where
455 * the data we're wrapped around starts. Also, set the length
456 * of our top-level item to that offset, so it doesn't cover
457 * the data we're wrapped around.
463 * XXX - This is for GSSAPI GetMIC tokens ...
466 dissect_spnego_krb5_getmic_base(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
471 * The KRB5 blob conforms to RFC1964:
472 * USHORT (0x0101 == GSS_GetMIC)
476 /* Now, the sign algorithm ... */
478 sgn_alg = tvb_get_letohs(tvb, offset);
479 proto_tree_add_uint(tree, hf_spnego_krb5_sgn_alg, tvb, offset, 2,
484 /* Skip the filler */
488 /* Encrypted sequence number */
490 proto_tree_add_item(tree, hf_spnego_krb5_snd_seq, tvb, offset, 8,
495 /* Checksum of plaintext padded data */
497 proto_tree_add_item(tree, hf_spnego_krb5_sgn_cksum, tvb, offset, 8,
503 * At least according to draft-brezak-win2k-krb-rc4-hmac-04,
504 * if the signing algorithm is KRB_SGN_ALG_HMAC, there's an
505 * extra 8 bytes of "Random confounder" after the checksum.
506 * It certainly confounds code expecting all Kerberos 5
507 * GSS_Wrap() tokens to look the same....
509 if (sgn_alg == KRB_SGN_ALG_HMAC) {
510 proto_tree_add_item(tree, hf_spnego_krb5_confounder, tvb, offset, 8,
517 * Return the offset past the checksum, so that we know where
518 * the data we're wrapped around starts. Also, set the length
519 * of our top-level item to that offset, so it doesn't cover
520 * the data we're wrapped around.
527 * XXX - is this for SPNEGO or just GSS-API?
528 * RFC 1964 is "The Kerberos Version 5 GSS-API Mechanism"; presumably one
529 * can directly designate Kerberos V5 as a mechanism in GSS-API, rather
530 * than designating SPNEGO as the mechanism, offering Kerberos V5, and
531 * getting it accepted.
534 dissect_spnego_krb5_wrap(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
540 item = proto_tree_add_item(tree, hf_spnego_krb5, tvb, 0, -1, FALSE);
542 subtree = proto_item_add_subtree(item, ett_spnego_krb5);
545 * The KRB5 blob conforms to RFC1964:
546 * USHORT (0x0102 == GSS_Wrap)
550 /* First, the token ID ... */
552 proto_tree_add_item(subtree, hf_spnego_krb5_tok_id, tvb, offset, 2,
557 offset = dissect_spnego_krb5_wrap_base(tvb, offset, pinfo, subtree);
560 * Return the offset past the checksum, so that we know where
561 * the data we're wrapped around starts. Also, set the length
562 * of our top-level item to that offset, so it doesn't cover
563 * the data we're wrapped around.
565 proto_item_set_len(item, offset);
569 /* Spnego stuff from here */
572 dissect_spnego_mechTypes(tvbuff_t *tvb, int offset, packet_info *pinfo,
573 proto_tree *tree, ASN1_SCK *hnd,
574 gssapi_oid_value **next_level_value_p)
576 proto_item *item = NULL;
577 proto_tree *subtree = NULL;
579 guint len1, len, cls, con, tag, nbytes;
583 gboolean saw_mechanism = FALSE;
586 * MechTypeList ::= SEQUENCE OF MechType
589 ret = asn1_header_decode(hnd, &cls, &con, &tag, &def, &len1);
591 if (ret != ASN1_ERR_NOERROR) {
592 dissect_parse_error(tvb, offset, pinfo, subtree,
593 "SPNEGO last sequence header", ret);
597 if (!(cls == ASN1_UNI && con == ASN1_CON && tag == ASN1_SEQ)) {
599 subtree, tvb, offset, 0,
600 "Unknown header (cls=%d, con=%d, tag=%d)",
605 offset = hnd->offset;
607 item = proto_tree_add_item(tree, hf_spnego_mechtype, tvb, offset,
609 subtree = proto_item_add_subtree(item, ett_spnego_mechtype);
612 * Now, the object IDs ... We should translate them: FIXME
616 gssapi_oid_value *value;
618 ret = asn1_oid_decode(hnd, &oid, &len, &nbytes);
620 if (ret != ASN1_ERR_NOERROR) {
621 dissect_parse_error(tvb, offset, pinfo, subtree,
622 "SPNEGO mechTypes token", ret);
626 oid_string = format_oid(oid, len);
627 value = gssapi_lookup_oid(oid, len);
629 proto_tree_add_text(subtree, tvb, offset, nbytes, "OID: %s (%s)",
630 oid_string, value->comment);
632 proto_tree_add_text(subtree, tvb, offset, nbytes, "OID: %s",
638 * Tell our caller the first mechanism we see, so that if
639 * this is a negTokenInit with a mechToken, it can interpret
640 * the mechToken according to the first mechType. (There
641 * might not have been any indication of the mechType
642 * in prior frames, so we can't necessarily use the
643 * mechanism from the conversation; i.e., a negTokenInit
644 * can contain the initial security token for the desired
645 * mechanism of the initiator - that's the first mechanism
648 if (!saw_mechanism) {
650 *next_level_value_p = value;
651 saw_mechanism = TRUE;
666 dissect_spnego_reqFlags(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
667 proto_tree *tree, ASN1_SCK *hnd)
670 guint len1, cls, con, tag, flags;
675 ret = asn1_header_decode(hnd, &cls, &con, &tag, &def, &len1);
677 if (ret != ASN1_ERR_NOERROR) {
678 dissect_parse_error(tvb, offset, pinfo, tree,
679 "SPNEGO reqFlags header", ret);
683 if (!(cls == ASN1_UNI && con == ASN1_PRI && tag == ASN1_BTS)) {
685 tree, tvb, offset, 0,
686 "Unknown header (cls=%d, con=%d, tag=%d)",
691 /* We must have a Bit String ... insert it */
693 offset = hnd->offset;
695 flags = tvb_get_guint8(tvb, offset);
697 item = proto_tree_add_item(tree, hf_spnego_reqflags, tvb, offset, len1,
700 subtree = proto_item_add_subtree(item, ett_spnego_reqflags);
703 * Now, the bits. XXX: Assume 8 bits. FIXME.
706 proto_tree_add_boolean(subtree, hf_gssapi_reqflags_deleg, tvb, offset, len1, flags);
707 proto_tree_add_boolean(subtree, hf_gssapi_reqflags_mutual, tvb, offset, len1, flags);
708 proto_tree_add_boolean(subtree, hf_gssapi_reqflags_replay, tvb, offset, len1, flags);
709 proto_tree_add_boolean(subtree, hf_gssapi_reqflags_sequence, tvb, offset, len1, flags);
710 proto_tree_add_boolean(subtree, hf_gssapi_reqflags_anon, tvb, offset, len1, flags);
711 proto_tree_add_boolean(subtree, hf_gssapi_reqflags_conf, tvb, offset, len1, flags);
712 proto_tree_add_boolean(subtree, hf_gssapi_reqflags_integ, tvb, offset, len1, flags);
717 return offset + len1;
722 dissect_spnego_mechToken(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
723 proto_tree *tree, ASN1_SCK *hnd,
724 dissector_handle_t next_level_dissector)
730 guint cls, con, tag, nbytes;
734 * This appears to be a simple octet string ...
737 ret = asn1_header_decode(hnd, &cls, &con, &tag, &def, &nbytes);
739 if (ret != ASN1_ERR_NOERROR) {
740 dissect_parse_error(tvb, offset, pinfo, tree,
741 "SPNEGO sequence header", ret);
745 if (!(cls == ASN1_UNI && con == ASN1_PRI && tag == ASN1_OTS)) {
747 tree, tvb, offset, 0,
748 "Unknown header (cls=%d, con=%d, tag=%d)",
753 offset = hnd->offset;
755 item = proto_tree_add_item(tree, hf_spnego_mechtoken, tvb, offset,
757 subtree = proto_item_add_subtree(item, ett_spnego_mechtoken);
760 * Now, we should be able to dispatch after creating a new TVB.
763 token_tvb = tvb_new_subset(tvb, offset, nbytes, -1);
764 if (next_level_dissector)
765 call_dissector(next_level_dissector, token_tvb, pinfo, subtree);
767 hnd->offset += nbytes; /* Update this ... */
771 return offset + nbytes;
776 dissect_spnego_mechListMIC(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
777 proto_tree *tree, ASN1_SCK *hnd,
778 dissector_handle_t next_level_dissector)
780 guint len1, cls, con, tag;
783 proto_tree *subtree = NULL;
786 * Add the mechListMIC [3] Octet String or General String ...
788 ret = asn1_header_decode(hnd, &cls, &con, &tag, &def, &len1);
790 if (ret != ASN1_ERR_NOERROR) {
791 dissect_parse_error(tvb, offset, pinfo, subtree,
792 "SPNEGO sequence header", ret);
796 offset = hnd->offset;
798 if (cls == ASN1_UNI && con == ASN1_CON && tag == ASN1_SEQ) {
801 * There seems to be two different forms this can take
802 * One as an Octet string, and one as a general string in a
803 * sequence ... We will have to dissect this later
806 proto_tree_add_text(tree, tvb, offset + 4, len1 - 4,
808 tvb_format_text(tvb, offset + 4, len1 - 4));
810 /* Naughty ... but we have to adjust for what we never took */
816 else if (cls == ASN1_UNI && con == ASN1_PRI && tag == ASN1_OTS) {
821 item = proto_tree_add_item(tree, hf_spnego_mechlistmic, tvb, offset,
823 subtree = proto_item_add_subtree(item, ett_spnego_mechlistmic);
826 * Now, we should be able to dispatch after creating a new TVB.
829 token_tvb = tvb_new_subset(tvb, offset, len1, -1);
830 if (next_level_dissector)
831 call_dissector(next_level_dissector, token_tvb, pinfo, subtree);
833 hnd->offset += len1; /* Update this ... */
839 proto_tree_add_text(subtree, tvb, offset, 0,
840 "Unknown header (cls=%d, con=%d, tag=%d)",
852 dissect_spnego_negTokenInit(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
853 proto_tree *tree, ASN1_SCK *hnd,
854 gssapi_oid_value **next_level_value_p)
859 guint len1, len, cls, con, tag;
862 item = proto_tree_add_item( tree, hf_spnego_negtokeninit, tvb, offset,
864 subtree = proto_item_add_subtree(item, ett_spnego_negtokeninit);
867 * Here is what we need to get ...
868 * NegTokenInit ::= SEQUENCE {
869 * mechTypes [0] MechTypeList OPTIONAL,
870 * reqFlags [1] ContextFlags OPTIONAL,
871 * mechToken [2] OCTET STRING OPTIONAL,
872 * mechListMIC [3] OCTET STRING OPTIONAL }
876 ret = asn1_header_decode(hnd, &cls, &con, &tag, &def, &len1);
878 if (ret != ASN1_ERR_NOERROR) {
879 dissect_parse_error(tvb, offset, pinfo, subtree,
880 "SPNEGO sequence header", ret);
884 if (!(cls == ASN1_UNI && con == ASN1_CON && tag == ASN1_SEQ)) {
886 subtree, tvb, offset, 0,
887 "Unknown header (cls=%d, con=%d, tag=%d)",
892 offset = hnd->offset;
897 hdr_ofs = hnd->offset;
899 ret = asn1_header_decode(hnd, &cls, &con, &tag, &def, &len);
901 if (ret != ASN1_ERR_NOERROR) {
902 dissect_parse_error(tvb, offset, pinfo, subtree,
903 "SPNEGO context header", ret);
907 if (!(cls == ASN1_CTX && con == ASN1_CON)) {
908 proto_tree_add_text(subtree, tvb, offset, 0,
909 "Unknown header (cls=%d, con=%d, tag=%d)",
914 /* Adjust for the length of the header */
916 len1 -= (hnd->offset - hdr_ofs);
918 /* Should be one of the fields */
922 case SPNEGO_mechTypes:
924 offset = dissect_spnego_mechTypes(tvb, offset, pinfo,
930 case SPNEGO_reqFlags:
932 offset = dissect_spnego_reqFlags(tvb, offset, pinfo, subtree, hnd);
936 case SPNEGO_mechToken:
938 offset = dissect_spnego_mechToken(tvb, offset, pinfo, subtree,
939 hnd, (*next_level_value_p)->handle);
942 case SPNEGO_mechListMIC:
944 offset = dissect_spnego_mechListMIC(tvb, offset, pinfo, subtree,
945 hnd, (*next_level_value_p)->handle);
959 return offset; /* Not sure this is right */
963 dissect_spnego_negResult(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
964 proto_tree *tree, ASN1_SCK *hnd)
968 guint len, cls, con, tag, val;
970 ret = asn1_header_decode(hnd, &cls, &con, &tag, &def, &len);
972 if (ret != ASN1_ERR_NOERROR) {
973 dissect_parse_error(tvb, offset, pinfo, tree,
974 "SPNEGO context header", ret);
978 if (!(cls == ASN1_UNI && con == ASN1_PRI && tag == ASN1_ENUM)) {
980 tree, tvb, offset, 0,
981 "Unknown header (cls=%d, con=%d, tag=%d) xxx",
986 offset = hnd->offset;
988 /* Now, get the value */
990 ret = asn1_uint32_value_decode(hnd, len, &val);
992 if (ret != ASN1_ERR_NOERROR) {
993 dissect_parse_error(tvb, offset, pinfo, tree,
994 "SPNEGO negResult value", ret);
998 proto_tree_add_item(tree, hf_spnego_negtokentarg_negresult, tvb,
1001 offset = hnd->offset;
1008 dissect_spnego_supportedMech(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1009 proto_tree *tree, ASN1_SCK *hnd,
1010 gssapi_oid_value **next_level_value_p)
1013 guint oid_len, nbytes;
1016 gssapi_oid_value *value;
1017 conversation_t *conversation;
1020 * Now, get the OID, and find the handle, if any
1023 offset = hnd->offset;
1025 ret = asn1_oid_decode(hnd, &oid, &oid_len, &nbytes);
1027 if (ret != ASN1_ERR_NOERROR) {
1028 dissect_parse_error(tvb, offset, pinfo, tree,
1029 "SPNEGO supportedMech token", ret);
1033 oid_string = format_oid(oid, oid_len);
1034 value = gssapi_lookup_oid(oid, oid_len);
1037 proto_tree_add_text(tree, tvb, offset, nbytes,
1038 "supportedMech: %s (%s)",
1039 oid_string, value->comment);
1041 proto_tree_add_text(tree, tvb, offset, nbytes, "supportedMech: %s",
1048 /* Should check for an unrecognized OID ... */
1051 *next_level_value_p = value;
1054 * Now, we need to save this in per proto info in the
1055 * conversation if it exists. We also should create a
1056 * conversation if one does not exist. FIXME!
1057 * Hmmm, might need to be smarter, because there can be
1058 * multiple mechTypes in a negTokenInit with one being the
1059 * default used in the Token if present. Then the negTokenTarg
1060 * could override that. :-(
1063 if ((conversation = find_conversation(&pinfo->src, &pinfo->dst,
1064 pinfo->ptype, pinfo->srcport,
1065 pinfo->destport, 0))) {
1068 conversation_add_proto_data(conversation, proto_spnego,
1069 *next_level_value_p);
1080 dissect_spnego_responseToken(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1081 proto_tree *tree, ASN1_SCK *hnd,
1082 dissector_handle_t next_level_dissector)
1086 guint cls, con, tag, nbytes;
1087 tvbuff_t *token_tvb;
1089 proto_tree *subtree;
1091 ret = asn1_header_decode(hnd, &cls, &con, &tag, &def, &nbytes);
1093 if (ret != ASN1_ERR_NOERROR) {
1094 dissect_parse_error(tvb, offset, pinfo, tree,
1095 "SPNEGO sequence header", ret);
1099 if (!(cls == ASN1_UNI && con == ASN1_PRI && tag == ASN1_OTS)) {
1100 proto_tree_add_text(
1101 tree, tvb, offset, 0,
1102 "Unknown header (cls=%d, con=%d, tag=%d)",
1107 offset = hnd->offset;
1109 item = proto_tree_add_item(tree, hf_spnego_responsetoken, tvb, offset -2 ,
1112 subtree = proto_item_add_subtree(item, ett_spnego_responsetoken);
1116 * Now, we should be able to dispatch after creating a new TVB.
1117 * However, we should make sure that there is something in the
1118 * response token ...
1122 token_tvb = tvb_new_subset(tvb, offset, nbytes, -1);
1123 if (next_level_dissector)
1124 call_dissector(next_level_dissector, token_tvb, pinfo, subtree);
1127 proto_tree_add_text(subtree, tvb, offset-2, 2, "<Empty String>");
1129 hnd->offset += nbytes; /* Update this ... */
1132 return offset + nbytes;
1136 dissect_spnego_negTokenTarg(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
1137 proto_tree *tree, ASN1_SCK *hnd,
1138 gssapi_oid_value **next_level_value_p)
1142 proto_tree *subtree;
1145 guint len1, len, cls, con, tag;
1147 item = proto_tree_add_item( tree, hf_spnego_negtokentarg, tvb, offset,
1149 subtree = proto_item_add_subtree(item, ett_spnego_negtokentarg);
1152 * Here is what we need to get ...
1153 * NegTokenTarg ::= SEQUENCE {
1154 * negResult [0] ENUMERATED {
1155 * accept_completed (0),
1156 * accept_incomplete (1),
1157 * reject (2) } OPTIONAL,
1158 * supportedMech [1] MechType OPTIONAL,
1159 * responseToken [2] OCTET STRING OPTIONAL,
1160 * mechListMIC [3] OCTET STRING OPTIONAL }
1163 ret = asn1_header_decode(hnd, &cls, &con, &tag, &def, &len1);
1165 if (ret != ASN1_ERR_NOERROR) {
1166 dissect_parse_error(tvb, offset, pinfo, subtree,
1167 "SPNEGO sequence header", ret);
1171 if (!(cls == ASN1_UNI && con == ASN1_CON && tag == ASN1_SEQ)) {
1172 proto_tree_add_text(
1173 subtree, tvb, offset, 0,
1174 "Unknown header (cls=%d, con=%d, tag=%d)",
1179 offset = hnd->offset;
1184 hdr_ofs = hnd->offset;
1186 ret = asn1_header_decode(hnd, &cls, &con, &tag, &def, &len);
1188 if (ret != ASN1_ERR_NOERROR) {
1189 dissect_parse_error(tvb, offset, pinfo, subtree,
1190 "SPNEGO context header", ret);
1194 if (!(cls == ASN1_CTX && con == ASN1_CON)) {
1195 proto_tree_add_text(
1196 subtree, tvb, offset, 0,
1197 "Unknown header (cls=%d, con=%d, tag=%d)",
1202 /* Adjust for the length of the header */
1204 len1 -= (hnd->offset - hdr_ofs);
1206 /* Should be one of the fields */
1210 case SPNEGO_negResult:
1212 offset = dissect_spnego_negResult(tvb, offset, pinfo, subtree,
1216 case SPNEGO_supportedMech:
1218 offset = dissect_spnego_supportedMech(tvb, offset, pinfo, subtree,
1219 hnd, next_level_value_p);
1223 case SPNEGO_responseToken:
1225 offset = dissect_spnego_responseToken(tvb, offset, pinfo, subtree,
1227 (*next_level_value_p != NULL) ?
1228 (*next_level_value_p)->handle :
1232 case SPNEGO_mechListMIC:
1234 offset = dissect_spnego_mechListMIC(tvb, offset, pinfo, subtree,
1236 (*next_level_value_p != NULL) ?
1237 (*next_level_value_p)->handle :
1256 dissect_spnego(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1259 proto_tree *subtree;
1260 int ret, offset = 0;
1263 guint len1, cls, con, tag;
1264 conversation_t *conversation;
1265 gssapi_oid_value *next_level_value;
1268 * We need this later, so lets get it now ...
1269 * It has to be per-frame as there can be more than one GSS-API
1270 * negotiation in a conversation.
1273 next_level_value = p_get_proto_data(pinfo->fd, proto_spnego);
1274 if (!next_level_value && !pinfo->fd->flags.visited) {
1276 * No handle attached to this frame, but it's the first
1277 * pass, so it'd be attached to the conversation.
1278 * If we have a conversation, try to get the handle,
1279 * and if we get one, attach it to the frame.
1281 conversation = find_conversation(&pinfo->src, &pinfo->dst,
1282 pinfo->ptype, pinfo->srcport,
1283 pinfo->destport, 0);
1286 next_level_value = conversation_get_proto_data(conversation,
1288 if (next_level_value)
1289 p_add_proto_data(pinfo->fd, proto_spnego, next_level_value);
1293 item = proto_tree_add_item(tree, hf_spnego, tvb, offset,
1296 subtree = proto_item_add_subtree(item, ett_spnego);
1299 * The TVB contains a [0] header and a sequence that consists of an
1300 * object ID and a blob containing the data ...
1301 * Actually, it contains, according to RFC2478:
1302 * NegotiationToken ::= CHOICE {
1303 * negTokenInit [0] NegTokenInit,
1304 * negTokenTarg [1] NegTokenTarg }
1305 * NegTokenInit ::= SEQUENCE {
1306 * mechTypes [0] MechTypeList OPTIONAL,
1307 * reqFlags [1] ContextFlags OPTIONAL,
1308 * mechToken [2] OCTET STRING OPTIONAL,
1309 * mechListMIC [3] OCTET STRING OPTIONAL }
1310 * NegTokenTarg ::= SEQUENCE {
1311 * negResult [0] ENUMERATED {
1312 * accept_completed (0),
1313 * accept_incomplete (1),
1314 * reject (2) } OPTIONAL,
1315 * supportedMech [1] MechType OPTIONAL,
1316 * responseToken [2] OCTET STRING OPTIONAL,
1317 * mechListMIC [3] OCTET STRING OPTIONAL }
1319 * Windows typically includes mechTypes and mechListMic ('NONE'
1320 * in the case of NTLMSSP only).
1321 * It seems to duplicate the responseToken into the mechListMic field
1322 * as well. Naughty, naughty.
1326 asn1_open(&hnd, tvb, offset);
1329 * Get the first header ...
1332 ret = asn1_header_decode(&hnd, &cls, &con, &tag, &def, &len1);
1334 if (ret != ASN1_ERR_NOERROR) {
1335 dissect_parse_error(tvb, offset, pinfo, subtree,
1336 "SPNEGO context header", ret);
1340 if (!(cls == ASN1_CTX && con == ASN1_CON)) {
1341 proto_tree_add_text(
1342 subtree, tvb, offset, 0,
1343 "Unknown header (cls=%d, con=%d, tag=%d)",
1348 offset = hnd.offset;
1351 * The Tag is one of negTokenInit or negTokenTarg
1356 case SPNEGO_negTokenInit:
1358 offset = dissect_spnego_negTokenInit(tvb, offset, pinfo,
1364 case SPNEGO_negTokenTarg:
1366 offset = dissect_spnego_negTokenTarg(tvb, offset, pinfo,
1371 default: /* Broken, what to do? */
1378 asn1_close(&hnd, &offset);
1383 dissect_spnego_wrap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1386 proto_tree *subtree;
1387 int ret, offset = 0;
1391 guint len1, cls, con, tag, nbytes;
1395 conversation_t *conversation;
1396 gssapi_oid_value *next_level_value;
1397 tvbuff_t *token_tvb;
1401 * We need this later, so lets get it now ...
1402 * It has to be per-frame as there can be more than one GSS-API
1403 * negotiation in a conversation.
1406 next_level_value = p_get_proto_data(pinfo->fd, proto_spnego);
1407 if (!next_level_value && !pinfo->fd->flags.visited) {
1409 * No handle attached to this frame, but it's the first
1410 * pass, so it'd be attached to the conversation.
1411 * If we have a conversation, try to get the handle,
1412 * and if we get one, attach it to the frame.
1414 conversation = find_conversation(&pinfo->src, &pinfo->dst,
1415 pinfo->ptype, pinfo->srcport,
1416 pinfo->destport, 0);
1419 next_level_value = conversation_get_proto_data(conversation,
1421 if (next_level_value)
1422 p_add_proto_data(pinfo->fd, proto_spnego, next_level_value);
1426 item = proto_tree_add_item(tree, hf_spnego, tvb, offset,
1429 subtree = proto_item_add_subtree(item, ett_spnego);
1432 * The TVB contains a [0] header and a sequence that consists of an
1433 * object ID and a blob containing the data ...
1434 * XXX - is this RFC 2743's "Mechanism-Independent Token Format",
1435 * with the "optional" "use in non-initial tokens" being chosen.
1438 asn1_open(&hnd, tvb, offset);
1441 * Get the first header ...
1444 ret = asn1_header_decode(&hnd, &cls, &con, &tag, &def, &len1);
1446 if (ret != ASN1_ERR_NOERROR) {
1447 dissect_parse_error(tvb, offset, pinfo, subtree,
1448 "SPNEGO context header", ret);
1449 return_offset = tvb_length(tvb);
1453 if (!(cls == ASN1_APL && con == ASN1_CON && tag == 0)) {
1454 proto_tree_add_text(
1455 subtree, tvb, offset, 0,
1456 "Unknown header (cls=%d, con=%d, tag=%d)",
1458 return_offset = tvb_length(tvb);
1462 offset = hnd.offset;
1465 * Get the OID, and find the handle, if any
1468 ret = asn1_oid_decode(&hnd, &oid, &oid_len, &nbytes);
1470 if (ret != ASN1_ERR_NOERROR) {
1471 dissect_parse_error(tvb, offset, pinfo, tree,
1472 "SPNEGO wrap token", ret);
1473 return_offset = tvb_length(tvb);
1477 oid_string = format_oid(oid, oid_len);
1478 next_level_value = gssapi_lookup_oid(oid, oid_len);
1481 * XXX - what should we do if this doesn't match the value
1482 * attached to the frame or conversation? (That would be
1483 * bogus, but that's not impossible - some broken implementation
1484 * might negotiate some security mechanism but put the OID
1485 * for some other security mechanism in GSS_Wrap tokens.)
1487 if (next_level_value)
1488 proto_tree_add_text(tree, tvb, offset, nbytes,
1489 "thisMech: %s (%s)",
1490 oid_string, next_level_value->comment);
1492 proto_tree_add_text(tree, tvb, offset, nbytes, "thisMech: %s",
1500 * Now dissect the GSS_Wrap token; it's assumed to be in the
1501 * rest of the tvbuff.
1503 item = proto_tree_add_item(tree, hf_spnego_wraptoken, tvb, offset,
1506 subtree = proto_item_add_subtree(item, ett_spnego_wraptoken);
1509 * Now, we should be able to dispatch after creating a new TVB.
1510 * The subdissector must return the length of the part of the
1511 * token it dissected, so we can return the length of the part
1512 * we (and it) dissected.
1515 token_tvb = tvb_new_subset(tvb, offset, -1, -1);
1516 if (next_level_value->wrap_handle) {
1517 len = call_dissector(next_level_value->wrap_handle, token_tvb, pinfo, subtree);
1519 return_offset = tvb_length(tvb);
1521 return_offset = offset + len;
1523 return_offset = tvb_length(tvb);
1525 asn1_close(&hnd, &offset);
1527 return return_offset;
1531 proto_register_spnego(void)
1533 static hf_register_info hf[] = {
1535 { "SPNEGO", "spnego", FT_NONE, BASE_NONE, NULL, 0x0,
1537 { &hf_spnego_negtokeninit,
1538 { "negTokenInit", "spnego.negtokeninit", FT_NONE, BASE_NONE,
1539 NULL, 0x0, "SPNEGO negTokenInit", HFILL}},
1540 { &hf_spnego_negtokentarg,
1541 { "negTokenTarg", "spnego.negtokentarg", FT_NONE, BASE_NONE,
1542 NULL, 0x0, "SPNEGO negTokenTarg", HFILL}},
1543 { &hf_spnego_mechtype,
1544 { "mechType", "spnego.negtokeninit.mechtype", FT_NONE,
1545 BASE_NONE, NULL, 0x0, "SPNEGO negTokenInit mechTypes", HFILL}},
1546 { &hf_spnego_mechtoken,
1547 { "mechToken", "spnego.negtokeninit.mechtoken", FT_NONE,
1548 BASE_NONE, NULL, 0x0, "SPNEGO negTokenInit mechToken", HFILL}},
1549 { &hf_spnego_mechlistmic,
1550 { "mechListMIC", "spnego.mechlistmic", FT_NONE,
1551 BASE_NONE, NULL, 0x0, "SPNEGO mechListMIC", HFILL}},
1552 { &hf_spnego_responsetoken,
1553 { "responseToken", "spnego.negtokentarg.responsetoken",
1554 FT_NONE, BASE_NONE, NULL, 0x0, "SPNEGO responseToken",
1556 { &hf_spnego_negtokentarg_negresult,
1557 { "negResult", "spnego.negtokeninit.negresult", FT_UINT16,
1558 BASE_HEX, VALS(spnego_negResult_vals), 0, "negResult", HFILL}},
1559 { &hf_spnego_reqflags,
1560 { "reqFlags", "spnego.negtokeninit.reqflags", FT_BYTES,
1561 BASE_HEX, NULL, 0, "reqFlags", HFILL }},
1562 { &hf_gssapi_reqflags_deleg,
1563 { "Delegation", "gssapi.reqflags.deleg", FT_BOOLEAN, 8,
1564 TFS(&tfs_reqflags_deleg), 0x01, "Delegation", HFILL }},
1565 { &hf_gssapi_reqflags_mutual,
1566 { "Mutual Authentication", "gssapi.reqflags.mutual", FT_BOOLEAN,
1567 8, TFS(&tfs_reqflags_mutual), 0x02, "Mutual Authentication", HFILL}},
1568 { &hf_gssapi_reqflags_replay,
1569 { "Replay Detection", "gssapi.reqflags.replay", FT_BOOLEAN,
1570 8, TFS(&tfs_reqflags_replay), 0x04, "Replay Detection", HFILL}},
1571 { &hf_gssapi_reqflags_sequence,
1572 { "Out-of-sequence Detection", "gssapi.reqflags.sequence",
1573 FT_BOOLEAN, 8, TFS(&tfs_reqflags_sequence), 0x08,
1574 "Out-of-sequence Detection", HFILL}},
1575 { &hf_gssapi_reqflags_anon,
1576 { "Anonymous Authentication", "gssapi.reqflags.anon",
1577 FT_BOOLEAN, 8, TFS(&tfs_reqflags_anon), 0x10,
1578 "Anonymous Authentication", HFILL}},
1579 { &hf_gssapi_reqflags_conf,
1580 { "Per-message Confidentiality", "gssapi.reqflags.conf",
1581 FT_BOOLEAN, 8, TFS(&tfs_reqflags_conf), 0x20,
1582 "Per-message Confidentiality", HFILL}},
1583 { &hf_gssapi_reqflags_integ,
1584 { "Per-message Integrity", "gssapi.reqflags.integ",
1585 FT_BOOLEAN, 8, TFS(&tfs_reqflags_integ), 0x40,
1586 "Per-message Integrity", HFILL}},
1587 { &hf_spnego_wraptoken,
1588 { "wrapToken", "spnego.wraptoken",
1589 FT_NONE, BASE_NONE, NULL, 0x0, "SPNEGO wrapToken",
1592 { "krb5_blob", "spnego.krb5.blob", FT_BYTES,
1593 BASE_NONE, NULL, 0, "krb5_blob", HFILL }},
1594 { &hf_spnego_krb5_tok_id,
1595 { "krb5_tok_id", "spnego.krb5.tok_id", FT_UINT16, BASE_HEX,
1596 VALS(spnego_krb5_tok_id_vals), 0, "KRB5 Token Id", HFILL}},
1597 { &hf_spnego_krb5_sgn_alg,
1598 { "krb5_sgn_alg", "spnego.krb5.sgn_alg", FT_UINT16, BASE_HEX,
1599 VALS(spnego_krb5_sgn_alg_vals), 0, "KRB5 Signing Algorithm", HFILL}},
1600 { &hf_spnego_krb5_seal_alg,
1601 { "krb5_seal_alg", "spnego.krb5.seal_alg", FT_UINT16, BASE_HEX,
1602 VALS(spnego_krb5_seal_alg_vals), 0, "KRB5 Sealing Algorithm", HFILL}},
1603 { &hf_spnego_krb5_snd_seq,
1604 { "krb5_snd_seq", "spnego.krb5.snd_seq", FT_BYTES, BASE_NONE,
1605 NULL, 0, "KRB5 Encrypted Sequence Number", HFILL}},
1606 { &hf_spnego_krb5_sgn_cksum,
1607 { "krb5_sgn_cksum", "spnego.krb5.sgn_cksum", FT_BYTES, BASE_NONE,
1608 NULL, 0, "KRB5 Data Checksum", HFILL}},
1609 { &hf_spnego_krb5_confounder,
1610 { "krb5_confounder", "spnego.krb5.confounder", FT_BYTES, BASE_NONE,
1611 NULL, 0, "KRB5 Confounder", HFILL}},
1614 static gint *ett[] = {
1616 &ett_spnego_negtokeninit,
1617 &ett_spnego_negtokentarg,
1618 &ett_spnego_mechtype,
1619 &ett_spnego_mechtoken,
1620 &ett_spnego_mechlistmic,
1621 &ett_spnego_responsetoken,
1622 &ett_spnego_wraptoken,
1626 proto_spnego = proto_register_protocol(
1627 "Spnego", "Spnego", "spnego");
1628 proto_spnego_krb5 = proto_register_protocol("SPNEGO-KRB5",
1632 proto_register_field_array(proto_spnego, hf, array_length(hf));
1633 proto_register_subtree_array(ett, array_length(ett));
1637 proto_reg_handoff_spnego(void)
1639 dissector_handle_t spnego_handle, spnego_wrap_handle;
1640 dissector_handle_t spnego_krb5_handle, spnego_krb5_wrap_handle;
1642 /* Register protocol with GSS-API module */
1644 spnego_handle = create_dissector_handle(dissect_spnego, proto_spnego);
1645 spnego_wrap_handle = new_create_dissector_handle(dissect_spnego_wrap,
1647 gssapi_init_oid("1.3.6.1.5.5.2", proto_spnego, ett_spnego,
1648 spnego_handle, spnego_wrap_handle,
1649 "SPNEGO - Simple Protected Negotiation");
1651 /* Register both the one MS created and the real one */
1653 * Thanks to Jean-Baptiste Marchand and Richard B Ward, the
1654 * mystery of the MS KRB5 OID is cleared up. It was due to a library
1655 * that did not handle OID components greater than 16 bits, and was
1656 * fixed in Win2K SP2 as well as WinXP.
1657 * See the archive of <ietf-krb-wg@anl.gov> for the thread topic
1658 * SPNEGO implementation issues. 3-Dec-2002.
1660 spnego_krb5_handle = create_dissector_handle(dissect_spnego_krb5,
1662 spnego_krb5_wrap_handle = new_create_dissector_handle(dissect_spnego_krb5_wrap,
1664 gssapi_init_oid("1.2.840.48018.1.2.2", proto_spnego_krb5, ett_spnego_krb5,
1665 spnego_krb5_handle, spnego_krb5_wrap_handle,
1666 "MS KRB5 - Microsoft Kerberos 5");
1667 gssapi_init_oid("1.2.840.113554.1.2.2", proto_spnego_krb5, ett_spnego_krb5,
1668 spnego_krb5_handle, spnego_krb5_wrap_handle,
1669 "KRB5 - Kerberos 5");
1670 gssapi_init_oid("1.2.840.113554.1.2.2.3", proto_spnego_krb5, ett_spnego_krb5,
1671 spnego_krb5_handle, spnego_krb5_wrap_handle,
1672 "KRB5 - Kerberos 5 - User to User");
1675 * Find the data handle for some calls
1677 data_handle = find_dissector("data");