aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-07-09 03:25:25 +0000
committerGuy Harris <guy@alum.mit.edu>2005-07-09 03:25:25 +0000
commit8647bbf353ea739dac92ca08e407989febc40e9d (patch)
treee438a8b2246294994d3f75f1af775a2b11e2f2aa
parent34ae8c850f7d868be29504f3894b509d129ec8c8 (diff)
Make a bunch of items in encryption code arrays of guint8, and make some
pointers either "void *" or "guint8 *", to reduce the level of compiler warnings (the data in question is largely binary in those cases). svn path=/trunk/; revision=14886
-rw-r--r--epan/dissectors/packet-kerberos.c8
-rw-r--r--epan/dissectors/packet-kerberos.h2
-rw-r--r--epan/dissectors/packet-kink.c2
-rw-r--r--epan/dissectors/packet-spnego.c30
4 files changed, 21 insertions, 21 deletions
diff --git a/epan/dissectors/packet-kerberos.c b/epan/dissectors/packet-kerberos.c
index 235cbda945..ac13c12b4a 100644
--- a/epan/dissectors/packet-kerberos.c
+++ b/epan/dissectors/packet-kerberos.c
@@ -412,7 +412,7 @@ guint8 *
decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
int usage,
int length,
- const char *cryptotext,
+ const guint8 *cryptotext,
int keytype)
{
static int first_time=1;
@@ -531,7 +531,7 @@ guint8 *
decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
int usage,
int length,
- const char *cryptotext,
+ const guint8 *cryptotext,
int keytype)
{
static int first_time=1;
@@ -702,7 +702,7 @@ guint8 *
decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
int _U_ usage,
int length,
- const char *cryptotext,
+ const guint8 *cryptotext,
int keytype)
{
tvbuff_t *encr_tvb;
@@ -2158,7 +2158,7 @@ dissect_krb5_keytype(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int of
return offset;
}
static int keylength;
-static const char *keyvalue;
+static const guint8 *keyvalue;
static int
store_keyvalue(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb, int offset)
{
diff --git a/epan/dissectors/packet-kerberos.h b/epan/dissectors/packet-kerberos.h
index bb66a890ac..b1e6296db1 100644
--- a/epan/dissectors/packet-kerberos.h
+++ b/epan/dissectors/packet-kerberos.h
@@ -71,7 +71,7 @@ guint8 *
decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
int usage,
int length,
- const char *cryptotext,
+ const guint8 *cryptotext,
int keytype);
#endif /* HAVE_HEIMDAL_KERBEROS || HAVE_MIT_KERBEROS */
diff --git a/epan/dissectors/packet-kink.c b/epan/dissectors/packet-kink.c
index 67d2ef4472..ce4d210a0d 100644
--- a/epan/dissectors/packet-kink.c
+++ b/epan/dissectors/packet-kink.c
@@ -706,7 +706,7 @@ dissect_payload_kink_encrypt(packet_info *pinfo, tvbuff_t *tvb, int offset, prot
guint32 reserved2;
guint16 inner_payload_length;
int start_payload_offset = 0; /* Keep the begining of the payload offset */
- const char *data_value;
+ const guint8 *data_value;
#ifdef HAVE_KERBEROS
tvbuff_t *next_tvb;
guint8 *plaintext=NULL;
diff --git a/epan/dissectors/packet-spnego.c b/epan/dissectors/packet-spnego.c
index ef81f1c1e7..5ebfd16b41 100644
--- a/epan/dissectors/packet-spnego.c
+++ b/epan/dissectors/packet-spnego.c
@@ -456,13 +456,13 @@ arcfour_mic_key(void *key_data, size_t key_size, int key_type,
void *cksum_data, size_t cksum_size,
void *key6_data)
{
- char k5_data[16];
- char T[4];
+ guint8 k5_data[16];
+ guint8 T[4];
memset(T, 0, 4);
if (key_type == KEYTYPE_ARCFOUR_56) {
- char L40[14] = "fortybits";
+ guint8 L40[14] = "fortybits";
memcpy(L40 + 10, T, sizeof(T));
md5_hmac(
@@ -507,20 +507,20 @@ usage2arcfour(int usage)
}
static int
-arcfour_mic_cksum(char *key_data, int key_length,
+arcfour_mic_cksum(guint8 *key_data, int key_length,
unsigned usage,
u_char sgn_cksum[8],
- const char *v1, size_t l1,
+ const void *v1, size_t l1,
const void *v2, size_t l2,
const void *v3, size_t l3)
{
- const char signature[] = "signaturekey";
- char ksign_c[16];
+ const guint8 signature[] = "signaturekey";
+ guint8 ksign_c[16];
unsigned char t[4];
md5_state_t ms;
unsigned char digest[16];
int rc4_usage;
- char cksum[16];
+ guint8 cksum[16];
rc4_usage=usage2arcfour(usage);
md5_hmac(signature, sizeof(signature),
@@ -573,16 +573,16 @@ gssapi_verify_pad(unsigned char *wrapped_data, int wrapped_length,
static int
decrypt_arcfour(packet_info *pinfo,
- char *input_message_buffer,
- char *output_message_buffer,
- char *key_value, int key_size, int key_type)
+ guint8 *input_message_buffer,
+ guint8 *output_message_buffer,
+ guint8 *key_value, int key_size, int key_type)
{
- unsigned char Klocaldata[16];
+ guint8 Klocaldata[16];
int ret;
- int32_t seq_number;
+ gint32 seq_number;
size_t datalen;
- char k6_data[16], SND_SEQ[8], Confounder[8];
- char cksum_data[8];
+ guint8 k6_data[16], SND_SEQ[8], Confounder[8];
+ guint8 cksum_data[8];
int cmp;
int conf_flag;
size_t padlen = 0;