Fix link failure with Windows

svn path=/trunk/; revision=49349
This commit is contained in:
Pascal Quantin 2013-05-16 22:23:16 +00:00
parent 5e1da6c1a6
commit c3836c576e
3 changed files with 23 additions and 19 deletions

View File

@ -59,24 +59,28 @@ TYPED-DATA
guint32 msgtype;
%(DEFAULT_BODY)s
#.FN_FTR MESSAGE-TYPE
if (gbl_do_col_info) {
col_add_str(actx->pinfo->cinfo, COL_INFO,
val_to_str(msgtype, krb5_msg_types,
"Unknown msg type %%#x"));
"Unknown msg type %#x"));
}
gbl_do_col_info=FALSE;
/* append the application type to the tree */
proto_item_append_text(tree, " %%s", val_to_str(msgtype, krb5_msg_types, "Unknown:0x%%x"));
proto_item_append_text(tree, " %s", val_to_str(msgtype, krb5_msg_types, "Unknown:0x%x"));
#.FN_BODY ERROR-CODE VAL_PTR = &krb5_errorcode
%(DEFAULT_BODY)s
#.FN_FTR ERROR-CODE
if(krb5_errorcode) {
col_add_fstr(actx->pinfo->cinfo, COL_INFO,
"KRB Error: %%s",
"KRB Error: %s",
val_to_str(krb5_errorcode, krb5_error_codes,
"Unknown error code %%#x"));
"Unknown error code %#x"));
}
return offset;
@ -114,9 +118,9 @@ guint32 msgtype;
(guint32*)actx->value_ptr);
if(tree){
proto_item_append_text(tree, " %%s",
proto_item_append_text(tree, " %s",
val_to_str(*((guint32*)actx->value_ptr), krb5_preauthentication_types,
"Unknown:%%d"));
"Unknown:%d"));
}
#.FN_BODY PA-DATA/padata-value
@ -315,7 +319,8 @@ guint32 msgtype;
actx->value_ptr = key;
offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
&(key->keytype));
&keytype);
key->keytype = keytype;
#.FN_BODY EncryptionKey/keyvalue
kerberos_key_t* key = (kerberos_key_t*)actx->value_ptr;
@ -333,7 +338,9 @@ guint32 msgtype;
%(DEFAULT_BODY)s
if (key != NULL) {
/**/#ifdef HAVE_KERBEROS
add_encryption_key(actx->pinfo, key->keytype, key->keylength, key->keyvalue, "key");
/**/#endif
}
#.FN_BODY AuthorizationData/_item/ad-type

View File

@ -153,14 +153,13 @@ static gint ett_krb_recordmark = -1;
#include "packet-kerberos-ett.c"
static guint32 krb5_errorcode;
static dissector_handle_t krb4_handle=NULL;
/* Global variables */
static guint32 krb5_errorcode;
static guint32 keytype;
static gboolean gbl_do_col_info;
static void
call_kerberos_callbacks(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int tag)
{
@ -749,12 +748,6 @@ g_warning("woohoo decrypted keytype:%d in frame:%u\n", keytype, pinfo->fd->num);
g_free(decrypted_data);
return NULL;
}
#else
/* Make an empty function if none of the decryption algorithms are defined */
static void
add_encryption_key(packet_info *pinfo _U_, int keytype _U_, int keylength _U_, const char *keyvalue _U_, const char *origin _U_)
{
}
#endif /* HAVE_MIT_KERBEROS / HAVE_HEIMDAL_KERBEROS / HAVE_LIBNETTLE */
@ -1845,6 +1838,12 @@ dissect_kerberos_main(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int d
return (dissect_kerberos_common(tvb, pinfo, tree, do_col_info, FALSE, FALSE, cb));
}
guint32
kerberos_output_keytype(void)
{
return keytype;
}
static gint
dissect_kerberos_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{

View File

@ -48,8 +48,6 @@ typedef struct _kerberos_callbacks {
gint
dissect_kerberos_main(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean do_col_info, kerberos_callbacks *cb);
#include "packet-kerberos-exp.h"
int
dissect_krb5_Checksum(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_);