summaryrefslogtreecommitdiffstats
path: root/src/network/ssl/qsslsocket_openssl.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-04-28 07:59:43 (GMT)
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-04-28 07:59:43 (GMT)
commit0d70b0a9faecf042fdb20e0056bdaaec289b851c (patch)
tree5ad6397fbab4dac6b37f740256aa585183e147c1 /src/network/ssl/qsslsocket_openssl.cpp
parentd45ec470519d1075ebf299b74cbb846a0c7d99af (diff)
parentce4996b624678f37b13fbb7db810cccd8970a889 (diff)
downloadQt-0d70b0a9faecf042fdb20e0056bdaaec289b851c.zip
Qt-0d70b0a9faecf042fdb20e0056bdaaec289b851c.tar.gz
Qt-0d70b0a9faecf042fdb20e0056bdaaec289b851c.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into 4.7
Conflicts: src/s60installs/eabi/QtGuiu.def
Diffstat (limited to 'src/network/ssl/qsslsocket_openssl.cpp')
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp7
1 files changed, 7 insertions, 0 deletions
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;