diff ui/sslconnection_curl.cpp @ 942:c8be25c83ff6

Initialize the curl certificate with the default if it is empty.
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 26 Aug 2014 11:22:50 +0200
parents a55c6cf54365
children 879a634d0a40
line wrap: on
line diff
--- a/ui/sslconnection_curl.cpp	Mon Aug 25 12:56:15 2014 +0200
+++ b/ui/sslconnection_curl.cpp	Tue Aug 26 11:22:50 2014 +0200
@@ -16,6 +16,13 @@
     SSLConnection (url, certificate),
     mCurl (NULL)
 {
+    if (certificate.isEmpty()) {
+        QFile certResource(":certs/intevation.de");
+        certResource.open(QFile::ReadOnly);
+        mPinnedCert = certResource.readAll();
+        certResource.close();
+    }
+
     curl_global_init(CURL_GLOBAL_DEFAULT);
     mCurl = curl_easy_init();
 

http://wald.intevation.org/projects/trustbridge/