From 248f45578fcf93b56e3b97c52cfd21b5b84f2a38 Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Wed, 27 Oct 2021 21:07:45 -0600 Subject: * Contributions by Thomas Uhle: . Add support to the LDAP attribute "userCertificate"; . Move voiceMailTelephoneNumber from the TCL side to ldap_translate; . XOAUTH2 state generator changes format specifier from %x to %02x; . Clear compiler warnings and correct spelling in documentation. . Web Alpine will not attempt to continue a postponed message if the postponed-msgs folder is empty. --- imap/src/c-client/oauth2_aux.c | 10 +++++----- imap/src/osdep/nt/ssl_libressl.c | 2 +- imap/src/osdep/unix/ssl_unix.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'imap') diff --git a/imap/src/c-client/oauth2_aux.c b/imap/src/c-client/oauth2_aux.c index d2ad6ce6..a0828ba4 100644 --- a/imap/src/c-client/oauth2_aux.c +++ b/imap/src/c-client/oauth2_aux.c @@ -34,19 +34,19 @@ char *oauth2_generate_state(void) rv[0] = '\0'; for(i = 0; i < 4; i++) - sprintf(rv + strlen(rv), "%x", (unsigned int) (random() % 256)); + sprintf(rv + strlen(rv), "%02x", (unsigned int) (random() % 256)); sprintf(rv + strlen(rv), "%c", '-'); for(i = 0; i < 2; i++) - sprintf(rv + strlen(rv), "%x", (unsigned int) (random() % 256)); + sprintf(rv + strlen(rv), "%02x", (unsigned int) (random() % 256)); sprintf(rv + strlen(rv), "%c", '-'); for(i = 0; i < 2; i++) - sprintf(rv + strlen(rv), "%x", (unsigned int) (random() % 256)); + sprintf(rv + strlen(rv), "%02x", (unsigned int) (random() % 256)); sprintf(rv + strlen(rv), "%c", '-'); for(i = 0; i < 2; i++) - sprintf(rv + strlen(rv), "%x", (unsigned int) (random() % 256)); + sprintf(rv + strlen(rv), "%02x", (unsigned int) (random() % 256)); sprintf(rv + strlen(rv), "%c", '-'); for(i = 0; i < 6; i++) - sprintf(rv + strlen(rv), "%x", (unsigned int) (random() % 256)); + sprintf(rv + strlen(rv), "%02x", (unsigned int) (random() % 256)); rv[36] = '\0'; return cpystr(rv); } diff --git a/imap/src/osdep/nt/ssl_libressl.c b/imap/src/osdep/nt/ssl_libressl.c index 04dfb36e..da466821 100644 --- a/imap/src/osdep/nt/ssl_libressl.c +++ b/imap/src/osdep/nt/ssl_libressl.c @@ -518,7 +518,7 @@ static char *ssl_validate_cert (X509 *cert,char *host) ret = "No name in certificate"; else if ((s = strstr (cert->name,"/CN=")) != NIL) { m++; /* count that we tried this method */ - if (t = strchr (s += 4,'/')) *t = '\0'; + if ((t = strchr (s += 4,'/')) != NIL) *t = '\0'; /* host name matches pattern? */ ret = ssl_compare_hostnames (host,s) ? NIL : "Server name does not match certificate"; diff --git a/imap/src/osdep/unix/ssl_unix.c b/imap/src/osdep/unix/ssl_unix.c index e9243769..601888ec 100644 --- a/imap/src/osdep/unix/ssl_unix.c +++ b/imap/src/osdep/unix/ssl_unix.c @@ -535,7 +535,7 @@ static char *ssl_validate_cert (X509 *cert,char *host) ret = "No name in certificate"; else if ((s = strstr (cert->name,"/CN=")) != NIL) { m++; /* count that we tried this method */ - if (t = strchr (s += 4,'/')) *t = '\0'; + if ((t = strchr (s += 4,'/')) != NIL) *t = '\0'; /* host name matches pattern? */ ret = ssl_compare_hostnames (host,s) ? NIL : "Server name does not match certificate"; -- cgit v1.2.3-70-g09d2