diff options
author | Michael Weber <xmw@gentoo.org> | 2011-03-31 10:11:01 +0000 |
---|---|---|
committer | Michael Weber <xmw@gentoo.org> | 2011-03-31 10:11:01 +0000 |
commit | b320bdf1470cfe62740e961b28a767906949bb1f (patch) | |
tree | 689484226a27e5fd1705e8e38921d9278a51261b /x11-libs/qt-core | |
parent | sparc stable (bug 352805) (diff) | |
download | gentoo-2-b320bdf1470cfe62740e961b28a767906949bb1f.tar.gz gentoo-2-b320bdf1470cfe62740e961b28a767906949bb1f.tar.bz2 gentoo-2-b320bdf1470cfe62740e961b28a767906949bb1f.zip |
echangelog
(Portage version: 2.1.9.42/cvs/Linux x86_64)
Diffstat (limited to 'x11-libs/qt-core')
-rw-r--r-- | x11-libs/qt-core/ChangeLog | 6 | ||||
-rw-r--r-- | x11-libs/qt-core/files/blacklist_ssl.patch | 178 |
2 files changed, 94 insertions, 90 deletions
diff --git a/x11-libs/qt-core/ChangeLog b/x11-libs/qt-core/ChangeLog index bcd102b214c1..ae03ca330ccb 100644 --- a/x11-libs/qt-core/ChangeLog +++ b/x11-libs/qt-core/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for x11-libs/qt-core # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt-core/ChangeLog,v 1.119 2011/03/31 01:10:23 chiiph Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt-core/ChangeLog,v 1.120 2011/03/31 10:11:01 xmw Exp $ + + 31 Mar 2011; Michael Weber <xmw@gentoo.org> files/blacklist_ssl.patch: + Fix line breaks, thanks to all reporters on bug 361415 and tampakrap for + permission *qt-core-4.7.2-r1 (31 Mar 2011) *qt-core-4.6.3-r1 (31 Mar 2011) diff --git a/x11-libs/qt-core/files/blacklist_ssl.patch b/x11-libs/qt-core/files/blacklist_ssl.patch index bd2da5bb3dcf..abefeff8fc69 100644 --- a/x11-libs/qt-core/files/blacklist_ssl.patch +++ b/x11-libs/qt-core/files/blacklist_ssl.patch @@ -1,89 +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;
+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; |