summaryrefslogtreecommitdiffstats
path: root/src/network/ssl/qsslsocket_p.h
diff options
context:
space:
mode:
authorShane Kearns <ext-shane.2.kearns@nokia.com>2012-03-23 11:01:42 +0000
committerQt by Nokia <qt-info@nokia.com>2012-04-11 15:49:02 +0200
commit7386ab17df94e58efeb2f2fba91b9f816834c077 (patch)
tree7c74a96457f9d9ab36fa09b4a38f32602d54182d /src/network/ssl/qsslsocket_p.h
parent62cda62c0c70a75de3f87cbd802a1be24d27ef18 (diff)
Use windows API to update missing CA roots
Windows ships with a minimal set of CA roots. When using windows API to verify a certificate, it will fetch the root certificate from windows update (assuming it is part of the Microsoft trust program). As we are using openssl, this does not happen transparently. If SSL errors occur which indicate a broken chain then attempt to fix it using the windows API before emitting sslErrors. If the system CA certs are not in use (a CA bundle has been set on the socket or as the global configuration), then this is skipped. This is so an application can continue to use its own cert bundle rather than trusting the system certs. Key usage is specified, so that windows will return not trusted status if the root is not suitable for SSL (server auth or client auth OID). Testability: - to test, must delete the CA cert(s) from the "third party root certification authorities" section of the cert store using mmc.exe. - If the workaround of installing the windows XP cert bundle was performed, then you also need to delete certs from the "trusted root certification authorities" section. This is dangerous, be careful not to delete the required certificates which are documented on MS website - Naturally, modifying these areas of the cert store requires elevated privilege. Task-number: QTBUG-24827 Change-Id: I5cfe71c8a10595731f6bbbbabaaefa3313496654 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/network/ssl/qsslsocket_p.h')
-rw-r--r--src/network/ssl/qsslsocket_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/network/ssl/qsslsocket_p.h b/src/network/ssl/qsslsocket_p.h
index 44114481df..e5d1144c2c 100644
--- a/src/network/ssl/qsslsocket_p.h
+++ b/src/network/ssl/qsslsocket_p.h
@@ -160,6 +160,9 @@ public:
void _q_flushWriteBuffer();
void _q_flushReadBuffer();
void _q_resumeImplementation();
+#ifdef Q_OS_WIN
+ virtual void _q_caRootLoaded(QSslCertificate,QSslCertificate) = 0;
+#endif
// Platform specific functions
virtual void startClientEncryption() = 0;