Fix deprecated API warning
authorShane Kearns <ext-shane.2.kearns@nokia.com>
Mon, 21 May 2012 14:19:50 +0000 (15:19 +0100)
committerQt by Nokia <qt-info@nokia.com>
Wed, 23 May 2012 12:18:34 +0000 (14:18 +0200)
Check for blacklisting in case the application has blacklisted
a cert before windows has (currently unlikely as the blacklist is
hardcoded in Qt)
Don't need to check for time validity because that's already checked
by the windows API.
Change-Id: I34da5c4a8a0f8851b9b7668fc421a93c360c8588
Reviewed-by: Richard J. Moore <rich@kde.org>
src/network/ssl/qsslsocket_openssl.cpp

index cb9bc52..3836858 100644 (file)
@@ -1331,7 +1331,7 @@ void QSslSocketBackendPrivate::fetchCaRootForCert(const QSslCertificate &cert)
 void QSslSocketBackendPrivate::_q_caRootLoaded(QSslCertificate cert, QSslCertificate trustedRoot)
 {
     Q_Q(QSslSocket);
-    if (trustedRoot.isValid()) {
+    if (!trustedRoot.isNull() && !trustedRoot.isBlacklisted()) {
         if (s_loadRootCertsOnDemand) {
             //Add the new root cert to default cert list for use by future sockets
             QSslSocket::addDefaultCaCertificate(trustedRoot);