summaryrefslogtreecommitdiffstats
path: root/src/network/ssl/qsslsocket_p.h
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2017-03-02 17:41:06 +0100
committerOlivier Goffart (Woboq GmbH) <ogoffart@woboq.com>2017-03-23 16:11:15 +0000
commitd82d2f67161ed12d94edcc79914ec74df4cd40d3 (patch)
tree6b247c9c54558f421997959be26b08a4a70c1e3b /src/network/ssl/qsslsocket_p.h
parent12a0e1b4f8c0e66b373b11b83956d1fa292c7ac4 (diff)
QSslSocket: fix connection to a international domain name
RFC6125 section 6.4.2 specify we need to convert the IDN to ascii before comparison. Note that we don't need to toLower anymore because toAce takes care of it. Section 7.2 recommands that we dod not attempt to check for wildcard character embedded within the A-labels or U-labels of an internationalized domain name. So we reject names that contiains a '*' but starts with 'xn--'. Change-Id: Ib0830520a1f82bbf9fd11818718277a479527ee3 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/network/ssl/qsslsocket_p.h')
-rw-r--r--src/network/ssl/qsslsocket_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/ssl/qsslsocket_p.h b/src/network/ssl/qsslsocket_p.h
index cec61d07c1..aec3437422 100644
--- a/src/network/ssl/qsslsocket_p.h
+++ b/src/network/ssl/qsslsocket_p.h
@@ -151,7 +151,8 @@ public:
QRegExp::PatternSyntax syntax);
static void addDefaultCaCertificate(const QSslCertificate &cert);
static void addDefaultCaCertificates(const QList<QSslCertificate> &certs);
- static bool isMatchingHostname(const QSslCertificate &cert, const QString &peerName);
+ Q_AUTOTEST_EXPORT static bool isMatchingHostname(const QSslCertificate &cert,
+ const QString &peerName);
Q_AUTOTEST_EXPORT static bool isMatchingHostname(const QString &cn, const QString &hostname);
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)