diff options
-rw-r--r-- | cram.c | 4 | ||||
-rw-r--r-- | fetchmail.h | 2 | ||||
-rw-r--r-- | imap.c | 2 | ||||
-rw-r--r-- | odmr.c | 2 |
4 files changed, 5 insertions, 5 deletions
@@ -60,7 +60,7 @@ static void hmac_md5 (unsigned char *password, size_t pass_len, MD5Final (response, &ctx); } -int do_cram_md5 (int sock, struct query *ctl) +int do_cram_md5 (int sock, char *command, struct query *ctl) /* authenticate as per RFC2195 */ { int result; @@ -70,7 +70,7 @@ int do_cram_md5 (int sock, struct query *ctl) unsigned char response[16]; unsigned char reply[1024]; - gen_send (sock, "AUTHENTICATE CRAM-MD5"); + gen_send (sock, "%s CRAM-MD5", command); /* From RFC2195: * The data encoded in the first ready response contains an diff --git a/fetchmail.h b/fetchmail.h index 5a2ca283..c0f72f69 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -534,7 +534,7 @@ int is_host_alias(const char *, struct query *); char *host_fqdn(void); char *rfc822timestamp(void); flag isafile(int); -int do_cram_md5 (int sock, struct query *ctl); +int do_cram_md5 (int sock, char *command, struct query *ctl); void yyerror(const char *); int yylex(void); @@ -849,7 +849,7 @@ int imap_getauth(int sock, struct query *ctl, char *greeting) report (stdout, _("CRAM-MD5 authentication is supported\n")); if (ctl->server.protocol != P_IMAP_LOGIN) { - if ((ok = do_cram_md5 (sock, ctl))) + if ((ok = do_cram_md5 (sock, "AUTHENTICATE", ctl))) /* SASL cancellation of authentication */ gen_send(sock, "*"); @@ -62,7 +62,7 @@ static int odmr_getrange(int sock, struct query *ctl, const char *id, *bytes = *countp = *newp = -1; /* authenticate via CRAM-MD5 */ - ok = do_cram_md5(sock, ctl); + ok = do_cram_md5(sock, "AUTH", ctl); if (ok) return(ok); |