Fix DKIM verify when used with CHUNKING. Bug 2016
[exim.git] / src / src / auths / get_data.c
index a53381c39fcdeaec7db07ac344e2bd0a2609e3bc..11bc581b9b75038cfe6dfe46df7bd42b55e97a6f 100644 (file)
@@ -1,10 +1,8 @@
-/* $Cambridge: exim/src/src/auths/get_data.c,v 1.3 2006/02/07 11:19:01 ph10 Exp $ */
-
 /*************************************************
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
-/* Copyright (c) University of Cambridge 1995 - 2006 */
+/* Copyright (c) University of Cambridge 1995 - 2016 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 #include "../exim.h"
@@ -32,14 +30,15 @@ auth_get_data(uschar **aptr, uschar *challenge, int challen)
 {
 int c;
 int p = 0;
-smtp_printf("334 %s\r\n", auth_b64encode(challenge, challen));
-while ((c = receive_getc()) != '\n' && c != EOF)
+smtp_printf("334 %s\r\n", b64encode(challenge, challen));
+while ((c = receive_getc(GETC_BUFFER_UNLIMITED)) != '\n' && c != EOF)
   {
   if (p >= big_buffer_size - 1) return BAD64;
   big_buffer[p++] = c;
   }
 if (p > 0 && big_buffer[p-1] == '\r') p--;
 big_buffer[p] = 0;
+DEBUG(D_receive) debug_printf("SMTP<< %s\n", big_buffer);
 if (Ustrcmp(big_buffer, "*") == 0) return CANCELLED;
 *aptr = big_buffer;
 return OK;