[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498
Maximiliano Curia
maxy at moszumanska.debian.org
Fri Oct 14 14:29:36 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=78d4ba2
The following commit has been merged in the master branch:
commit 78d4ba21064cbb4056cf28fa3bd08f7ce0cb35cb
Author: Albert Vaca <albertvaka at gmail.com>
Date: Tue Mar 8 07:29:34 2016 -0800
Cleanup
---
core/backends/lan/lanlinkprovider.cpp | 8 +++-----
core/kdeconnectconfig.cpp | 12 ++++++------
2 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/core/backends/lan/lanlinkprovider.cpp b/core/backends/lan/lanlinkprovider.cpp
index 96fa29f..128a90b 100644
--- a/core/backends/lan/lanlinkprovider.cpp
+++ b/core/backends/lan/lanlinkprovider.cpp
@@ -213,9 +213,8 @@ void LanLinkProvider::connected()
// if ssl supported
if (receivedPackage->get<int>("protocolVersion") >= NetworkPackage::ProtocolVersion) {
// since I support ssl and remote device support ssl
- qCDebug(KDECONNECT_CORE) << "Setting up ssl server";
- socket->setPeerVerifyName(receivedPackage->get<QString>("deviceId"));
+ socket->setPeerVerifyName(deviceId);
QString certString = KdeConnectConfig::instance()->getDeviceProperty(deviceId, "certificate", QString());
if (!certString.isEmpty()) {
@@ -229,7 +228,7 @@ void LanLinkProvider::connected()
socket->setPeerVerifyMode(QSslSocket::QueryPeer);
connect(socket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(sslErrorsLogButIgnore(QList<QSslError>)));
}
- qCDebug(KDECONNECT_CORE) << "Starting server ssl";
+ qCDebug(KDECONNECT_CORE) << "Starting server ssl (I'm the client TCP socket)";
connect(socket, SIGNAL(encrypted()), this, SLOT(encrypted()));
socket->startServerEncryption();
@@ -360,7 +359,6 @@ void LanLinkProvider::dataReceived()
if (NetworkPackage::ProtocolVersion <= np->get<int>("protocolVersion")) {
// since I support ssl and remote device support ssl
- qCDebug(KDECONNECT_CORE) << "Setting up ssl client";
bool isDeviceTrusted = KdeConnectConfig::instance()->trustedDevices().contains(deviceId);
@@ -378,7 +376,7 @@ void LanLinkProvider::dataReceived()
socket->setPeerVerifyMode(QSslSocket::QueryPeer);
connect(socket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(sslErrorsLogButIgnore(QList<QSslError>)));
}
- qCDebug(KDECONNECT_CORE) << "Starting client ssl";
+ qCDebug(KDECONNECT_CORE) << "Starting client ssl (but I'm the server TCP socket)";
connect(socket, SIGNAL(encrypted()), this, SLOT(encrypted()));
socket->startClientEncryption();
diff --git a/core/kdeconnectconfig.cpp b/core/kdeconnectconfig.cpp
index e6ff902..d109308 100644
--- a/core/kdeconnectconfig.cpp
+++ b/core/kdeconnectconfig.cpp
@@ -118,21 +118,21 @@ KdeConnectConfig::KdeConnectConfig()
} else {
+ // FIXME: We only use QCA here to generate the cert and key, would be nice to get rid of it completely.
+ // The same thing we are doing with QCA could be done invoking openssl (altought it's potentially less portable):
+ // openssl req -new -x509 -sha256 -newkey rsa:2048 -nodes -keyout privateKey.pem -days 3650 -out certificate.pem -subj "/O=KDE/OU=KDE Connect/CN=_e6e29ad4_2b31_4b6d_8f7a_9872dbaa9095_"
+
QCA::CertificateOptions certificateOptions = QCA::CertificateOptions();
- // FIXME : Set serial number for certificate. Time millis or any constant number?
- QCA::BigInteger bigInteger(10);
QDateTime startTime = QDateTime::currentDateTime().addYears(-1);
QDateTime endTime = startTime.addYears(10);
QCA::CertificateInfo certificateInfo;
certificateInfo.insert(QCA::CommonName,deviceId());
certificateInfo.insert(QCA::Organization,"KDE");
certificateInfo.insert(QCA::OrganizationalUnit,"Kde connect");
- certificateOptions.setFormat(QCA::PKCS10);
-
- certificateOptions.setSerialNumber(bigInteger);
certificateOptions.setInfo(certificateInfo);
- certificateOptions.setValidityPeriod(startTime, endTime);
certificateOptions.setFormat(QCA::PKCS10);
+ certificateOptions.setSerialNumber(QCA::BigInteger(10));
+ certificateOptions.setValidityPeriod(startTime, endTime);
d->certificate = QSslCertificate(QCA::Certificate(certificateOptions, d->privateKey).toPEM().toLatin1());
--
kdeconnect packaging
More information about the pkg-kde-commits
mailing list