diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-10-27 12:48:57 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-10-27 12:48:57 +0100 |
commit | 70b82ae359a5538711e103b0e8dfb92654296644 (patch) | |
tree | 8412b84ff9ce02a22be5251052b00feefe1d5b70 /net-libs/c-client | |
parent | 64e107b9b6058580ff0432107eb37cefb0b2a7d8 (diff) |
gentoo resync : 27.10.2018
Diffstat (limited to 'net-libs/c-client')
-rw-r--r-- | net-libs/c-client/Manifest | 3 | ||||
-rw-r--r-- | net-libs/c-client/c-client-2007f-r6.ebuild | 35 | ||||
-rw-r--r-- | net-libs/c-client/files/c-client-2007f-openssl-1.1.patch | 66 |
3 files changed, 89 insertions, 15 deletions
diff --git a/net-libs/c-client/Manifest b/net-libs/c-client/Manifest index e28f222727c1..dfc6cfd3a3ee 100644 --- a/net-libs/c-client/Manifest +++ b/net-libs/c-client/Manifest @@ -1,8 +1,9 @@ AUX c-client-2006k_GENTOO_Makefile.patch 2441 BLAKE2B 51ef084f0f6a61129762331330b3a8b5ef25e46db4300ed275cba402843ed70f2d853d1a7f1dddbd4077880be941afce01675607d37f6a2905e096738f78c4a6 SHA512 35b9dd0737986e466dfbfc5388827b09934b32a9a7922bba3d7b4a4bd40dcaf2985a7f2d5bd3e884ad8d33c61eaabdc7f797d6af450b3f85cd0dacec764233e0 AUX c-client-2006k_GENTOO_amd64-so-fix.patch 665 BLAKE2B 51d4ace2843c4cc448a5b6d6d365cdc8861e5229334827f1de20db8083a64d0b8ec1f54f1768aad29ae284e62db7d512dbf898cd08f8abeda18a456de5b1f351 SHA512 213f06e133704ed2bb9fc6900edb7a4505bf6965409ecf76502bf9cafdf7c981bca552479f8ffaa1a355d2f1c1c08dbe0453fa5bce06590f6627d0e622c70879 AUX c-client-2007f-ldflags.patch 1652 BLAKE2B 622c3c1f10e4a4500fbf008073e5e9131ad9d5f42e4b524063087c5b3d35ed91acaaef0fad8b05041002e812e25ab0444b1ca06187164e519d27e9be415df21d SHA512 d30d523ffe8ac704278d3bb8cf03219d5cefc9eff0280495effbfd759062e45ae7df9b53a147cf0b8f9751657c5909de7cff316726569821c2fb2fc6eb8300c7 +AUX c-client-2007f-openssl-1.1.patch 2857 BLAKE2B 748933d521a99409234e62cfee1c98ecae803452e30d5c8e6149c3744084174751253b2e58ee83259aaad3fd24bf15bd901e509c84792f12d4ad350f26939a32 SHA512 45ef128f1fcda303ab163ffe9b21e319d7dbd6c60940d8f65996feab81235d5f652e24c340b0cdc8a3d9ae1ad1b0d8f8e55e64668d26d135fb06717adea4c7d4 AUX c-client-2007f-topal.patch 1078 BLAKE2B 5224ac12119e25c3208865bf1904a21c9d4bd880b685bea1389cc32a30764e8673606085f2d58ec12532618807d61257e02ed2d9b178014c8ba78f9defba1f72 SHA512 f81914d9d0acf92625d2a4956aa82e9639bc36ab12c608dafb8137afe619f6acc5d9647d05a1827bfe27b21c9dd774bd458c8cfa2e5c2e449ed956daed674b00 DIST c-client-2007f-chappa-115-all.patch.gz 30571 BLAKE2B 707ec7718f764d5fea4142a4e0c4dd561d0a387cb72fea16de656a01bc21a0b30600dc121c8af090b76188d0131852ca6f3d40b9bba8745696faed5a79fb8c59 SHA512 f44489ec38aa6a3dc682872a6857154254c23352db81ee380dfdfad39743234d97a8bcc07a74459f7532efe2fc073cf7d9c078433e11a95de19beeb387ff8b65 DIST imap-2007f.tar.Z 2793529 BLAKE2B f5b597551ef56d284180cd49cf6b7d01a63ee60bcb513a354bd7ec63428184b854e3ea666a9f3ce1f5b27699cf81d2f1d0e66e5cfc7fee93d723bb146d113ec7 SHA512 2c728deaf66d23158c61ae55ff94f05d2a1cf0168002760321ca30c6ee1c58c0a4c7bc14ece0097ea662df6c7c49be3b91c8e5e943724c9e2736800fa9298dae -EBUILD c-client-2007f-r6.ebuild 4539 BLAKE2B 4e1027e0177ecc72dda2b9fc4d178e4ee51c9faf9785c35a6b844c0f7fb5028ada27506fbe2fa364453a072b549e811f0bc9db7bf9b79b5fb22d1b2f9cdd153d SHA512 58106409125a1c4d7c27d90d6bad559219682b0d941c5284084daaee214b78e09a3cdb14c32f8c35d315de0f5ff9b55db3f26348a1b5ce5b6de5c22c7e9dda22 +EBUILD c-client-2007f-r6.ebuild 4608 BLAKE2B ba7ad0312cec1a783acb0a4528e49ab43c011e791a4664ee46b52fb028c6e68f55bd89839dd4f26860b9cbedd3c002d6c1713d56e33a064558c40525cd272a10 SHA512 599b88e2428ab26ddec011882f9e62a76bf016218d6d26ac6a9f8274da0511da9d4a2889801cdf9c82aa989e0bfd2aa6413d0b0bb0f72ae327df89619aa2d727 MISC metadata.xml 557 BLAKE2B 44505412653c4f93aeeb3391e48b6f8922e83f29af6486f25621619804c510df783b51f327a8b986bedadfbe5ff4809d9c03a148fbab0fd0eca60f7d740c0fb3 SHA512 fa7558b3e834e008688e4bf3c854e5813a27b908f685267e4ff5fe6a41f9beef9a2689156857039e0a13cbcf94fecd1dff4e0a75e70afc1bd5d81421bbac36de diff --git a/net-libs/c-client/c-client-2007f-r6.ebuild b/net-libs/c-client/c-client-2007f-r6.ebuild index 6f539a984877..4135436c43f7 100644 --- a/net-libs/c-client/c-client-2007f-r6.ebuild +++ b/net-libs/c-client/c-client-2007f-r6.ebuild @@ -1,8 +1,8 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 -inherit flag-o-matic eutils libtool toolchain-funcs multilib +inherit flag-o-matic libtool toolchain-funcs multilib MY_PN=imap MY_P="${MY_PN}-${PV}" @@ -30,9 +30,28 @@ DEPEND="${RDEPEND} kernel_linux? ( pam? ( >=sys-libs/pam-0.72 ) ) " +PATCHES=( + # Apply a patch to only build the stuff we need for c-client + "${FILESDIR}/${PN}-2006k_GENTOO_Makefile.patch" + + # Apply patch to add the compilation of a .so for PHP + # This was previously conditional, but is more widely useful. + "${FILESDIR}/${PN}-2006k_GENTOO_amd64-so-fix.patch" + + # Respect LDFLAGS + "${FILESDIR}/${PN}-2007f-ldflags.patch" + + # openssl-1.1 build fix #647616 + "${FILESDIR}/${PN}-2007f-openssl-1.1.patch" +) + src_prepare() { + use topal && PATCHES+=( "${FILESDIR}/${P}-topal.patch" ) + default + use chappa && eapply -p2 "${WORKDIR}/${P}-chappa-${CHAPPA_PL}-all.patch" + # Tarball packed with bad file perms chmod -R u+rwX,go-w . || die "failed to fix permissions" @@ -60,28 +79,16 @@ src_prepare() { -i src/osdep/unix/Makefile \ || die "failed to fix the FreeBSD ACTIVEFILE path in the Makefile" - # Apply a patch to only build the stuff we need for c-client - eapply "${FILESDIR}/${PN}-2006k_GENTOO_Makefile.patch" - - # Apply patch to add the compilation of a .so for PHP - # This was previously conditional, but is more widely useful. - eapply "${FILESDIR}/${PN}-2006k_GENTOO_amd64-so-fix.patch" - # Remove the pesky checks about SSL stuff sed -e '/read.*exit/d' -i Makefile \ || die "failed to disable SSL warning in the Makefile" - # Respect LDFLAGS - eapply "${FILESDIR}/${PN}-2007f-ldflags.patch" sed -e "s:CC=cc:CC=$(tc-getCC):" \ -e "s:ARRC=ar:ARRC=$(tc-getAR):" \ -e "s:RANLIB=ranlib:RANLIB=$(tc-getRANLIB):" \ -i src/osdep/unix/Makefile \ || die "failed to fix build flags support in the Makefile" - use topal && eapply "${FILESDIR}/${P}-topal.patch" - use chappa && epatch "${DISTDIR}/${P}-chappa-${CHAPPA_PL}-all.patch.gz" - elibtoolize } diff --git a/net-libs/c-client/files/c-client-2007f-openssl-1.1.patch b/net-libs/c-client/files/c-client-2007f-openssl-1.1.patch new file mode 100644 index 000000000000..918f0bd3fbd5 --- /dev/null +++ b/net-libs/c-client/files/c-client-2007f-openssl-1.1.patch @@ -0,0 +1,66 @@ +diff -Nru a/src/osdep/unix/ssl_unix.c b/src/osdep/unix/ssl_unix.c +--- a/src/osdep/unix/ssl_unix.c 2011-07-23 02:20:10.000000000 +0200 ++++ b/src/osdep/unix/ssl_unix.c 2018-09-22 09:34:26.492765776 +0200 +@@ -59,7 +59,7 @@ + static SSLSTREAM *ssl_start(TCPSTREAM *tstream,char *host,unsigned long flags); + static char *ssl_start_work (SSLSTREAM *stream,char *host,unsigned long flags); + static int ssl_open_verify (int ok,X509_STORE_CTX *ctx); +-static char *ssl_validate_cert (X509 *cert,char *host); ++static char *ssl_validate_cert (X509 *cert,char *host, char *cert_subj); + static long ssl_compare_hostnames (unsigned char *s,unsigned char *pat); + static char *ssl_getline_work (SSLSTREAM *stream,unsigned long *size, + long *contd); +@@ -210,6 +210,7 @@ + BIO *bio; + X509 *cert; + unsigned long sl,tl; ++ char cert_subj[250]; + char *s,*t,*err,tmp[MAILTMPLEN]; + sslcertificatequery_t scq = + (sslcertificatequery_t) mail_parameters (NIL,GET_SSLCERTIFICATEQUERY,NIL); +@@ -266,13 +267,17 @@ + if (SSL_write (stream->con,"",0) < 0) + return ssl_last_error ? ssl_last_error : "SSL negotiation failed"; + /* need to validate host names? */ +- if (!(flags & NET_NOVALIDATECERT) && +- (err = ssl_validate_cert (cert = SSL_get_peer_certificate (stream->con), +- host))) { +- /* application callback */ +- if (scq) return (*scq) (err,host,cert ? cert->name : "???") ? NIL : ""; +- /* error message to return via mm_log() */ +- sprintf (tmp,"*%.128s: %.255s",err,cert ? cert->name : "???"); ++ if (!(flags & NET_NOVALIDATECERT)) { ++ cert_subj[0] = '\0'; ++ cert = SSL_get_peer_certificate(stream->con); ++ if (cert) ++ X509_NAME_oneline(X509_get_subject_name(cert), cert_subj, sizeof(cert_subj)); ++ err = ssl_validate_cert (cert, host, cert_subj); ++ if (err) ++ /* application callback */ ++ if (scq) return (*scq) (err,host,cert ? cert_subj : "???") ? NIL : ""; ++ /* error message to return via mm_log() */ ++ sprintf (tmp,"*%.128s: %.255s",err,cert ? cert_subj : "???"); + return ssl_last_error = cpystr (tmp); + } + return NIL; +@@ -313,7 +318,7 @@ + * Returns: NIL if validated, else string of error message + */ + +-static char *ssl_validate_cert (X509 *cert,char *host) ++static char *ssl_validate_cert (X509 *cert,char *host, char *cert_subj) + { + int i,n; + char *s,*t,*ret; +@@ -322,9 +327,9 @@ + /* 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 (cert_subj[0] == '\0') ret = "No name in certificate"; + /* locate CN */ +- else if (s = strstr (cert->name,"/CN=")) { ++ else if (s = strstr (cert_subj,"/CN=")) { + if (t = strchr (s += 4,'/')) *t = '\0'; + /* host name matches pattern? */ + ret = ssl_compare_hostnames (host,s) ? NIL : |