From d07ff5a8022678c6fd960f4ae973edd971f718c2 Mon Sep 17 00:00:00 2001 From: Albert Vaca Date: Sun, 10 Jan 2016 08:46:52 -0800 Subject: [PATCH] SSHD gets confused if spongycastle is present. Changed to BouncyCastle. It sees it as bouncycastle, tries to load some clases by they classpath and fails. --- build.gradle | 5 ++--- src/org/kde/kdeconnect/Device.java | 6 +++--- .../Helpers/SecurityHelpers/SslHelper.java | 18 +++++++++--------- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/build.gradle b/build.gradle index 325bf552..12e3a663 100644 --- a/build.gradle +++ b/build.gradle @@ -61,9 +61,8 @@ dependencies { compile 'com.android.support:design:23.1.1' compile 'org.apache.sshd:sshd-core:0.8.0' - compile 'com.madgag.spongycastle:pkix:1.54.0.0' - //compile 'org.bouncycastle:bcpkix-jdk15on:1.54' - //compile 'org.bouncycastle:bcprov-jdk15on:1.54' + //compile 'com.madgag.spongycastle:pkix:1.54.0.0' + compile 'org.bouncycastle:bcpkix-jdk15on:1.54' compile 'io.netty:netty-handler:4.0.33.Final' // Update to 4.1 when released, for compat with Android 5.0 diff --git a/src/org/kde/kdeconnect/Device.java b/src/org/kde/kdeconnect/Device.java index 44240fb9..7b207ae1 100644 --- a/src/org/kde/kdeconnect/Device.java +++ b/src/org/kde/kdeconnect/Device.java @@ -41,9 +41,9 @@ import org.kde.kdeconnect.Plugins.Plugin; import org.kde.kdeconnect.Plugins.PluginFactory; import org.kde.kdeconnect.UserInterface.MaterialActivity; import org.kde.kdeconnect_tp.R; -import org.spongycastle.cert.X509CertificateHolder; -import org.spongycastle.cert.jcajce.JcaX509CertificateConverter; -import org.spongycastle.jce.provider.BouncyCastleProvider; +import org.bouncycastle.cert.X509CertificateHolder; +import org.bouncycastle.cert.jcajce.JcaX509CertificateConverter; +import org.bouncycastle.jce.provider.BouncyCastleProvider; import java.security.KeyFactory; import java.security.PrivateKey; diff --git a/src/org/kde/kdeconnect/Helpers/SecurityHelpers/SslHelper.java b/src/org/kde/kdeconnect/Helpers/SecurityHelpers/SslHelper.java index 351273ac..ac4777ee 100644 --- a/src/org/kde/kdeconnect/Helpers/SecurityHelpers/SslHelper.java +++ b/src/org/kde/kdeconnect/Helpers/SecurityHelpers/SslHelper.java @@ -28,15 +28,15 @@ import android.provider.Settings; import android.util.Base64; import android.util.Log; -import org.spongycastle.asn1.x500.X500NameBuilder; -import org.spongycastle.asn1.x500.style.BCStyle; -import org.spongycastle.cert.X509CertificateHolder; -import org.spongycastle.cert.X509v3CertificateBuilder; -import org.spongycastle.cert.jcajce.JcaX509CertificateConverter; -import org.spongycastle.cert.jcajce.JcaX509v3CertificateBuilder; -import org.spongycastle.jce.provider.BouncyCastleProvider; -import org.spongycastle.operator.ContentSigner; -import org.spongycastle.operator.jcajce.JcaContentSignerBuilder; +import org.bouncycastle.asn1.x500.X500NameBuilder; +import org.bouncycastle.asn1.x500.style.BCStyle; +import org.bouncycastle.cert.X509CertificateHolder; +import org.bouncycastle.cert.X509v3CertificateBuilder; +import org.bouncycastle.cert.jcajce.JcaX509CertificateConverter; +import org.bouncycastle.cert.jcajce.JcaX509v3CertificateBuilder; +import org.bouncycastle.jce.provider.BouncyCastleProvider; +import org.bouncycastle.operator.ContentSigner; +import org.bouncycastle.operator.jcajce.JcaContentSignerBuilder; import java.math.BigInteger; import java.security.KeyStore;