Mercurial > trustbridge
comparison ui/sslconnection_bare.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 | 9bcd8ed36f4b |
children | 2efdf2faf4e5 |
comparison
equal
deleted
inserted
replaced
989:1cd1bfe82fc2 | 990:2949f1842955 |
---|---|
32 { | 32 { |
33 int ret = -1; | 33 int ret = -1; |
34 | 34 |
35 memset(&mSSL, 0, sizeof(ssl_context)); | 35 memset(&mSSL, 0, sizeof(ssl_context)); |
36 memset(&mSavedSession, 0, sizeof( ssl_session ) ); | 36 memset(&mSavedSession, 0, sizeof( ssl_session ) ); |
37 | |
38 if (certificate.isEmpty()) { | |
39 QFile certResource(":certs/intevation.de"); | |
40 certResource.open(QFile::ReadOnly); | |
41 mPinnedCert = certResource.readAll(); | |
42 certResource.close(); | |
43 } | |
44 | 37 |
45 ret = init(); | 38 ret = init(); |
46 if (ret == 0) { | 39 if (ret == 0) { |
47 mInitialized = true; | 40 mInitialized = true; |
48 } else { | 41 } else { |
473 } while (bytesRead < maxSize); | 466 } while (bytesRead < maxSize); |
474 | 467 |
475 return outputFile.commit(); | 468 return outputFile.commit(); |
476 } | 469 } |
477 | 470 |
471 void SSLConnectionBare::setCiphersuites(int ciphers[]) { | |
472 if (mInitialized) { | |
473 ssl_set_ciphersuites(&mSSL, ciphers); | |
474 } | |
475 } |