AutoVerifyPeer refs #75

master
frekai 14 years ago
parent 82b3f4ac5d
commit 804e625e14
  1. 2
      swisssurfer/src/main.cxx

@ -225,6 +225,7 @@ int main(int argv, char** argc) try {
//............................................................................
QSslConfiguration sslConfig(QSslConfiguration::defaultConfiguration());
sslConfig.setProtocol(QSsl::AnyProtocol);
sslConfig.setPeerVerifyMode(QSslSocket::AutoVerifyPeer);
QList<QSslCertificate> certs(sslConfig.caCertificates());
certs.push_back(QSslCertificate(SWISSSIGN_EV_GOLD_CA_2009_G2));
certs.push_back(QSslCertificate(SWISSSIGN_GOLD_CA_G2));
@ -381,7 +382,6 @@ int main(int argv, char** argc) try {
.arg(QFileInfo(argc[0]).fileName()).toStdString()<<std::endl;
return 1;
}
sslConfig.setPeerVerifyMode(QSslSocket::VerifyPeer);
QSslConfiguration::setDefaultConfiguration(sslConfig);
assert(QSslConfiguration::defaultConfiguration().caCertificates().contains(SWISSSIGN_EV_GOLD_CA_2009_G2));
assert(QSslConfiguration::defaultConfiguration().caCertificates().contains(SWISSSIGN_GOLD_CA_G2));

Loading…
Cancel
Save