x11-libs/qt-core: bump hack

(Portage version: 2.2.0_alpha33-r1/svn/Linux x86_64, RepoMan options: --force)

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@2908 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one 2011-05-19 04:20:47 +00:00
parent f83863ab2e
commit c35386c0cc
4 changed files with 282 additions and 1 deletions

View File

@ -2,6 +2,12 @@
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt-core/ChangeLog,v 1.116 2010/12/05 21:45:43 wired Exp $
*qt-core-4.7.3-r1 (19 May 2011)
19 May 2011; Mario Fetka <mario.fetka@gmail.com> +qt-core-4.7.3-r1.ebuild,
+files/blacklist_ssl.patch:
bump hack
*qt-core-4.7.2-r1 (13 Mar 2011)
13 Mar 2011; Mario Fetka <mario.fetka@gmail.com> +qt-core-4.7.2-r1.ebuild:

View File

@ -1,3 +1,4 @@
AUX blacklist_ssl.patch 3839 RMD160 769b5652df6d626ef4436afcdae8fc6f927c4c47 SHA1 1301a6f353ab1eda382ab9dd3fdc7134a30a1884 SHA256 33800ce89fe0d62ba08a8fad515df048f78f481ebc8726b1244f27895a84193b
AUX moc.pro 2769 RMD160 42bd282eb8e24cf291a512766270e7afed6e56be SHA1 941513c6c83813992bb91f4584d3e015295baa07 SHA256 e0898c630e079db9693fe494bf37f6b395c291373ed7edbd0827ed7d1e085a2e
AUX qt-4.5-nolibx11.diff 1167 RMD160 da983a70bd436d35e325203dfe9390b2aee925ae SHA1 ee916596e422e91179458778b013fb103dc97cac SHA256 c6c686c1cfc07caefafe697eb8b02b6806f3845f20d3fd3839301d8a94259b0b
AUX qt-4.6-nolibx11.patch 1037 RMD160 a32338fa24ca2f99b0f3b679b1fabb88ac9b0ec1 SHA1 b7b2a430147a746a6a52f05a495be6262f2925ef SHA256 2b1d4e7df4918cafa50476e911f4c8e3e79e09fa702d756236ad2308e1c9bc69
@ -7,7 +8,9 @@ AUX rcc.pro 3440 RMD160 42e65efa8dc027f8a2b6c933243a91c1cac96092 SHA1 017ea0aea7
AUX uic.pro 3671 RMD160 b6d3c392a67b66f6996134975e99db03a9987baf SHA1 f87fff37256b5c966e4d21b0fb6cb64b717f3d07 SHA256 904084b6d936fb9bab33d3592ec69dc9872708a74834f0cb498e8153f784c7fc
DIST qt-everywhere-opensource-src-4.7.1.tar.gz 211768512 RMD160 de6998948eb9f51a9193b9020ba80cfd52d50899 SHA1 fcf764d39d982c7f84703821582bd10c3192e341 SHA256 8cb5277c41f824cfc6dcee0e95e0bf23a9ad2c8d18d245105137481d092b124a
DIST qt-everywhere-opensource-src-4.7.2.tar.gz 213663032 RMD160 de3d1c172c23c33681a0945c331db179c84cb7b5 SHA1 84414f82bbc9e8d356b986d5d1ebee89d06e4f2e SHA256 d4783b524b90bcd270ccf6e7a30d5fb51696c47eb5de49ebc2d553cd3eb49336
DIST qt-everywhere-opensource-src-4.7.3.tar.gz 213659173 RMD160 ab9c11c85898430fa74e5e07894f8da5e5936645 SHA1 765eb70d9779f93fefddddda5e6ddb33f4c0b71e SHA256 d02b6fd69d089c01f4a787aa18175d074ccaecf8980a5956e328c2991905937e
EBUILD qt-core-4.7.1-r1.ebuild 5175 RMD160 5b7c3b231ebf316202715e0d2e1586f912dd1f7e SHA1 8f262eeb47049c72f836e93e8455559113de035e SHA256 aac3eb99cc4f8819140ea43dedfd9da0411aa29009a87b748ab880a0d8fea57a
EBUILD qt-core-4.7.2-r1.ebuild 5203 RMD160 ef00277f4725f9ff97110b566ee3c26958b9b16a SHA1 edcaf77293beacab174fcc280f5ba75d150f9a31 SHA256 637334415e491866a5f1699dc8da548063a40610f2e1d4f9f62fc1b8d8b68bc3
MISC ChangeLog 15745 RMD160 7fafb90ea56f73dbacc44da83ba4a8b6af8a1823 SHA1 1c34436a63e183c2e8c0cd37907d51f4c8b19bed SHA256 8daa35d03746ab2f653b30bf4da2ea1c28e8dfd23673123d76e4b3ccc39a8d23
EBUILD qt-core-4.7.3-r1.ebuild 5175 RMD160 6e5a5797db894a5dee3706792db263802181cfe3 SHA1 4b9f3341723e180572d6c9a2d4ae2af0087acf1e SHA256 cb492015eb30f7542fe7452e68199061c146bd04745461788a18e2f30df623de
MISC ChangeLog 15898 RMD160 3fe9ca11c8418be30bb0ef8fb5e43ad57f7454f8 SHA1 6a40b154935ae87d1a447ce3751e93ba477fa3c7 SHA256 65f83364e22679f928450ff68af98a41184514f8b7006c543a54e5c71e312967
MISC metadata.xml 802 RMD160 0341afae262322299759a5a33bae9a42e5b7801c SHA1 b564551c1b4a7902e09200255c6c0a6ede646a23 SHA256 a84f88402ece782e8ac52ad0b90eea94e5bd563ca0a7956e1d89f1263d7f2925

View File

@ -0,0 +1,89 @@
diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp
index 618ac79..a5cdf01 100644
--- a/src/network/ssl/qsslcertificate.cpp
+++ b/src/network/ssl/qsslcertificate.cpp
@@ -219,17 +219,19 @@ bool QSslCertificate::isNull() const
Returns true if this certificate is valid; otherwise returns
false.
- Note: Currently, this function only checks that the current
+ Note: Currently, this function checks that the current
data-time is within the date-time range during which the
- certificate is considered valid. No other checks are
- currently performed.
+ certificate is considered valid, and checks that the
+ certificate is not in a blacklist of fraudulent certificates.
\sa isNull()
*/
bool QSslCertificate::isValid() const
{
const QDateTime currentTime = QDateTime::currentDateTime();
- return currentTime >= d->notValidBefore && currentTime <= d->notValidAfter;
+ return currentTime >= d->notValidBefore &&
+ currentTime <= d->notValidAfter &&
+ ! QSslCertificatePrivate::isBlacklisted(*this);
}
/*!
@@ -798,6 +800,30 @@ QList<QSslCertificate> QSslCertificatePrivate::certificatesFromDer(const QByteAr
return certificates;
}
+// These certificates are known to be fraudulent and were created during the comodo
+// compromise. See http://www.comodo.com/Comodo-Fraud-Incident-2011-03-23.html
+static const char *certificate_blacklist[] = {
+ "04:7e:cb:e9:fc:a5:5f:7b:d0:9e:ae:36:e1:0c:ae:1e",
+ "f5:c8:6a:f3:61:62:f1:3a:64:f5:4f:6d:c9:58:7c:06",
+ "d7:55:8f:da:f5:f1:10:5b:b2:13:28:2b:70:77:29:a3",
+ "39:2a:43:4f:0e:07:df:1f:8a:a3:05:de:34:e0:c2:29",
+ "3e:75:ce:d4:6b:69:30:21:21:88:30:ae:86:a8:2a:71",
+ "e9:02:8b:95:78:e4:15:dc:1a:71:0a:2b:88:15:44:47",
+ "92:39:d5:34:8f:40:d1:69:5a:74:54:70:e1:f2:3f:43",
+ "b0:b7:13:3e:d0:96:f9:b5:6f:ae:91:c8:74:bd:3a:c0",
+ "d8:f3:5f:4e:b7:87:2b:2d:ab:06:92:e3:15:38:2f:b0",
+ 0
+};
+
+bool QSslCertificatePrivate::isBlacklisted(const QSslCertificate &certificate)
+{
+ for (int a = 0; certificate_blacklist[a] != 0; a++) {
+ if (certificate.serialNumber() == certificate_blacklist[a])
+ return true;
+ }
+ return false;
+}
+
#ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug debug, const QSslCertificate &certificate)
{
diff --git a/src/network/ssl/qsslcertificate_p.h b/src/network/ssl/qsslcertificate_p.h
index cdceb0f..1ce33d3 100644
--- a/src/network/ssl/qsslcertificate_p.h
+++ b/src/network/ssl/qsslcertificate_p.h
@@ -96,6 +96,7 @@ public:
static QSslCertificate QSslCertificate_from_X509(X509 *x509);
static QList<QSslCertificate> certificatesFromPem(const QByteArray &pem, int count = -1);
static QList<QSslCertificate> certificatesFromDer(const QByteArray &der, int count = -1);
+ static bool isBlacklisted(const QSslCertificate &certificate);
friend class QSslSocketBackendPrivate;
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index 0866534..2427193 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -1193,6 +1193,13 @@ bool QSslSocketBackendPrivate::startHandshake()
X509 *x509 = q_SSL_get_peer_certificate(ssl);
configuration.peerCertificate = QSslCertificatePrivate::QSslCertificate_from_X509(x509);
q_X509_free(x509);
+ if (QSslCertificatePrivate::isBlacklisted(configuration.peerCertificate)) {
+ q->setErrorString(QSslSocket::tr("The peer certificate is blacklisted"));
+ q->setSocketError(QAbstractSocket::SslHandshakeFailedError);
+ emit q->error(QAbstractSocket::SslHandshakeFailedError);
+ plainSocket->disconnectFromHost();
+ return false;
+ }
// Start translating errors.
QList<QSslError> errors;

View File

@ -0,0 +1,183 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt-core/qt-core-4.7.3.ebuild,v 1.2 2011/05/10 21:40:09 tampakrap Exp $
EAPI="3"
inherit qt4-build
DESCRIPTION="The Qt toolkit is a comprehensive C++ application development framework"
SLOT="4"
KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 -sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
IUSE="+glib iconv +jit optimized-qmake private-headers qt3support ssl"
RDEPEND="sys-libs/zlib
glib? ( dev-libs/glib )
ssl? ( dev-libs/openssl )
!<x11-libs/qt-4.4.0:4"
DEPEND="${RDEPEND}
dev-util/pkgconfig"
PDEPEND="qt3support? ( ~x11-libs/qt-gui-${PV}[aqua=,glib=,qt3support] )"
pkg_setup() {
QT4_TARGET_DIRECTORIES="
src/tools/bootstrap
src/tools/moc
src/tools/rcc
src/tools/uic
src/corelib
src/xml
src/network
src/plugins/codecs
tools/linguist/lconvert
tools/linguist/lrelease
tools/linguist/lupdate"
QT4_EXTRACT_DIRECTORIES="
include/Qt
include/QtCore
include/QtDeclarative
include/QtGui
include/QtNetwork
include/QtScript
include/QtXml
src/plugins/plugins.pro
src/plugins/qpluginbase.pri
src/src.pro
src/3rdparty/des
src/3rdparty/harfbuzz
src/3rdparty/md4
src/3rdparty/md5
src/3rdparty/sha1
src/3rdparty/easing
src/3rdparty/zlib_dependency.pri
src/declarative
src/gui
src/script
tools/shared
tools/linguist/shared
translations"
qt4-build_pkg_setup
QT4_EXTRACT_DIRECTORIES="${QT4_TARGET_DIRECTORIES}
${QT4_EXTRACT_DIRECTORIES}"
}
src_prepare() {
# Don't pre-strip, bug 235026
for i in kr jp cn tw ; do
echo "CONFIG+=nostrip" >> "${S}"/src/plugins/codecs/${i}/${i}.pro
done
qt4-build_src_prepare
# bug 172219
sed -i -e "s:CXXFLAGS.*=:CXXFLAGS=${CXXFLAGS} :" \
"${S}/qmake/Makefile.unix" || die "sed qmake/Makefile.unix CXXFLAGS failed"
sed -i -e "s:LFLAGS.*=:LFLAGS=${LDFLAGS} :" \
"${S}/qmake/Makefile.unix" || die "sed qmake/Makefile.unix LDFLAGS failed"
}
src_configure() {
unset QMAKESPEC
myconf="${myconf}
$(qt_use glib)
$(qt_use iconv)
$(qt_use optimized-qmake)
$(qt_use ssl openssl)
$(qt_use qt3support)
$(qt_use jit javascript-jit)"
myconf="${myconf} -no-xkb -no-fontconfig -no-xrender -no-xrandr
-no-xfixes -no-xcursor -no-xinerama -no-xshape -no-sm -no-opengl
-no-nas-sound -no-dbus -no-cups -no-gif -no-libpng
-no-libmng -no-libjpeg -system-zlib -no-webkit -no-phonon -no-xmlpatterns
-no-freetype -no-libtiff -no-accessibility -no-fontconfig -no-opengl
-no-svg -no-gtkstyle -no-phonon-backend -no-script -no-scripttools
-no-cups -no-xsync -no-xinput -no-multimedia"
if [ "$ABI" = "x86" ] ; then
myconf="${myconf} -little-endian -host-little-endian -continue"
fi
qt4-build_src_configure
}
src_compile() {
# bug 259736
unset QMAKESPEC
qt4-build_src_compile
}
src_install() {
dobin "${S}"/bin/{qmake,moc,rcc,uic,lconvert,lrelease,lupdate} || die "dobin failed"
install_directories src/{corelib,xml,network,plugins/codecs}
emake INSTALL_ROOT="${D}" install_mkspecs || die "emake install_mkspecs failed"
#install private headers
if use private-headers; then
insinto "${QTHEADERDIR#${EPREFIX}}"/QtCore/private
find "${S}"/src/corelib -type f -name "*_p.h" -exec doins {} \;
fi
# use freshly built libraries
local DYLD_FPATH=
[[ -d "${S}"/lib/QtCore.framework ]] \
&& DYLD_FPATH=$(for x in "${S}/lib/"*.framework; do echo -n ":$x"; done)
DYLD_LIBRARY_PATH="${S}/lib${DYLD_FPATH}" \
LD_LIBRARY_PATH="${S}/lib" "${S}"/bin/lrelease translations/*.ts \
|| die "generating translations faied"
insinto ${QTTRANSDIR#${EPREFIX}}
doins translations/*.qm || die "doins translations failed"
setqtenv
fix_library_files
# List all the multilib libdirs
local libdirs=
for libdir in $(get_all_libdirs); do
libdirs+=:${EPREFIX}/usr/${libdir}/qt4
done
cat <<-EOF > "${T}/44qt4"
LDPATH="${libdirs:1}"
EOF
doenvd "${T}/44qt4"
dodir ${QTDATADIR#${EPREFIX}}/mkspecs/gentoo || die "dodir failed"
mv "${D}"/${QTDATADIR}/mkspecs/qconfig.pri "${D}${QTDATADIR}"/mkspecs/gentoo \
|| die "Failed to move qconfig.pri"
# Framework hacking
if use aqua && [[ ${CHOST#*-darwin} -ge 9 ]] ; then
#TODO do this better
sed -i -e '2a#include <QtCore/Gentoo/gentoo-qconfig.h>\n' \
"${D}${QTLIBDIR}"/QtCore.framework/Headers/qconfig.h \
|| die "sed for qconfig.h failed."
dosym "${QTHEADERDIR#${EPREFIX}}"/Gentoo "${QTLIBDIR#${EPREFIX}}"/QtCore.framework/Headers/Gentoo ||
die "dosym failed"
else
sed -i -e '2a#include <Gentoo/gentoo-qconfig.h>\n' \
"${D}${QTHEADERDIR}"/QtCore/qconfig.h \
"${D}${QTHEADERDIR}"/Qt/qconfig.h \
|| die "sed for qconfig.h failed"
fi
if use glib; then
QCONFIG_DEFINE="$(use glib && echo QT_GLIB)
$(use ssl && echo QT_OPENSSL)"
install_qconfigs
fi
# remove .la files
find "${D}"${QTLIBDIR} -name "*.la" -print0 | xargs -0 rm
# remove some unnecessary headers
rm -f "${D}${QTHEADERDIR}"/{Qt,QtCore}/{\
qatomic_windows.h,\
qatomic_windowsce.h,\
qt_windows.h}
keepdir "${QTSYSCONFDIR#${EPREFIX}}"
# Framework magic
fix_includes
}