Mercurial > trustbridge
comparison ui/tests/downloadertest.cpp @ 999:daa9448b64f5
(issue90) Use certificate pinning and forced ciphersuites for curl
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Mon, 01 Sep 2014 19:49:54 +0200 |
parents | 8fb1b912fd8e |
children | fe2c6666b462 |
comparison
equal
deleted
inserted
replaced
998:0570b1e562c2 | 999:daa9448b64f5 |
---|---|
146 | 146 |
147 int error = arguments.at(1).toInt(); | 147 int error = arguments.at(1).toInt(); |
148 | 148 |
149 QVERIFY(error == SSLConnection::NoConnection); | 149 QVERIFY(error == SSLConnection::NoConnection); |
150 } | 150 } |
151 static int accept_ciphers[] = { | |
152 TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, | |
153 TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, | |
154 TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384, | |
155 0 | |
156 }; | |
151 | 157 |
152 void DownloaderTest::testForcedCiphers() | 158 void DownloaderTest::testForcedCiphers() |
153 { | 159 { |
154 Downloader* downloader = new Downloader(this, | 160 Downloader* downloader = new Downloader(this, |
155 QString::fromLatin1("https://files.intevation.de:443"), | 161 QString::fromLatin1(SERVER_URL), |
156 QByteArray(), /* Use default testing certificate */ | 162 QByteArray(), /* Use default testing certificate */ |
157 QDateTime::currentDateTime(), | 163 QDateTime::currentDateTime(), |
158 QDateTime::fromString("2010", "YYYY"), | 164 QDateTime::fromString("2010", "YYYY"), |
159 "/users/aheinecke/development/TrustBridge-development.exe", | 165 "/users/aheinecke/development/TrustBridge-development.exe", |
160 "/users/aheinecke/development/zertifikatsliste.txt"); | 166 "/users/aheinecke/development/zertifikatsliste.txt"); |
161 int accept_ciphers[] = { | |
162 TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, | |
163 TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, | |
164 TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384, | |
165 0 | |
166 }; | |
167 | 167 |
168 downloader->setCiphersuites(accept_ciphers); | 168 downloader->setCiphersuites(accept_ciphers); |
169 | 169 |
170 SETUP_SPY | 170 SETUP_SPY |
171 | 171 |