]> Pileus Git - ~andy/fetchmail/blobdiff - rpa.c
Credit John Beck's fixes.
[~andy/fetchmail] / rpa.c
diff --git a/rpa.c b/rpa.c
index 433c12e6d0f3474056c3ab22c51ba9723f9a6cdd..c365f0ded8b2338ed9a1b2792557c4d0da07b209 100644 (file)
--- a/rpa.c
+++ b/rpa.c
 #include  <unistd.h>
 #include  <ctype.h>
 #include  <string.h>
+#include  <sys/types.h>
 
 #include  "socket.h"
 #include  "fetchmail.h"
-#include  "md5.h"
+#include  "fm_md5.h"
 #include  "i18n.h"
 
 #ifdef TESTMODE
@@ -48,8 +49,8 @@ extern int linecount;
   static void GenChallenge(unsigned char* buf, int len);
   static int  DigestPassphrase(char* passphrase,
                               unsigned char* rbuf, int unicodeit);
-  static void CompUserResp();
-  static int  CheckUserAuth();
+  static void CompUserResp(void);
+  static int  CheckUserAuth(void);
   static void md5(const void* in, int len, unsigned char* out);
 #endif
 
@@ -114,7 +115,7 @@ int POP3_auth_rpa (char *userid, char *passphrase, int socket)
     char buf [POPBUFSIZE];
     char *bufp;
     int      status,aulin,kuslin;
-    char* stdec[4] = { N_("Success") ,
+    const char* stdec[4] = { N_("Success") ,
                       N_("Restricted user (something wrong with account)") ,
                       N_("Invalid userid or passphrase") ,
                       N_("Deity error") };
@@ -527,7 +528,7 @@ static int DecBase64(char *bufp)
            else if ( ch=='+'                )   newx = 62;
            else if ( ch=='/'                )   newx = 63;
            else {
-               report(stderr,  GT_("dec64 error at char %d: %x\n"), inp - bufp, ch);
+               report(stderr,  GT_("dec64 error at char %d: %x\n"), (int)(inp - bufp), ch);
                return(0);
            }
            part=((part & 0x3F)*64) + newx;
@@ -883,7 +884,7 @@ static void md5(const void *in_,int len,unsigned char *out)
     MD5Final(  out, &md5context );
     if (outlevel >= O_DEBUG)
     {
-       report(stdout, GT_("MD5 result is: \n"));
+       report(stdout, GT_("MD5 result is:\n"));
        for (i=0; i<16; i++)
        {
            report_build(stdout, "%02X ",out[i]);