to test, ignore all ssl errors; refs #43

This commit is contained in:
Marc Wäckerlin
2011-05-17 08:11:54 +00:00
parent bf58795682
commit a3ba3e7185
7 changed files with 84 additions and 80 deletions

View File

@@ -123,14 +123,14 @@ class SmartCardAuth: public QObject {
for (std::list<std::string>::iterator cert(_cacerts.begin());
cert!=_cacerts.end(); ++cert) {
SSL_CTX_add_extra_chain_cert(ctx, openssl::X509(*cert).lowLevelCopy());
expectedSslErrors.push_back(QSslError(QSslError::SelfSignedCertificate,
expectedSslErrors.push_back(QSslError(QSslError::SelfSignedCertificateInChain,
QSslCertificate::fromData
(QByteArray(cert->data(),
cert->size()),
QSsl::Der).at(0)));
//qDebug()<<"Added:\n"<<QSslCertificate(QByteArray(cert->data(), cert->size()), QSsl::Der).toPem();
}
socket->ignoreSslErrors(expectedSslErrors);
//socket->ignoreSslErrors(expectedSslErrors);
SSL_CTX_set_client_cert_cb(ctx, &SmartCardAuth::clientCert);
}