MFH: r464076
Un-break with SSL OPTION (default) PR: 225885 Submitted by: brnrd Approved by: ports-secteam (riggs)
This commit is contained in:
parent
dca462b24a
commit
4a4d79d044
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/branches/2018Q1/; revision=464077
@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME= cclient
|
||||
PORTVERSION= 2007f
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
PORTEPOCH= 1
|
||||
CATEGORIES= mail devel ipv6
|
||||
MASTER_SITES= ftp://ftp.cac.washington.edu/imap/%SUBDIR%/ \
|
||||
@ -26,8 +26,6 @@ OPTIONS_DEFAULT= SSL
|
||||
SSL_AND_PLAINTEXT_DESC= Allow plain text passwords and SSL
|
||||
MBX_DEFAULT_DESC= Use MBX as default mailbox format
|
||||
|
||||
BROKEN_SSL= openssl-devel
|
||||
|
||||
ALL_TARGET= bsf
|
||||
MAKE_JOBS_UNSAFE= yes
|
||||
USE_LDCONFIG= yes
|
||||
|
26
mail/cclient/files/patch-src_osdep_unix_ssl__unix.c
Normal file
26
mail/cclient/files/patch-src_osdep_unix_ssl__unix.c
Normal file
@ -0,0 +1,26 @@
|
||||
--- src/osdep/unix/ssl_unix.c.orig 2011-07-23 00:20:10 UTC
|
||||
+++ src/osdep/unix/ssl_unix.c
|
||||
@@ -270,9 +270,9 @@ static char *ssl_start_work (SSLSTREAM *
|
||||
(err = ssl_validate_cert (cert = SSL_get_peer_certificate (stream->con),
|
||||
host))) {
|
||||
/* application callback */
|
||||
- if (scq) return (*scq) (err,host,cert ? cert->name : "???") ? NIL : "";
|
||||
+ if (scq) return (*scq) (err,host,cert ? X509_get_subject_name(cert) : "???") ? NIL : "";
|
||||
/* error message to return via mm_log() */
|
||||
- sprintf (tmp,"*%.128s: %.255s",err,cert ? cert->name : "???");
|
||||
+ sprintf (tmp,"*%.128s: %.255s",err,cert ? X509_get_subject_name(cert) : "???");
|
||||
return ssl_last_error = cpystr (tmp);
|
||||
}
|
||||
return NIL;
|
||||
@@ -322,9 +322,9 @@ static char *ssl_validate_cert (X509 *ce
|
||||
/* make sure have a certificate */
|
||||
if (!cert) ret = "No certificate from server";
|
||||
/* and that it has a name */
|
||||
- else if (!cert->name) ret = "No name in certificate";
|
||||
+ else if (!X509_get_subject_name(cert)) ret = "No name in certificate";
|
||||
/* locate CN */
|
||||
- else if (s = strstr (cert->name,"/CN=")) {
|
||||
+ else if (s = strstr (X509_get_subject_name(cert),"/CN=")) {
|
||||
if (t = strchr (s += 4,'/')) *t = '\0';
|
||||
/* host name matches pattern? */
|
||||
ret = ssl_compare_hostnames (host,s) ? NIL :
|
Loading…
Reference in New Issue
Block a user