2002-09-07 08:29:13 +00:00
|
|
|
/* packet-kerberos.h
|
2002-09-07 00:29:29 +00:00
|
|
|
*
|
2004-07-18 00:24:25 +00:00
|
|
|
* $Id$
|
2002-09-07 00:29:29 +00:00
|
|
|
*
|
|
|
|
* Ethereal - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@ethereal.com>
|
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __PACKET_KERBEROS_H
|
|
|
|
#define __PACKET_KERBEROS_H
|
|
|
|
|
2004-06-04 01:56:25 +00:00
|
|
|
/* This is a list of callback functions a caller can use to specify that
|
|
|
|
octet strings in kerberos to be passed back to application specific
|
|
|
|
dissectors, outside of kerberos.
|
|
|
|
This is used for dissection of application specific data for PacketCable
|
|
|
|
KRB_SAFE user data and eventually to pass kerberos session keys
|
|
|
|
to future DCERPC decryption and other uses.
|
|
|
|
The list is terminated by {0, NULL }
|
|
|
|
*/
|
2005-03-04 12:21:40 +00:00
|
|
|
#define KRB_CBTAG_SAFE_USER_DATA 1
|
|
|
|
#define KRB_CBTAG_PRIV_USER_DATA 2
|
2004-06-04 01:56:25 +00:00
|
|
|
typedef struct _kerberos_callbacks {
|
|
|
|
int tag;
|
|
|
|
int (*callback)(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree);
|
|
|
|
} kerberos_callbacks;
|
|
|
|
|
2002-09-07 00:29:29 +00:00
|
|
|
/* Function prototypes */
|
|
|
|
|
2003-04-25 21:29:19 +00:00
|
|
|
gint
|
2005-08-28 06:41:49 +00:00
|
|
|
dissect_kerberos_main(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean do_col_info, kerberos_callbacks *cb);
|
2002-09-07 00:29:29 +00:00
|
|
|
|
2004-10-28 22:06:55 +00:00
|
|
|
int
|
|
|
|
dissect_krb5_Checksum(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset);
|
|
|
|
|
|
|
|
int
|
|
|
|
dissect_krb5_ctime(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset);
|
|
|
|
|
2005-03-04 13:39:15 +00:00
|
|
|
int dissect_krb5_cname(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset);
|
|
|
|
int dissect_krb5_realm(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset);
|
2005-06-19 15:17:42 +00:00
|
|
|
guint32 kerberos_output_keytype(void);
|
2005-03-04 13:39:15 +00:00
|
|
|
|
2005-03-06 22:34:13 +00:00
|
|
|
#ifdef HAVE_KERBEROS
|
2005-03-07 09:02:33 +00:00
|
|
|
#define KRB_MAX_ORIG_LEN 256
|
|
|
|
|
2005-03-21 10:52:57 +00:00
|
|
|
#if defined(HAVE_HEIMDAL_KERBEROS) || defined(HAVE_MIT_KERBEROS)
|
2005-03-07 09:02:33 +00:00
|
|
|
typedef struct _enc_key_t {
|
|
|
|
struct _enc_key_t *next;
|
2005-03-21 10:07:55 +00:00
|
|
|
int keytype;
|
|
|
|
int keylength;
|
|
|
|
char *keyvalue;
|
2005-03-07 09:02:33 +00:00
|
|
|
char key_origin[KRB_MAX_ORIG_LEN+1];
|
|
|
|
} enc_key_t;
|
|
|
|
extern enc_key_t *enc_key_list;
|
|
|
|
|
2005-06-28 21:25:56 +00:00
|
|
|
guint8 *
|
|
|
|
decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
|
|
|
|
int usage,
|
|
|
|
int length,
|
2005-07-09 03:25:25 +00:00
|
|
|
const guint8 *cryptotext,
|
2005-06-28 21:25:56 +00:00
|
|
|
int keytype);
|
|
|
|
|
2005-03-21 10:52:57 +00:00
|
|
|
#endif /* HAVE_HEIMDAL_KERBEROS || HAVE_MIT_KERBEROS */
|
2005-03-07 09:02:33 +00:00
|
|
|
|
|
|
|
#endif /* HAVE_KERBEROS */
|
2005-03-06 22:34:13 +00:00
|
|
|
|
2002-09-07 00:29:29 +00:00
|
|
|
#endif /* __PACKET_KERBEROS_H */
|