Mercurial > trustbridge
changeset 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 | e66e23d340b9 |
children | e43e6769269a c696a78368b3 |
files | ui/sslconnection_curl.cpp |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
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();