From e83eb833d4c427f66038ac36d59b87435d157f57 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sun, 11 Feb 2001 19:33:35 +0000 Subject: We can specify the authentication command now. svn path=/trunk/; revision=3062 --- cram.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cram.c') diff --git a/cram.c b/cram.c index df7c3d1f..01952f6b 100644 --- a/cram.c +++ b/cram.c @@ -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 -- cgit v1.2.3