diff options
author | Eduardo Chappa <chappa@washington.edu> | 2015-07-24 22:13:59 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2015-07-24 22:13:59 -0600 |
commit | 9306e227fc7b1b096d4a58f8c06da66603a50a6a (patch) | |
tree | 0f4089b0487bb8d6514fcfb79fdd352ebcd527a9 /imap/src/c-client/auth_md5.c | |
parent | 28063ac494a640111f4483e85f968ee45b4213de (diff) | |
download | alpine-9306e227fc7b1b096d4a58f8c06da66603a50a6a.tar.xz |
* new version 2.20.9.
* Add command line argument -smimedir, which allows to specify
the default path for a directory that contains the public, private,
and ca directories. This is useful in case a user has a backup of
old certificates that cannot be installed in the ~/.alpine-smime
dir.
* Update to alpine man page to include documentation on missing command
line options such as -nowrite_password_cache, -passfile, -pwdcertdir,
and -smimedir.
* Various changes in the code to quell some compiler issued warnings in
Mac OSX. Reported by Joe St Sauver. This includes the removing
deprecated ldap functions from the code and the test in the configure
script. The switch to not deprecated functions is done by the use of
the belvar structure, which is not completely appropriate for what we
are doing, but it is sufficient for our needs. The berval structure
is more appropriate for binary data, but it works well with string
data, which is what we need.
* Various changes in the code to quell some warnings issued by clang
3.5.
Diffstat (limited to 'imap/src/c-client/auth_md5.c')
-rw-r--r-- | imap/src/c-client/auth_md5.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/imap/src/c-client/auth_md5.c b/imap/src/c-client/auth_md5.c index f32ebc88..9c81d308 100644 --- a/imap/src/c-client/auth_md5.c +++ b/imap/src/c-client/auth_md5.c @@ -100,7 +100,7 @@ long auth_md5_client (authchallenge_t challenger,authrespond_t responder, unsigned long clen; long ret = NIL; /* get challenge */ - if (challenge = (*challenger) (stream,&clen)) { + if ((challenge = (*challenger) (stream,&clen)) != NULL) { pwd[0] = NIL; /* prompt user */ mm_login (mb,user,pwd,*trial); if (!pwd[0]) { /* user requested abort */ @@ -115,7 +115,7 @@ long auth_md5_client (authchallenge_t challenger,authrespond_t responder, fs_give ((void **) &challenge); /* send credentials, allow retry if OK */ if ((*responder) (stream,pwd,strlen (pwd))) { - if (challenge = (*challenger) (stream,&clen)) + if ((challenge = (*challenger) (stream,&clen)) != NULL) fs_give ((void **) &challenge); else { ++*trial; /* can try again if necessary */ @@ -150,14 +150,14 @@ char *auth_md5_server (authresponse_t responder,int argc,char *argv[]) sprintf (chal,"<%lu.%lu@%s>",(unsigned long) getpid (), (unsigned long) time (0),mylocalhost ()); /* send challenge, get user and hash */ - if (user = (*responder) (chal,cl = strlen (chal),NIL)) { + if ((user = (*responder) (chal,cl = strlen (chal),NIL)) != NULL) { /* got user, locate hash */ - if (hash = strrchr (user,' ')) { + if ((hash = strrchr (user,' ')) != NULL) { *hash++ = '\0'; /* tie off user */ /* see if authentication user */ - if (authuser = strchr (user,'*')) *authuser++ = '\0'; + if ((authuser = strchr (user,'*')) != NULL) *authuser++ = '\0'; /* get password */ - if (p = auth_md5_pwd ((authuser && *authuser) ? authuser : user)) { + if ((p = auth_md5_pwd ((authuser && *authuser) ? authuser : user)) != NULL) { pl = strlen (p); u = (md5try && !strcmp (hash,hmac_md5 (hshbuf,chal,cl,p,pl))) ? user : NIL; @@ -234,9 +234,9 @@ char *apop_login (char *chal,char *user,char *md5,int argc,char *argv[]) MD5CONTEXT ctx; char *hex = "0123456789abcdef"; /* see if authentication user */ - if (authuser = strchr (user,'*')) *authuser++ = '\0'; + if ((authuser = strchr (user,'*')) != NULL) *authuser++ = '\0'; /* get password */ - if (s = auth_md5_pwd ((authuser && *authuser) ? authuser : user)) { + if ((s = auth_md5_pwd ((authuser && *authuser) ? authuser : user)) != NULL) { md5_init (&ctx); /* initialize MD5 context */ /* build string to get MD5 digest */ sprintf (tmp,"%.128s%.128s",chal,s); |