aboutsummaryrefslogtreecommitdiffstats
path: root/cram.c
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2006-03-14 09:10:20 +0000
committerMatthias Andree <matthias.andree@gmx.de>2006-03-14 09:10:20 +0000
commit9dc0b8bd674f71f8ee422b037dc409f2dd4f9487 (patch)
tree32e04cf0045782e10fc3eecc8fa82101b3fb94ec /cram.c
parent20a0097f74bfdec16c17dd7d3eb5968f81ec90c1 (diff)
downloadfetchmail-9dc0b8bd674f71f8ee422b037dc409f2dd4f9487.tar.gz
fetchmail-9dc0b8bd674f71f8ee422b037dc409f2dd4f9487.tar.bz2
fetchmail-9dc0b8bd674f71f8ee422b037dc409f2dd4f9487.zip
merge Mirek's fetchmail-signed.patch
svn path=/branches/BRANCH_6-3/; revision=4734
Diffstat (limited to 'cram.c')
-rw-r--r--cram.c16
1 files changed, 8 insertions, 8 deletions
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;