net-libs/c-client: update metadata

Package-Manager: Portage-3.0.30, Repoman-3.0.3
RepoMan-Options: --force
This commit is contained in:
Mario Fetka 2022-04-05 13:09:13 +02:00
parent 822d67e88a
commit 8f7d9f4c23
7 changed files with 171 additions and 77 deletions

View File

@ -1,7 +1,15 @@
# ChangeLog for net-libs/c-client
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
# Copyright 1999-2022 Gentoo Authors; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/net-libs/c-client/ChangeLog,v 1.107 2013/01/04 08:33:23 eras Exp $
*c-client-2007f-r7 (05 Apr 2022)
05 Apr 2022; Mario Fetka <mario.fetka@gmail.com> +c-client-2007f-r7.ebuild,
+files/c-client-2007f-openssl-1.1.patch, -c-client-2007f-r4.ebuild,
files/c-client-2007f-ldflags.patch, files/c-client-2007f-topal.patch,
metadata.xml:
net-libs/c-client: update metadata
04 Jan 2013; Eray Aslan <eras@gentoo.org> -c-client-2007e-r2.ebuild,
-c-client-2007f-r1.ebuild, -c-client-2007f-r2.ebuild,
-c-client-2007f-r3.ebuild, -files/2002d-Makefile.patch,

View File

@ -1,11 +1,12 @@
AUX c-client-2006k_GENTOO_Makefile.patch 2441 SHA256 6f7bf2d23f346f0f8eed4c4ae61e5b5c95d1a12e15e7fb4192a5a723754255f8 SHA512 35b9dd0737986e466dfbfc5388827b09934b32a9a7922bba3d7b4a4bd40dcaf2985a7f2d5bd3e884ad8d33c61eaabdc7f797d6af450b3f85cd0dacec764233e0 WHIRLPOOL 56c5ca98b651de9711f261f5cb1346a517c14bedca4c44d9bc0da4201b75264a8dd1568952f693c93a0fb80d905b52f4d121fefaac1d51b08d9096514fbaaaa4
AUX c-client-2006k_GENTOO_amd64-so-fix.patch 665 SHA256 77de7621946c69638295ac11275124d0c405a4c6ba284a068f9a96c4994f3184 SHA512 213f06e133704ed2bb9fc6900edb7a4505bf6965409ecf76502bf9cafdf7c981bca552479f8ffaa1a355d2f1c1c08dbe0453fa5bce06590f6627d0e622c70879 WHIRLPOOL e111b86dbc52ec97851d229366cec17b7999c3924bd33da52f2290d0ab0afabdfe75db8eb4e0e359c96ad1d7265c28eee92d1a1337ba25ddaa3cb003ef106d1e
AUX c-client-2006k_KOLAB_Annotations.patch 14551 SHA256 cd8833d4eabd8fbad6a1588e3ee5375fced007964f1c6bcd016b34bee5d8eaf2 SHA512 871093236b3ae300968e1e200a2389566af72ed1f62ad57c1dc617dd59e8378f29175fe07e5cfc575e022f3c27769b06850cbf21567f7cc359ca204c4d87a3af WHIRLPOOL ec2e5e84bb2bc4bb17bd63d93a1d4f25be165e00e783d01e88ce695d0987dcc023dacbddedc030d02a0de3d2e7677760f80a60a85a223b687b78150870df942d
AUX c-client-2007e-heimdal.patch 1083 SHA256 4cf433c9d157dbbf52408dddf1d87ec5733a70dff157ac04b0b895a9e8e604bc SHA512 1db3635f35ebfc9486c227dde590e70ab6a812a9cba8e9c7880a1b245b656f87d3a3b8b5bd7664ca37fff9118134a143b14fba135fe204f7776aa5e62848527a WHIRLPOOL 065af01f79c71a0b6ba73be529ec201442c92e1d80701296ef00775f25d52a0d26ab3858ef97c890fb479c81f19d5b44c105be1fc8137a703af34a82df9ffa3e
AUX c-client-2007f-ldflags.patch 1648 SHA256 41f42d69bcd550d8aa62a756bc90d579612a6230be1794dcf9580e49287a485b SHA512 b635479ade20a0225b5847664579b97961de6981bc747357f9282f89dacd1860030904a43625f5e939f5afb3df38738fd6744fc659261a97e7f8eed9e6cde00c WHIRLPOOL 91367d9fe5c661d6c98e75376d7101ee31ec13155cba62da10b0b787e969fab87d650c661809a40da67f21757d4988f99a129dc159aec7e00036b01b48d376b1
AUX c-client-2007f-topal.patch 1070 SHA256 2927b586a5faef4b6b77451c7a72c351d3304b15493e337b4a47d625d0d45884 SHA512 a32b4e381c0b66fe5621d625b4fa3ba51dba8d8d4504cf137762e917cc637badc094ffa3d5238530c020cb24a228010d9714768c915691564c037638c5cc345f WHIRLPOOL 411780a2b4560f68421b92ee147332be1a2ead13580169c0235ad48e308cc816c9adf9b82e5e074cba1452be6f4d85d59cafdcd06754889bfb8edbea96352240
DIST c-client-2007f-chappa-115-all.patch.gz 30571 SHA256 ce7512e1b0d904d6429bb999bc0b159becc253088bbd89ef2185e6c948723cff SHA512 f44489ec38aa6a3dc682872a6857154254c23352db81ee380dfdfad39743234d97a8bcc07a74459f7532efe2fc073cf7d9c078433e11a95de19beeb387ff8b65 WHIRLPOOL 9fef9066c43df4c15f4f75bbad3634481e4cfce69c054682fe40193c30db6f9ceaed40138d00133c1bf1623dd45d251031562b2f16f1699ebcf0fbc8ce6c4653
DIST imap-2007f.tar.Z 2793529 SHA256 870e95f6bd19265832a88fd89b77c54c841c59022fd21e69254050c8b1005e3c SHA512 2c728deaf66d23158c61ae55ff94f05d2a1cf0168002760321ca30c6ee1c58c0a4c7bc14ece0097ea662df6c7c49be3b91c8e5e943724c9e2736800fa9298dae WHIRLPOOL 655536d61a178940363241ad8c94a28be75e90abf3b8c585eb61364a6394ff49bb5fd5dc6de4bec5f992f03b592e583df04f0103e8f3c167aa68a476c574c4ec
EBUILD c-client-2007f-r4.ebuild 4334 SHA256 0a2e8252cebe79d72f83ea147de2c6b1efaf44ecaf036a11592155358af3578d SHA512 6d92f9cc524fd27e06da58fb5699e150c9c90427944837f7a5eecddb0e636a3d69266cae7f30a4301a6390f9483de443ba57684b3680b9a0c59b285722ddedcf WHIRLPOOL 04775e63d59b55f6a2f0c87175d7604278c2618fa99142ee75f4b510d8c2b5b05038ebc4dc617046d7bd4f10eb4be8f9fd1385782dcd02875469aa66403e76c4
MISC ChangeLog 14233 SHA256 d0a8cf94b35e132099fc75b3bfc9b31b75f6ae6ccae3c9aede297ba0c64ceb03 SHA512 6d2421703cf5cd8dec434f27eb133038e5f0eef85c0a80ccdb74d749a07ed67325d7526e825afa295e2bde473519eec175851acc38fe55c8c61cb83766e53c81 WHIRLPOOL b478a38cde07cb494b31fa3efa57e960bdb704f4be524ca2aa4222c36f83af42ff97c3b3e863f2f4e7a7228b3009e0711eb9878f62b709afe6906ba2b7c4d6ff
MISC metadata.xml 493 SHA256 2edbcc472b96ecaf42e59644792ab029f8285e1be6aaf8d5136cd7a021210e61 SHA512 9a0b21eaa73777d2c6576c4ee274d9792886d9564a2043dd519cf6f5b0ae1436beea319cce4589dc3fbb7ee7753c7dec11feb5cee4145836f99a18ca075daa00 WHIRLPOOL 279f5059ed842c5e4c0f12f1d3e6390eb63f717fb5200bae6076b886da5f7642178394a34b137123ec13f2a998aa5a5b50094e1e7bb437dbeb377a117fb4ddab
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-2006k_KOLAB_Annotations.patch 14551 BLAKE2B 5d8fd31a5e5f3fe71798527211e3d4bf4f6aae7d92dc352998c672f800121990fed9e32316497da08b0642315800922ea75d9c4321c589f4b203d921d700eeb7 SHA512 871093236b3ae300968e1e200a2389566af72ed1f62ad57c1dc617dd59e8378f29175fe07e5cfc575e022f3c27769b06850cbf21567f7cc359ca204c4d87a3af
AUX c-client-2007e-heimdal.patch 1083 BLAKE2B bb767dbb930d3dba6beafcc6e0d7d9208172ff6fbd70f70bc815191f9b4de4b38c8e312eb57e408e034b1149f385f2dbbd2829abb9ed1aeabc4d83fcf9591b40 SHA512 1db3635f35ebfc9486c227dde590e70ab6a812a9cba8e9c7880a1b245b656f87d3a3b8b5bd7664ca37fff9118134a143b14fba135fe204f7776aa5e62848527a
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-r7.ebuild 4572 BLAKE2B 4519f38491746cda4a66663f36ff8c8cf071ca5aaa40b8829a912ac675d6d9375a96aa847a7202c16f058f2a8f8f40e44960e59d52f7a8293a1ea7183e9e43bd SHA512 af3ace72b8ad46975703af57932efbb8564b5cba200a36fb765817068e69dc8d98c0f9436a7b0f8cc5b9b2db2aa9e5e5e8dc91b3375aa15ec70426e2edb1babd
MISC ChangeLog 14538 BLAKE2B bfd0b76fea4b1da17c0132aa6cc342b72015778c973efbce94f6c7ec9a16e9f8e4f8c16e2cb1243e919337daddf80a9f4ccc1c417877cb4ea5e76c1e9c6c3b1a SHA512 338913cb78322bc6463211f6d21b68e5b241983fee27b37b58b9b58726674b3a613390e90b735e61b75e1301af72c32b8dc904b7293771580510ccd2e6e46db3
MISC metadata.xml 481 BLAKE2B c10dea9f32197ea0f48c7d4c4de5d082640bbb424be1e8e371668bcaebfdbd878b21dbe1a43dda5d347f186874c119047485f27ea067495f2eb2d7fa7fbbdb5d SHA512 b153757f61ebba9aa79b1a57b52e3c5e7a3299c17f9ccb2b0f815b2799469c5b29dd4a598f923f9037c6804175f2014c2ec3803cd092a9b21f470b0e5e764c53

View File

@ -1,10 +1,9 @@
# Copyright 1999-2012 Gentoo Foundation
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-libs/c-client/c-client-2007f-r4.ebuild,v 1.12 2012/12/30 16:37:05 armin76 Exp $
EAPI=4
EAPI=6
inherit flag-o-matic eutils libtool toolchain-funcs multilib
inherit flag-o-matic libtool toolchain-funcs
MY_PN=imap
MY_P="${MY_PN}-${PV}"
@ -18,18 +17,51 @@ SRC_URI="ftp://ftp.cac.washington.edu/imap/${MY_P}.tar.Z
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd"
IUSE="doc +ipv6 kerberos kernel_linux kernel_FreeBSD pam ssl static-libs topal chappa"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="doc +ipv6 kerberos pam ssl static-libs topal chappa"
RDEPEND="ssl? ( dev-libs/openssl )
RDEPEND="
!net-mail/uw-imap
kerberos? ( virtual/krb5 )"
DEPEND="${RDEPEND}
kernel_linux? ( pam? ( >=sys-libs/pam-0.72 ) )"
ssl? (
dev-libs/openssl:0=
)
kernel_linux? (
pam? ( >=sys-libs/pam-0.72 )
!pam? ( virtual/libcrypt:= )
)
kerberos? ( virtual/krb5 )
"
DEPEND="${RDEPEND}"
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"
# heimdal
if has_version app-crypt/heimdal ; then
eapply -p1 "${FILESDIR}/${PN}-2007e-heimdal.patch"
fi
# Tarball packed with bad file perms
chmod -R u+rwX,go-w .
chmod -R u+rwX,go-w . || die "failed to fix permissions"
# lots of things need -fPIC, including various platforms, and this library
# generally should be built with it anyway.
@ -40,42 +72,30 @@ src_prepare() {
-e "s:BASECFLAGS=\".*\":BASECFLAGS=:g" \
-e 's:SSLDIR=/usr/local/ssl:SSLDIR=/usr:g' \
-e 's:SSLCERTS=$(SSLDIR)/certs:SSLCERTS=/etc/ssl/certs:g' \
-i src/osdep/unix/Makefile || die "Makefile sed fixing failed"
-i src/osdep/unix/Makefile \
|| die "failed to fix compiler flags and SSL paths in the Makefile"
# Make the build system more multilib aware
sed \
-e "s:^SSLLIB=\$(SSLDIR)/lib:SSLLIB=\$(SSLDIR)/$(get_libdir):" \
-e "s:^AFSLIB=\$(AFSDIR)/lib:AFSLIB=\$(AFSDIR)/$(get_libdir):" \
-i src/osdep/unix/Makefile || die "Makefile sed fixing failed"
-i src/osdep/unix/Makefile \
|| die "failed to fix our libdir in the Makefile"
# Targets should use the Gentoo (ie linux) fs
sed -e '/^bsf:/,/^$/ s:ACTIVEFILE=.*:ACTIVEFILE=/var/lib/news/active:g' \
-i src/osdep/unix/Makefile || die "Makefile sex fixing failed for FreeBSD"
# Apply a patch to only build the stuff we need for c-client
epatch "${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.
epatch "${FILESDIR}"/${PN}-2006k_GENTOO_amd64-so-fix.patch
# heimdal
if has_version app-crypt/heimdal ; then
epatch "${FILESDIR}"/${PN}-2007e-heimdal.patch
fi
-i src/osdep/unix/Makefile \
|| die "failed to fix the FreeBSD ACTIVEFILE path in the Makefile"
# Remove the pesky checks about SSL stuff
sed -e '/read.*exit/d' -i Makefile || die
sed -e '/read.*exit/d' -i Makefile \
|| die "failed to disable SSL warning in the Makefile"
# Respect LDFLAGS
epatch "${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 "Respecting build flags"
use topal && epatch "${FILESDIR}/${P}-topal.patch"
use chappa && epatch "${DISTDIR}/${P}-chappa-${CHAPPA_PL}-all.patch.gz"
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"
elibtoolize
}
@ -83,21 +103,19 @@ src_prepare() {
src_compile() {
local mymake ipver ssltype target passwdtype
ipver='IP=4'
use ipv6 && ipver="IP=6" && touch ip6
if use ipv6 ; then
ipver="IP=6"
touch ip6 || die "failed to create ip6 file"
fi
use ssl && ssltype="unix" || ssltype="none"
if use kernel_linux ; then
use pam && target=lnp passwdtype=pam || target=lnx passwdtype=std
elif use kernel_FreeBSD ; then
target=bsf passwdtype=pam
fi
if use kerberos ; then
mymake="EXTRAAUTHENTICATORS=gss"
if has_version app-crypt/heimdal ; then
EXTRALIBS="-lgssapi -lkrb5 -lhcrypto -lcom_err"
else
EXTRALIBS="-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err"
fi
# Fall back to "slx" when USE=pam is not set. This ensures that
# we link in libcrypt to get the crypt() routine (bug #456928).
use pam && target=lnp passwdtype=pam || target=slx passwdtype=std
fi
use kerberos \
&& mymake="EXTRAAUTHENTICATORS=gss" \
&& EXTRALIBS="-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err" \
# no parallel builds supported!
emake -j1 SSLTYPE=${ssltype} $target \
PASSWDTYPE=${passwdtype} ${ipver} ${mymake} \
@ -111,14 +129,14 @@ src_install() {
if use static-libs; then
# Library binary
dolib.a c-client/c-client.a
dosym c-client.a /usr/$(get_libdir)/libc-client.a
dosym c-client.a "/usr/$(get_libdir)/libc-client.a"
fi
# Now the shared library
dolib.so c-client/libc-client.so.1.0.0
dosym libc-client.so.1.0.0 /usr/$(get_libdir)/libc-client.so
dosym libc-client.so.1.0.0 /usr/$(get_libdir)/libc-client.so.1
dosym libc-client.so.1.0.0 "/usr/$(get_libdir)/libc-client.so"
dosym libc-client.so.1.0.0 "/usr/$(get_libdir)/libc-client.so.1"
# Headers
insinto /usr/include/imap
@ -127,10 +145,13 @@ src_install() {
doins c-client/linkage.h
doins c-client/linkage.c
doins c-client/osdep.h
if use ssl; then
echo " ssl_onceonlyinit ();" >> "${D}"/usr/include/imap/linkage.c || die
echo " ssl_onceonlyinit ();" >> "${D}"/usr/include/imap/linkage.c \
|| die "failed to add ssl init statement to linkage.c"
fi
# Docs
# Documentation
dodoc README docs/*.txt docs/BUILD docs/CONFIG docs/RELNOTES docs/SSLBUILD
if use doc; then
docinto rfc

View File

@ -1,5 +1,5 @@
--- src/osdep/unix/Makefile~ 2011-06-07 16:04:29.000000000 +0300
+++ src/osdep/unix/Makefile 2011-06-07 15:55:31.000000000 +0300
--- a/src/osdep/unix/Makefile~ 2011-06-07 16:04:29.000000000 +0300
+++ b/src/osdep/unix/Makefile 2011-06-07 15:55:31.000000000 +0300
@@ -954,23 +954,24 @@
# Once-only environment setup

View File

@ -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 :

View File

@ -1,6 +1,6 @@
diff -cr alpine-2.00.orig/imap/src/c-client/mail.h alpine-2.00.new/imap/src/c-client/mail.h
*** src/c-client/mail.h 2008-08-08 18:34:22.000000000 +0100
--- src/c-client/mail.h 2009-05-01 13:40:37.000000000 +0100
*** a/src/c-client/mail.h 2008-08-08 18:34:22.000000000 +0100
--- b/src/c-client/mail.h 2009-05-01 13:40:37.000000000 +0100
***************
*** 775,780 ****
--- 775,781 ----
@ -12,8 +12,8 @@ diff -cr alpine-2.00.orig/imap/src/c-client/mail.h alpine-2.00.new/imap/src/c-cl
};
diff -cr alpine-2.00.orig/imap/src/c-client/mail.c alpine-2.00.new/imap/src/c-client/mail.c
*** src/c-client/mail.c 2008-06-04 19:39:54.000000000 +0100
--- src/c-client/mail.c 2009-04-30 22:34:13.000000000 +0100
*** a/src/c-client/mail.c 2008-06-04 19:39:54.000000000 +0100
--- b/src/c-client/mail.c 2009-04-30 22:34:13.000000000 +0100
***************
*** 2712,2717 ****
--- 2712,2719 ----

View File

@ -1,12 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>net-mail</herd>
<!-- maintainer-needed -->
<use>
<flag name="doc">Install RFCs related to IMAP</flag>
<flag name='topal'>Enable support for <pkg>net-mail/topal</pkg>
for use with <pkg>mail-client/alpine</pkg></flag>
<flag name='chappa'>Enable Eduardo Chappa's patches for use with
<pkg>mail-client/alpine</pkg> (mainly adds support for maildir)</flag>
<flag name="topal">Enable support for net-mail/topal for use with <pkg>mail-client/alpine</pkg></flag>
<flag name="chappa">Enable Eduardo Chappa's patches for use with <pkg>mail-client/alpine</pkg> (mainly adds support for maildir)</flag>
</use>
</pkgmetadata>