Permalink
Browse files

Don't perform on-demand loading of root certificates on Linux

Description:
Qt is performing loading on-demand of root certificates on Linux, which causing SSL errors.

Issue:
http://code.google.com/p/phantomjs/issues/detail?id=882
  • Loading branch information...
1 parent 2d778f6 commit 63dd36205fc7c6193a60cb6862d3b62c074362a3 @Vitallium Vitallium committed Nov 23, 2012
Showing with 25 additions and 0 deletions.
  1. +5 −0 src/networkaccessmanager.cpp
  2. +20 −0 test/webpage-spec.js
@@ -90,6 +90,11 @@ NetworkAccessManager::NetworkAccessManager(QObject *parent, const Config *config
if (QSslSocket::supportsSsl()) {
m_sslConfiguration = QSslConfiguration::defaultConfiguration();
+#if QT_VERSION >= QT_VERSION_CHECK(4,8,0) && defined(Q_OS_LINUX)
+ // Don't perform on-demand loading of root certificates on Linux
+ QSslSocket::addDefaultCaCertificates(QSslSocket::systemCaCertificates());
+#endif
+
// set the SSL protocol to SSLv3 by the default
m_sslConfiguration.setProtocol(QSsl::SslV3);
View
@@ -941,6 +941,26 @@ describe("WebPage object", function() {
expect(message).toEqual("PASS");
});
});
+
+ it('should open url using secure connection', function() {
+ var page = require('webpage').create();
+ var url = 'https://en.wikipedia.org';
+
+ var handled = false;
+
+ runs(function() {
+ page.open(url, function(status) {
+ expect(status == 'success').toEqual(true);
+ handled = true;
+ });
+ });
+
+ waits(3000);
+
+ runs(function() {
+ expect(handled).toEqual(true);
+ });
+ });
});
describe("WebPage construction with options", function () {

0 comments on commit 63dd362

Please sign in to comment.