diff options
author | Eduardo Chappa <chappa@washington.edu> | 2021-10-27 21:07:45 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2021-10-27 21:07:45 -0600 |
commit | 248f45578fcf93b56e3b97c52cfd21b5b84f2a38 (patch) | |
tree | 411f3e2e25ebe1e33cbff4994477dc7a18dfa38f /imap/src | |
parent | 4e924cc7aeb4edceb84d43d97f0542539f614cdd (diff) | |
download | alpine-248f45578fcf93b56e3b97c52cfd21b5b84f2a38.tar.xz |
* 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.
Diffstat (limited to 'imap/src')
-rw-r--r-- | imap/src/c-client/oauth2_aux.c | 10 | ||||
-rw-r--r-- | imap/src/osdep/nt/ssl_libressl.c | 2 | ||||
-rw-r--r-- | imap/src/osdep/unix/ssl_unix.c | 2 |
3 files changed, 7 insertions, 7 deletions
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"; |