From 9dc0b8bd674f71f8ee422b037dc409f2dd4f9487 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Tue, 14 Mar 2006 09:10:20 +0000 Subject: merge Mirek's fetchmail-signed.patch svn path=/branches/BRANCH_6-3/; revision=4734 --- cram.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'cram.c') diff --git a/cram.c b/cram.c index 548b542b..c29d51af 100644 --- a/cram.c +++ b/cram.c @@ -17,14 +17,14 @@ #include "i18n.h" #include "md5.h" -void hmac_md5 (unsigned char *password, size_t pass_len, - unsigned char *challenge, size_t chal_len, +void hmac_md5 (char *password, size_t pass_len, + char *challenge, size_t chal_len, unsigned char *response, size_t resp_len) { int i; unsigned char ipad[64]; unsigned char opad[64]; - unsigned char hash_passwd[16]; + char hash_passwd[16]; MD5_CTX ctx; @@ -65,11 +65,11 @@ int do_cram_md5 (int sock, char *command, struct query *ctl, char *strip) { int result; int len; - unsigned char buf1[1024]; - unsigned char msg_id[768]; + char buf1[1024]; + char msg_id[768]; unsigned char response[16]; - unsigned char reply[1024]; - unsigned char *respdata; + char reply[1024]; + char *respdata; gen_send (sock, "%s CRAM-MD5", command); @@ -94,7 +94,7 @@ int do_cram_md5 (int sock, char *command, struct query *ctl, char *strip) if (len < 0) { report (stderr, GT_("could not decode BASE64 challenge\n")); return PS_AUTHFAIL; - } else if (len < sizeof (msg_id)) { + } else if ((size_t)len < sizeof (msg_id)) { msg_id[len] = 0; } else { msg_id[sizeof (msg_id)-1] = 0; -- cgit v1.2.3