2002-08-21 20:52:40 +00:00
|
|
|
/* packet-gssapi.h
|
|
|
|
* Dissector for GSS-API tokens as described in rfc2078, section 3.1
|
|
|
|
* Copyright 2002, Tim Potter <tpot@samba.org>
|
|
|
|
*
|
2006-05-21 04:49:01 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2002-08-21 20:52:40 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
2018-02-12 11:23:27 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
2002-08-21 20:52:40 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __PACKET_GSSAPI_H
|
|
|
|
#define __PACKET_GSSAPI_H
|
|
|
|
|
2002-08-27 23:30:34 +00:00
|
|
|
/* Structures needed outside */
|
|
|
|
|
|
|
|
typedef struct _gssapi_oid_value {
|
2003-11-16 23:17:27 +00:00
|
|
|
protocol_t *proto;
|
2002-08-27 23:30:34 +00:00
|
|
|
int ett;
|
2002-08-31 22:22:29 +00:00
|
|
|
dissector_handle_t handle;
|
2002-11-28 06:48:42 +00:00
|
|
|
dissector_handle_t wrap_handle;
|
2005-08-05 00:23:22 +00:00
|
|
|
const gchar *comment; /* For the comment */
|
2002-08-27 23:30:34 +00:00
|
|
|
} gssapi_oid_value;
|
|
|
|
|
2015-11-04 03:25:36 +00:00
|
|
|
#define DECRYPT_GSSAPI_NORMAL 1
|
|
|
|
#define DECRYPT_GSSAPI_DCE 2
|
|
|
|
|
2015-11-27 15:59:09 +00:00
|
|
|
/**< Extra data for handling of decryption of GSSAPI wrapped tvbuffs.
|
|
|
|
Caller sets decrypt_gssapi_tvb if this service is requested.
|
|
|
|
If gssapi_encrypted_tvb is NULL, then the rest of the tvb data following
|
|
|
|
the gssapi blob itself is decrypted othervise the gssapi_encrypted_tvb
|
|
|
|
tvb will be decrypted (DCERPC has the data before the gssapi blob)
|
|
|
|
If, on return, gssapi_data_encrypted is FALSE, the wrapped tvbuff
|
|
|
|
was signed (i.e., an encrypted signature was present, to check
|
|
|
|
whether the data was modified by a man in the middle) but not sealed
|
|
|
|
(i.e., the data itself wasn't encrypted).
|
|
|
|
*/
|
2015-11-02 21:47:26 +00:00
|
|
|
typedef struct _gssapi_encrypt_info
|
|
|
|
{
|
|
|
|
guint16 decrypt_gssapi_tvb;
|
|
|
|
tvbuff_t *gssapi_wrap_tvb;
|
|
|
|
tvbuff_t *gssapi_encrypted_tvb;
|
|
|
|
tvbuff_t *gssapi_decrypted_tvb;
|
|
|
|
gboolean gssapi_data_encrypted;
|
|
|
|
} gssapi_encrypt_info_t;
|
|
|
|
|
2002-08-21 20:52:40 +00:00
|
|
|
/* Function prototypes */
|
|
|
|
|
|
|
|
void
|
2005-08-05 00:23:22 +00:00
|
|
|
gssapi_init_oid(const char *oid, int proto, int ett, dissector_handle_t handle,
|
|
|
|
dissector_handle_t wrap_handle, const gchar *comment);
|
2002-08-21 20:52:40 +00:00
|
|
|
|
2005-06-20 04:44:39 +00:00
|
|
|
gssapi_oid_value *
|
2005-11-14 10:49:13 +00:00
|
|
|
gssapi_lookup_oid_str(const gchar *oid_key);
|
2002-09-08 01:43:44 +00:00
|
|
|
|
2013-10-13 19:56:52 +00:00
|
|
|
int wrap_dissect_gssapi_verf(tvbuff_t *tvb, int offset,
|
|
|
|
packet_info *pinfo,
|
2013-11-06 14:31:29 +00:00
|
|
|
proto_tree *tree, dcerpc_info *di, guint8 *drep);
|
2004-07-18 04:03:26 +00:00
|
|
|
|
2013-10-13 19:56:52 +00:00
|
|
|
tvbuff_t *wrap_dissect_gssapi_payload(tvbuff_t *data_tvb,
|
2005-03-10 10:16:49 +00:00
|
|
|
tvbuff_t *auth_tvb,
|
|
|
|
int offset,
|
2013-10-13 19:56:52 +00:00
|
|
|
packet_info *pinfo,
|
2005-03-10 10:16:49 +00:00
|
|
|
dcerpc_auth_info *auth_info);
|
|
|
|
|
2002-08-21 20:52:40 +00:00
|
|
|
#endif /* __PACKET_GSSAPI_H */
|