SSL: Use better test.

The other one was not working anyway.
This commit is contained in:
Daniel Molkentin 2013-01-22 12:52:42 +01:00
parent afe6caf406
commit e0332deffc

View file

@ -290,9 +290,10 @@ QUrl ownCloudInfo::redirectUrl(const QUrl& possibleRedirectUrl,
void ownCloudInfo::slotReplyFinished()
{
QNetworkReply *reply = qobject_cast<QNetworkReply *>(sender());
if (reply->header(QNetworkRequest::LocationHeader).toUrl().scheme() == QLatin1String("https"))
_certificateChain = reply->sslConfiguration().peerCertificateChain();
QSslConfiguration sslConfig = reply->sslConfiguration();
if (!sslConfig.isNull()) {
_certificateChain = sslConfig.peerCertificateChain();
}
if( ! reply ) {
qDebug() << "ownCloudInfo: Reply empty!";