comparison ui/sslconnection.cpp @ 990:2949f1842955

(issue90) Add possibility to force cipher suites in bare connection and test for this
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 01 Sep 2014 12:04:11 +0200
parents
children 78798d3af8f0
comparison
equal deleted inserted replaced
989:1cd1bfe82fc2 990:2949f1842955
1 /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik
2 * Software engineering by Intevation GmbH
3 *
4 * This file is Free Software under the GNU GPL (v>=2)
5 * and comes with ABSOLUTELY NO WARRANTY!
6 * See LICENSE.txt for details.
7 */
8
9 /**@file base implemetation of sslconnection. */
10
11 #include "sslconnection.h"
12
13 #include <QFile>
14
15 SSLConnection::SSLConnection(const QString& url,
16 const QByteArray& certificate) :
17 mUrl(url),
18 mPinnedCert(certificate),
19 mInitialized(false),
20 mConnected(false),
21 mNeedsReset(false),
22 mServerFD(-1),
23 mErrorState(NoError)
24 {
25 if (certificate.isEmpty()) {
26 #ifdef RELEASE_BUILD
27 /* TODO Change certificate here in case of release build */
28 QFile certResource(":certs/intevation.de");
29 #else
30 QFile certResource(":certs/intevation.de");
31 #endif
32 certResource.open(QFile::ReadOnly);
33 mPinnedCert = certResource.readAll();
34 certResource.close();
35 }
36 }
37
38 void SSLConnection::setProxy(const QUrl &proxyUrl)
39 {
40 Q_UNUSED(proxyUrl);
41 qWarning() << "Set proxy not supported";
42 }

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