From d09ad45e112bf5ce5e50ab4bb0ed651dccdc8775 Mon Sep 17 00:00:00 2001 From: Albert Vaca Cintora Date: Thu, 26 Nov 2020 11:30:46 +0100 Subject: [PATCH] Add a verification key that's displayed when pairing The key is a sha256 of both devices' certificates. Both should generate the same key, so hey user can check they are pairing against the right device. Thanks Matthias Gerstner for reporting this. --- res/drawable/ic_key.xml | 10 +++++++ res/layout/activity_device.xml | 12 ++++++++ res/values/strings.xml | 3 +- src/org/kde/kdeconnect/Device.java | 5 ++-- .../Helpers/SecurityHelpers/SslHelper.java | 30 ++++++++++++++++++- .../UserInterface/DeviceFragment.java | 7 +++++ 6 files changed, 63 insertions(+), 4 deletions(-) create mode 100644 res/drawable/ic_key.xml diff --git a/res/drawable/ic_key.xml b/res/drawable/ic_key.xml new file mode 100644 index 00000000..2316df20 --- /dev/null +++ b/res/drawable/ic_key.xml @@ -0,0 +1,10 @@ + + + diff --git a/res/layout/activity_device.xml b/res/layout/activity_device.xml index 2e6debab..f9d6cf6a 100644 --- a/res/layout/activity_device.xml +++ b/res/layout/activity_device.xml @@ -30,6 +30,18 @@ android:text="@string/device_not_paired" android:textAppearance="?android:attr/textAppearanceMedium"/> + +