aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1998-10-20 07:17:52 +0000
committerEric S. Raymond <esr@thyrsus.com>1998-10-20 07:17:52 +0000
commitccc83cda812cc37b4b82cb935de34730f72e773c (patch)
treee15d0691ce785e5bbab29748793c473787ee3e4a
parent4cae919254e51869cf00323cc2738d2d759c14b9 (diff)
downloadfetchmail-ccc83cda812cc37b4b82cb935de34730f72e773c.tar.gz
fetchmail-ccc83cda812cc37b4b82cb935de34730f72e773c.tar.bz2
fetchmail-ccc83cda812cc37b4b82cb935de34730f72e773c.zip
Cosmetic fix.
svn path=/trunk/; revision=2123
-rw-r--r--imap.c86
1 files changed, 43 insertions, 43 deletions
diff --git a/imap.c b/imap.c
index 9441854f..8dbe59a7 100644
--- a/imap.c
+++ b/imap.c
@@ -123,63 +123,63 @@ int imap_ok(int sock, char *argbuf)
#if OPIE
static int do_otp(int sock, struct query *ctl)
{
- int i, rval;
- char buffer[128];
- char challenge[OPIE_CHALLENGE_MAX+1];
- char response[OPIE_RESPONSE_MAX+1];
+ int i, rval;
+ char buffer[128];
+ char challenge[OPIE_CHALLENGE_MAX+1];
+ char response[OPIE_RESPONSE_MAX+1];
- gen_send(sock, "AUTHENTICATE X-OTP");
+ gen_send(sock, "AUTHENTICATE X-OTP");
- if (rval = gen_recv(sock, buffer, sizeof(buffer)))
- return rval;
+ if (rval = gen_recv(sock, buffer, sizeof(buffer)))
+ return rval;
- if ((i = from64tobits(challenge, buffer)) < 0) {
- error(0, -1, "Could not decode initial BASE64 challenge");
- return PS_AUTHFAIL;
- };
+ if ((i = from64tobits(challenge, buffer)) < 0) {
+ error(0, -1, "Could not decode initial BASE64 challenge");
+ return PS_AUTHFAIL;
+ };
- to64frombits(buffer, ctl->remotename, strlen(ctl->remotename));
+ to64frombits(buffer, ctl->remotename, strlen(ctl->remotename));
- if (outlevel >= O_MONITOR)
- error(0, 0, "IMAP> %s", buffer);
- SockWrite(sock, buffer, strlen(buffer));
- SockWrite(sock, "\r\n", 2);
+ if (outlevel >= O_MONITOR)
+ error(0, 0, "IMAP> %s", buffer);
+ SockWrite(sock, buffer, strlen(buffer));
+ SockWrite(sock, "\r\n", 2);
- if (rval = gen_recv(sock, buffer, sizeof(buffer)))
- return rval;
+ if (rval = gen_recv(sock, buffer, sizeof(buffer)))
+ return rval;
- if ((i = from64tobits(challenge, buffer)) < 0) {
- error(0, -1, "Could not decode OTP challenge");
- return PS_AUTHFAIL;
- };
+ if ((i = from64tobits(challenge, buffer)) < 0) {
+ error(0, -1, "Could not decode OTP challenge");
+ return PS_AUTHFAIL;
+ };
- rval = opiegenerator(challenge, !strcmp(ctl->password, "opie") ? "" : ctl->password, response);
- if ((rval == -2) && !run.poll_interval) {
- char secret[OPIE_SECRET_MAX+1];
- fprintf(stderr, "Secret pass phrase: ");
- if (opiereadpass(secret, sizeof(secret), 0))
- rval = opiegenerator(challenge, secret, response);
- memset(secret, 0, sizeof(secret));
- };
+ rval = opiegenerator(challenge, !strcmp(ctl->password, "opie") ? "" : ctl->password, response);
+ if ((rval == -2) && !run.poll_interval) {
+ char secret[OPIE_SECRET_MAX+1];
+ fprintf(stderr, "Secret pass phrase: ");
+ if (opiereadpass(secret, sizeof(secret), 0))
+ rval = opiegenerator(challenge, secret, response);
+ memset(secret, 0, sizeof(secret));
+ };
- if (rval)
- return PS_AUTHFAIL;
+ if (rval)
+ return PS_AUTHFAIL;
- to64frombits(buffer, response, strlen(response));
+ to64frombits(buffer, response, strlen(response));
- if (outlevel >= O_MONITOR)
- error(0, 0, "IMAP> %s", buffer);
- SockWrite(sock, buffer, strlen(buffer));
- SockWrite(sock, "\r\n", 2);
+ if (outlevel >= O_MONITOR)
+ error(0, 0, "IMAP> %s", buffer);
+ SockWrite(sock, buffer, strlen(buffer));
+ SockWrite(sock, "\r\n", 2);
- if (rval = gen_recv(sock, buffer, sizeof(buffer)))
- return rval;
+ if (rval = gen_recv(sock, buffer, sizeof(buffer)))
+ return rval;
- if (strstr(buffer, "OK"))
- return PS_SUCCESS;
- else
- return PS_AUTHFAIL;
+ if (strstr(buffer, "OK"))
+ return PS_SUCCESS;
+ else
+ return PS_AUTHFAIL;
};
#endif /* OPIE */