[Pkg-owncloud-commits] [owncloud-client] 451/498: SslButton: Improve reliability and usefulness #3534 #3536
Sandro Knauß
hefee-guest at moszumanska.debian.org
Tue Aug 11 14:49:17 UTC 2015
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 9a9cefbcc5e08f3251d75a9f1cfed4b83755d545
Author: Markus Goetz <markus at woboq.com>
Date: Wed Aug 5 12:58:04 2015 +0200
SslButton: Improve reliability and usefulness #3534 #3536
---
src/gui/sslbutton.cpp | 11 +++++++++++
src/libsync/networkjobs.cpp | 8 +++++++-
src/libsync/networkjobs.h | 1 +
3 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/src/gui/sslbutton.cpp b/src/gui/sslbutton.cpp
index 0ead755..640b5dc 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<QSslCertificate> chain = account->sslConfiguration().peerCertificateChain();
diff --git a/src/libsync/networkjobs.cpp b/src/libsync/networkjobs.cpp
index 34f2760..ea516c4 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();
}
-bool CheckServerJob::finished()
+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()
+{
#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 eded97b..56acef7 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;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list