diff --git a/src/gui/sslbutton.cpp b/src/gui/sslbutton.cpp index 0ead75572..640b5dc21 100644 --- a/src/gui/sslbutton.cpp +++ b/src/gui/sslbutton.cpp @@ -208,6 +208,17 @@ void SslButton::slotUpdateMenu() { AccountPtr account = _accountState->account(); if (account->url().scheme() == QLatin1String("https")) { + QString sslVersion = account->sslConfiguration().sessionCipher().protocolString() + + ", " + account->sslConfiguration().sessionCipher().authenticationMethod() + + ", " + account->sslConfiguration().sessionCipher().keyExchangeMethod() + + ", " + account->sslConfiguration().sessionCipher().encryptionMethod(); + _menu->addAction(sslVersion)->setEnabled(false); + +#if QT_VERSION > QT_VERSION_CHECK(5, 2, 0) + if (account->sslConfiguration().sessionTicket().isEmpty()) { + _menu->addAction(tr("No support for SSL session tickets/identifiers"))->setEnabled(false); + } +#endif QList chain = account->sslConfiguration().peerCertificateChain(); diff --git a/src/libsync/networkjobs.cpp b/src/libsync/networkjobs.cpp index 34f2760db..ea516c4d4 100644 --- a/src/libsync/networkjobs.cpp +++ b/src/libsync/networkjobs.cpp @@ -361,6 +361,7 @@ void CheckServerJob::start() { setReply(getRequest(path())); setupConnections(reply()); + connect(reply(), SIGNAL(metaDataChanged()), this, SLOT(metaDataChangedSlot())); AbstractNetworkJob::start(); } @@ -390,10 +391,15 @@ bool CheckServerJob::installed(const QVariantMap &info) return info.value(QLatin1String("installed")).toBool(); } +void CheckServerJob::metaDataChangedSlot() +{ + // We used to have this in finished(), but because of a bug in Qt this did not always have the cipher etc. + account()->setSslConfiguration(reply()->sslConfiguration()); +} + + bool CheckServerJob::finished() { - account()->setSslConfiguration(reply()->sslConfiguration()); - #if QT_VERSION > QT_VERSION_CHECK(5, 2, 0) if (reply()->request().url().scheme() == QLatin1String("https") && reply()->sslConfiguration().sessionTicket().isEmpty() diff --git a/src/libsync/networkjobs.h b/src/libsync/networkjobs.h index eded97b8f..56acef781 100644 --- a/src/libsync/networkjobs.h +++ b/src/libsync/networkjobs.h @@ -166,6 +166,7 @@ signals: private slots: virtual bool finished() Q_DECL_OVERRIDE; virtual void slotTimeout() Q_DECL_OVERRIDE; + virtual void metaDataChangedSlot(); private: bool _subdirFallback;