diff --git a/build.gradle b/build.gradle
index 0620253de9..6aebb72adf 100644
--- a/build.gradle
+++ b/build.gradle
@@ -311,7 +311,7 @@ dependencies {
implementation 'org.greenrobot:eventbus:3.2.0'
implementation 'com.googlecode.ez-vcard:ez-vcard:0.10.6'
implementation 'org.lukhnos:nnio:0.2'
- implementation 'com.madgag.spongycastle:pkix:1.54.0.0'
+ implementation 'org.bouncycastle:bcpkix-jdk15on:1.65'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.afollestad:sectioned-recyclerview:0.5.0'
implementation 'com.github.chrisbanes:PhotoView:2.3.0'
diff --git a/lint.xml b/lint.xml
index c9a2c3a6af..e8dd942dae 100644
--- a/lint.xml
+++ b/lint.xml
@@ -7,7 +7,7 @@
-
+
@@ -44,4 +44,8 @@
+
+
+
+
diff --git a/src/main/java/com/owncloud/android/utils/CsrHelper.java b/src/main/java/com/owncloud/android/utils/CsrHelper.java
index fc317ab000..59fc9de5ae 100644
--- a/src/main/java/com/owncloud/android/utils/CsrHelper.java
+++ b/src/main/java/com/owncloud/android/utils/CsrHelper.java
@@ -1,21 +1,21 @@
package com.owncloud.android.utils;
-import org.spongycastle.asn1.pkcs.PKCSObjectIdentifiers;
-import org.spongycastle.asn1.x500.X500Name;
-import org.spongycastle.asn1.x509.AlgorithmIdentifier;
-import org.spongycastle.asn1.x509.BasicConstraints;
-import org.spongycastle.asn1.x509.Extension;
-import org.spongycastle.asn1.x509.ExtensionsGenerator;
-import org.spongycastle.crypto.params.AsymmetricKeyParameter;
-import org.spongycastle.crypto.util.PrivateKeyFactory;
-import org.spongycastle.operator.ContentSigner;
-import org.spongycastle.operator.DefaultDigestAlgorithmIdentifierFinder;
-import org.spongycastle.operator.DefaultSignatureAlgorithmIdentifierFinder;
-import org.spongycastle.operator.OperatorCreationException;
-import org.spongycastle.operator.bc.BcRSAContentSignerBuilder;
-import org.spongycastle.pkcs.PKCS10CertificationRequest;
-import org.spongycastle.pkcs.PKCS10CertificationRequestBuilder;
-import org.spongycastle.pkcs.jcajce.JcaPKCS10CertificationRequestBuilder;
+import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
+import org.bouncycastle.asn1.x500.X500Name;
+import org.bouncycastle.asn1.x509.AlgorithmIdentifier;
+import org.bouncycastle.asn1.x509.BasicConstraints;
+import org.bouncycastle.asn1.x509.Extension;
+import org.bouncycastle.asn1.x509.ExtensionsGenerator;
+import org.bouncycastle.crypto.params.AsymmetricKeyParameter;
+import org.bouncycastle.crypto.util.PrivateKeyFactory;
+import org.bouncycastle.operator.ContentSigner;
+import org.bouncycastle.operator.DefaultDigestAlgorithmIdentifierFinder;
+import org.bouncycastle.operator.DefaultSignatureAlgorithmIdentifierFinder;
+import org.bouncycastle.operator.OperatorCreationException;
+import org.bouncycastle.operator.bc.BcRSAContentSignerBuilder;
+import org.bouncycastle.pkcs.PKCS10CertificationRequest;
+import org.bouncycastle.pkcs.PKCS10CertificationRequestBuilder;
+import org.bouncycastle.pkcs.jcajce.JcaPKCS10CertificationRequestBuilder;
import java.io.IOException;
import java.security.KeyPair;
@@ -25,7 +25,7 @@ import java.security.KeyPair;
* https://github.com/awslabs/aws-sdk-android-samples/blob/master/CreateIotCertWithCSR/src/com/amazonaws/demo/csrcert/CsrHelper.java
* accessed at 31.08.17
* Original parts are licensed under the Apache License, Version 2.0: http://aws.amazon.com/apache2.0
- * Own parts are licensed unter GPLv3+.
+ * Own parts are licensed under GPLv3+.
*/
public final class CsrHelper {
@@ -50,7 +50,7 @@ public final class CsrHelper {
return "-----BEGIN CERTIFICATE REQUEST-----\n" + android.util.Base64.encodeToString(derCSR,
android.util.Base64.NO_WRAP) + "\n-----END CERTIFICATE REQUEST-----";
}
-
+
/**
* Create the certificate signing request (CSR) from private and public keys
*
@@ -69,7 +69,7 @@ public final class CsrHelper {
ContentSigner signer = new BcRSAContentSignerBuilder(signatureAlgorithm, digestAlgorithm).build(privateKey);
PKCS10CertificationRequestBuilder csrBuilder = new JcaPKCS10CertificationRequestBuilder(new X500Name(principal),
- keyPair.getPublic());
+ keyPair.getPublic());
ExtensionsGenerator extensionsGenerator = new ExtensionsGenerator();
extensionsGenerator.addExtension(Extension.basicConstraints, true, new BasicConstraints(true));
csrBuilder.addAttribute(PKCSObjectIdentifiers.pkcs_9_at_extensionRequest, extensionsGenerator.generate());