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;
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
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);
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, "*");
*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);