diff options
author | Alexander Vershilov <qnikst@gentoo.org> | 2012-11-28 11:17:14 +0000 |
---|---|---|
committer | Alexander Vershilov <qnikst@gentoo.org> | 2012-11-28 11:17:14 +0000 |
commit | cb1529899e026950451903a590ef7b87f0aea8ea (patch) | |
tree | cefdf8b558aaaba04e0326508cc60268b676af44 /net-libs | |
parent | backporting patches for gnutls (#440936) (diff) | |
download | gentoo-2-cb1529899e026950451903a590ef7b87f0aea8ea.tar.gz gentoo-2-cb1529899e026950451903a590ef7b87f0aea8ea.tar.bz2 gentoo-2-cb1529899e026950451903a590ef7b87f0aea8ea.zip |
backporting patches for gnutls (#440936)
(Portage version: 2.2.0_alpha142/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'net-libs')
-rw-r--r-- | net-libs/neon/ChangeLog | 8 | ||||
-rw-r--r-- | net-libs/neon/files/neon-0.29.6-gnutls-3-backport.patch | 96 | ||||
-rw-r--r-- | net-libs/neon/neon-0.29.6-r2.ebuild | 103 |
3 files changed, 206 insertions, 1 deletions
diff --git a/net-libs/neon/ChangeLog b/net-libs/neon/ChangeLog index 2e1331d266d4..9991f3d44b6a 100644 --- a/net-libs/neon/ChangeLog +++ b/net-libs/neon/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-libs/neon # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-libs/neon/ChangeLog,v 1.45 2012/11/01 15:52:27 qnikst Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-libs/neon/ChangeLog,v 1.46 2012/11/28 11:17:14 qnikst Exp $ + +*neon-0.29.6-r2 (28 Nov 2012) + + 28 Nov 2012; Alexander Vershilov <qnikst@gentoo.org> + +files/neon-0.29.6-gnutls-3-backport.patch, +neon-0.29.6-r2.ebuild: + backporting patches for gnutls (#440936) 01 Nov 2012; Alexander Vershilov <qnikst@gentoo.org> +files/neon-0.29.6-gnutls-3-functions.patch, diff --git a/net-libs/neon/files/neon-0.29.6-gnutls-3-backport.patch b/net-libs/neon/files/neon-0.29.6-gnutls-3-backport.patch new file mode 100644 index 000000000000..e699741ea4a2 --- /dev/null +++ b/net-libs/neon/files/neon-0.29.6-gnutls-3-backport.patch @@ -0,0 +1,96 @@ +BUGZILLA-GENTOO: https://bugs.gentoo.org/show_bug.cgi?id=440936, +BUGZILLA-GNUTLS: https://savannah.gnu.org/support/index.php?108189 + +This patch fixes situation when subversion fails on some https sources +due incorrect handing of issuers in neon library. + +Patch is backported from upstream. + +diff --git a/src/ne_gnutls.c b/src/ne_gnutls.c +index 5a5dca9..0eef990 100644 +--- a/src/ne_gnutls.c ++++ b/src/ne_gnutls.c +@@ -1,6 +1,6 @@ + /* + neon SSL/TLS support using GNU TLS +- Copyright (C) 2002-2010, Joe Orton <joe@manyfish.co.uk> ++ Copyright (C) 2002-2011, Joe Orton <joe@manyfish.co.uk> + Copyright (C) 2004, Aleix Conchillo Flaque <aleix@member.fsf.org> + + This library is free software; you can redistribute it and/or +@@ -486,7 +486,7 @@ static ne_ssl_certificate *populate_cert(ne_ssl_certificate *cert, + static gnutls_x509_crt x509_crt_copy(gnutls_x509_crt src) + { + int ret; +- size_t size; ++ size_t size = 0; + gnutls_datum tmp; + gnutls_x509_crt dest; + +@@ -680,6 +680,11 @@ void ne_ssl_context_set_flag(ne_ssl_context *ctx, int flag, int value) + /* SSLv2 not supported. */ + } + ++int ne_ssl_context_get_flag(ne_ssl_context *ctx, int flag) ++{ ++ return 0; ++} ++ + void ne_ssl_context_destroy(ne_ssl_context *ctx) + { + gnutls_certificate_free_credentials(ctx->cred); +@@ -1128,6 +1133,21 @@ static int pkcs12_parse(gnutls_pkcs12_t p12, gnutls_x509_privkey *pkey, + + ne_ssl_client_cert *ne_ssl_clicert_read(const char *filename) + { ++ gnutls_datum datum; ++ ne_ssl_client_cert *cc; ++ ++ if (read_to_datum(filename, &datum)) ++ return NULL; ++ ++ cc = ne_ssl_clicert_import(datum.data, datum.size); ++ ++ ne_free(datum.data); ++ ++ return cc; ++} ++ ++ne_ssl_client_cert *ne_ssl_clicert_import(const unsigned char *buffer, size_t buflen) ++{ + int ret; + gnutls_datum data; + gnutls_pkcs12_t p12; +@@ -1136,15 +1156,14 @@ ne_ssl_client_cert *ne_ssl_clicert_read(const char *filename) + gnutls_x509_crt cert = NULL; + gnutls_x509_privkey pkey = NULL; + +- if (read_to_datum(filename, &data)) +- return NULL; ++ data.data = buffer; ++ data.size = buflen; + + if (gnutls_pkcs12_init(&p12) != 0) { + return NULL; + } + + ret = gnutls_pkcs12_import(p12, &data, GNUTLS_X509_FMT_DER, 0); +- ne_free(data.data); + if (ret < 0) { + gnutls_pkcs12_deinit(p12); + return NULL; + +diff --git a/src/ne_gnutls.c b/src/ne_gnutls.c +index 0eef990..2ed90c2 100644 +--- a/src/ne_gnutls.c ++++ b/src/ne_gnutls.c +@@ -60,6 +60,9 @@ GCRY_THREAD_OPTION_PTHREAD_IMPL; + #include "ne_private.h" + #include "ne_privssl.h" + ++ ++ne_ssl_client_cert *ne_ssl_clicert_import(const unsigned char *buffer, size_t buflen); ++ + #if LIBGNUTLS_VERSION_NUMBER >= 0x020302 + /* The GnuTLS DN functions in 2.3.2 and later allow a simpler DN + * abstraction to be used. */ diff --git a/net-libs/neon/neon-0.29.6-r2.ebuild b/net-libs/neon/neon-0.29.6-r2.ebuild new file mode 100644 index 000000000000..6085fb058b34 --- /dev/null +++ b/net-libs/neon/neon-0.29.6-r2.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-libs/neon/neon-0.29.6-r2.ebuild,v 1.1 2012/11/28 11:17:13 qnikst Exp $ + +EAPI="4" + +inherit autotools eutils libtool + +DESCRIPTION="HTTP and WebDAV client library" +HOMEPAGE="http://www.webdav.org/neon/" +SRC_URI="http://www.webdav.org/neon/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="doc expat gnutls kerberos libproxy nls pkcs11 ssl static-libs zlib" +IUSE_LINGUAS="cs de fr ja nn pl ru tr zh_CN" +for lingua in ${IUSE_LINGUAS}; do + IUSE+=" linguas_${lingua}" +done +unset lingua +RESTRICT="test" + +RDEPEND="expat? ( dev-libs/expat ) + !expat? ( dev-libs/libxml2 ) + gnutls? ( + app-misc/ca-certificates + >=net-libs/gnutls-2.0 + pkcs11? ( dev-libs/pakchois ) + ) + !gnutls? ( ssl? ( + >=dev-libs/openssl-0.9.6f + pkcs11? ( dev-libs/pakchois ) + ) ) + kerberos? ( virtual/krb5 ) + libproxy? ( net-libs/libproxy ) + nls? ( virtual/libintl ) + zlib? ( sys-libs/zlib )" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +src_prepare() { + local lingua linguas + for lingua in ${IUSE_LINGUAS}; do + use linguas_${lingua} && linguas+=" ${lingua}" + done + sed -i -e "s/ALL_LINGUAS=.*/ALL_LINGUAS=\"${linguas}\"/g" configure.in + + epatch "${FILESDIR}"/${PN}-0.29.6-no-ssl-check.patch + epatch "${FILESDIR}"/${PN}-0.29.6-gnutls-3-functions.patch + epatch "${FILESDIR}"/${PN}-0.29.6-gnutls-3-types.patch + epatch "${FILESDIR}"/${PN}-0.29.6-gnutls-3-backport.patch + AT_M4DIR="macros" eautoreconf + + elibtoolize +} + +src_configure() { + local myconf=() + + if has_version sys-libs/glibc; then + einfo "Enabling SSL library thread-safety using POSIX threads..." + myconf+=(--enable-threadsafe-ssl=posix) + fi + + if use expat; then + myconf+=(--with-expat) + else + myconf+=(--with-libxml2) + fi + + if use gnutls; then + myconf+=(--with-ssl=gnutls --with-ca-bundle="${EPREFIX}/etc/ssl/certs/ca-certificates.crt") + elif use ssl; then + myconf+=(--with-ssl=openssl) + fi + + # work around broken check, we really need -lintl on Solaris + [[ ${CHOST} == *-solaris* ]] && export ne_cv_libsfor_bindtextdomain=-lintl + + econf \ + --enable-shared \ + $(use_with kerberos gssapi) \ + $(use_with libproxy) \ + $(use_enable nls) \ + $(use_with pkcs11 pakchois) \ + $(use_enable static-libs static) \ + $(use_with zlib) \ + "${myconf[@]}" +} + +src_install() { + emake DESTDIR="${D}" install-lib install-headers install-config install-nls || die "emake install failed" + + find "${ED}" -name "*.la" -print0 | xargs -0 rm -f + + if use doc; then + emake DESTDIR="${D}" install-docs || die "emake install-docs failed" + fi + + dodoc AUTHORS BUGS NEWS README THANKS TODO + doman doc/man/*.[1-8] +} |