[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:24:46 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=44abc07
The following commit has been merged in the master branch:
commit 44abc077456c18d3b48ed78b85163d7587e505f0
Author: Marcin Ziemiński <zieminn at gmail.com>
Date: Sat Aug 9 15:27:22 2014 +0200
Updated channel-adapter with methods and signals for peer authentication.
---
lib/channel-adapter.cpp | 23 +++++++
lib/channel-adapter.h | 14 +++++
lib/otr-channel-proxy.cpp | 6 ++
lib/otr-channel-proxy.h | 155 +++++++++++++++++++++++++++++++++++++++++++++-
4 files changed, 197 insertions(+), 1 deletion(-)
diff --git a/lib/channel-adapter.cpp b/lib/channel-adapter.cpp
index 502284d..23b9ea6 100644
--- a/lib/channel-adapter.cpp
+++ b/lib/channel-adapter.cpp
@@ -193,6 +193,20 @@ void ChannelAdapter::setupOTRChannel()
SLOT(onMessageSent(const Tp::MessagePartList&, uint, const QString&)));
connect(d->otrProxy.data(), SIGNAL(TrustLevelChanged(uint)), SLOT(onTrustLevelChanged(uint)));
+ // smp protocol
+ connect(d->otrProxy.data(), SIGNAL(PeerAuthenticationRequested(const QString&)),
+ SLOT(onPeerAuthenticationRequested(const QString&)));
+ connect(d->otrProxy.data(), SIGNAL(PeerAuthenticationConcluded(bool)),
+ SIGNAL(peerAuthenticationConcluded(bool)));
+ connect(d->otrProxy.data(), SIGNAL(PeerAuthenticationInProgress()),
+ SIGNAL(peerAuthenticationInProgress()));
+ connect(d->otrProxy.data(), SIGNAL(PeerAuthenticationAborted()),
+ SIGNAL(peerAuthenticationAborted()));
+ connect(d->otrProxy.data(), SIGNAL(PeerAuthenticationError()),
+ SIGNAL(peerAuthenticationError()));
+ connect(d->otrProxy.data(), SIGNAL(PeerAuthenticationCheated()),
+ SIGNAL(peerAuthenticationCheated()));
+
// initialize message queue;
connect(d->otrProxy->requestPropertyPendingMessages(), SIGNAL(finished(Tp::PendingOperation*)),
SLOT(onPendingMessagesPropertyGet(Tp::PendingOperation*)));
@@ -430,3 +444,12 @@ void ChannelAdapter::onTrustLevelChanged(uint trustLevel)
Q_EMIT otrTrustLevelChanged(d->trustLevel, oldLevel);
}
+
+void ChannelAdapter::onPeerAuthenticationRequested(const QString &question)
+{
+ if(question.isEmpty()) {
+ Q_EMIT peerAuthenticationRequestedSS();
+ } else {
+ Q_EMIT peerAuthenticationRequestedQA(question);
+ }
+}
diff --git a/lib/channel-adapter.h b/lib/channel-adapter.h
index 89d2fda..6d2e70e 100644
--- a/lib/channel-adapter.h
+++ b/lib/channel-adapter.h
@@ -50,6 +50,12 @@ class ChannelAdapter : public QObject
void initializeOTR();
void stopOTR();
+ /** question answer peer authentication */
+ void startPeerAuthenticationQA(const QString &secret);
+ /** shared secret peer authentication*/
+ void startPeerAuthenticationSS(const QString &question, const QString &answer);
+ void respondPeerAuthentication(const QString &secret);
+ void abortPeerAuthentication();
void acknowledge(const QList<Tp::ReceivedMessage> &messages);
void send(const QString& text,
@@ -77,6 +83,7 @@ class ChannelAdapter : public QObject
void onPendingMessagesRemoved(const Tp::UIntList &messageIDs);
void onMessageSent(const Tp::MessagePartList &content, uint flags, const QString &messageToken);
void onTrustLevelChanged(uint trustLevel);
+ void onPeerAuthenticationRequested(const QString &question);
Q_SIGNALS:
void messageSent(const Tp::Message &message,
@@ -87,6 +94,13 @@ class ChannelAdapter : public QObject
void otrTrustLevelChanged(Tp::OTRTrustLevel newStatus, Tp::OTRTrustLevel oldStatus);
void sessionRefreshed();
+ void peerAuthenticationRequestedQA(const QString &question);
+ void peerAuthenticationRequestedSS();
+ void peerAuthenticationConcluded(bool authenticated);
+ void peerAuthenticationInProgress();
+ void peerAuthenticationAborted();
+ void peerAuthenticationError();
+ void peerAuthenticationCheated();
private:
struct Private;
diff --git a/lib/otr-channel-proxy.cpp b/lib/otr-channel-proxy.cpp
index 7f96223..893ea76 100644
--- a/lib/otr-channel-proxy.cpp
+++ b/lib/otr-channel-proxy.cpp
@@ -37,6 +37,12 @@ void ChannelProxyInterfaceOTRInterface::invalidate(Tp::DBusProxy *proxy,
disconnect(this, SIGNAL(MessageSent(const Tp::MessagePartList&, uint, const QString&)), NULL, NULL);
disconnect(this, SIGNAL(MessageReceived(const Tp::MessagePartList&)), NULL, NULL);
disconnect(this, SIGNAL(PendingMessagesRemoved(const Tp::UIntList&)), NULL, NULL);
+ disconnect(this, SIGNAL(PeerAuthenticationRequested(const QString&)), NULL, NULL);
+ disconnect(this, SIGNAL(PeerAuthenticationConcluded(bool)), NULL, NULL);
+ disconnect(this, SIGNAL(PeerAuthenticationInProgress()), NULL, NULL);
+ disconnect(this, SIGNAL(PeerAuthenticationAborted()), NULL, NULL);
+ disconnect(this, SIGNAL(PeerAuthenticationError()), NULL, NULL);
+ disconnect(this, SIGNAL(PeerAuthenticationCheated()), NULL, NULL);
disconnect(this, SIGNAL(SessionRefreshed()), NULL, NULL);
disconnect(this, SIGNAL(TrustLevelChanged(uint)), NULL, NULL);
diff --git a/lib/otr-channel-proxy.h b/lib/otr-channel-proxy.h
index df08d81..98ae4bb 100644
--- a/lib/otr-channel-proxy.h
+++ b/lib/otr-channel-proxy.h
@@ -207,7 +207,7 @@ public:
* \htmlonly
* <p>The current fingerprint of the remote contact. Should be displayed
* to the user to update its trust level. It is shown in human readable format i.e.
- * :e .</p>
+ * :e '12345678 12345678 12345678 12345678 12345678'.</p>
* \endhtmlonly
*
*
eturn A pending variant which will emit finished when the property has been
@@ -423,6 +423,104 @@ public Q_SLOTS:
return this->connection().asyncCall(callMessage, timeout);
}
+ /**
+ * Begins a call to the D-Bus method
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list