[PATCH] Initialize the curl certificate with the default if it is empty
Wald Commits
scm-commit at wald.intevation.org
Tue Aug 26 11:22:54 CEST 2014
# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1409044970 -7200
# Node ID c8be25c83ff6d644bee357a3b9c0f7418056dbc3
# Parent e66e23d340b9c26392151d4f0a8c381eb224835c
Initialize the curl certificate with the default if it is empty.
diff -r e66e23d340b9 -r c8be25c83ff6 ui/sslconnection_curl.cpp
--- 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();
More information about the Trustbridge-commits
mailing list