summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@nokia.com>2010-08-10 12:15:02 (GMT)
committerMartin Smith <martin.smith@nokia.com>2010-08-10 12:15:02 (GMT)
commit44ebcef5b96c4c3478c7629836ed55e83493fd17 (patch)
tree8082fadbe1ac8afe76b914ecdaf44978a589a526 /src
parent2b42bac65ae90f94b04ff556e5033014d37d223d (diff)
parent846f1b44eea4bb34d080d055badb40a4a13d369e (diff)
downloadQt-44ebcef5b96c4c3478c7629836ed55e83493fd17.zip
Qt-44ebcef5b96c4c3478c7629836ed55e83493fd17.tar.gz
Qt-44ebcef5b96c4c3478c7629836ed55e83493fd17.tar.bz2
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'src')
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index b4d030c..bb6910a 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -1288,6 +1288,11 @@ bool QSslSocketBackendPrivate::isMatchingHostname(const QString &cn, const QStri
if (hostname.midRef(hostname.indexOf(QLatin1Char('.'))) != cn.midRef(firstCnDot))
return false;
+ // Check if the hostname is an IP address, if so then wildcards are not allowed
+ QHostAddress addr(hostname);
+ if (!addr.isNull())
+ return false;
+
// Ok, I guess this was a wildcard CN and the hostname matches.
return true;
}