Mercurial > trustbridge
comparison ui/sslconnection_curl.cpp @ 1156:e986d3d4705f
(issue36) Use local8bit for pinned certificate file names.
Curl and Polarssl expect it that way
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Thu, 18 Sep 2014 12:56:31 +0200 |
parents | 508c96e72f62 |
children | 0eb723242536 |
comparison
equal
deleted
inserted
replaced
1155:5f5880cca5cf | 1156:e986d3d4705f |
---|---|
47 return; | 47 return; |
48 } | 48 } |
49 mCertFile.close(); | 49 mCertFile.close(); |
50 | 50 |
51 if (curl_easy_setopt(mCurl, CURLOPT_CAINFO, | 51 if (curl_easy_setopt(mCurl, CURLOPT_CAINFO, |
52 mCertFile.fileName().toUtf8().constData()) != CURLE_OK) { | 52 mCertFile.fileName().toLocal8Bit().constData()) != CURLE_OK) { |
53 qDebug() << "Failed to set ca certificate"; | 53 qDebug() << "Failed to set ca certificate"; |
54 return; | 54 return; |
55 } | 55 } |
56 | 56 |
57 /* If the build fails here maybe you probably forgot to apply the | 57 /* If the build fails here maybe you probably forgot to apply the |
58 * trustbridge patches to curl */ | 58 * trustbridge patches to curl */ |
59 if (curl_easy_setopt(mCurl, CURLOPT_PEERCERT, | 59 if (curl_easy_setopt(mCurl, CURLOPT_PEERCERT, |
60 mCertFile.fileName().toUtf8().constData()) != CURLE_OK) { | 60 mCertFile.fileName().toLocal8Bit().constData()) != CURLE_OK) { |
61 qDebug() << "Failed set peer certificate."; | 61 qDebug() << "Failed set peer certificate."; |
62 return; | 62 return; |
63 } | 63 } |
64 mInitialized = true; | 64 mInitialized = true; |
65 if (g_debug) { | 65 if (g_debug) { |