mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-04-21 15:29:18 -04:00
remove unneeded bouncycastle dependencies
These calls to bouncycastle were just used because the library was there. Now with the upcoming 'basic' build flavor, there will be no need for bouncycastle. It is required for ZipSigner signing of swap indexes, and TLS support in the swap NanoHTTPD webserver.
This commit is contained in:
@@ -26,7 +26,6 @@ import android.content.pm.PackageManager;
|
||||
import android.content.pm.Signature;
|
||||
import org.acra.ACRA;
|
||||
import org.fdroid.fdroid.Utils;
|
||||
import org.bouncycastle.util.encoders.Hex;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
@@ -69,8 +68,8 @@ class ApkSignatureVerifier {
|
||||
}
|
||||
|
||||
Utils.debugLog(TAG, "Signature mismatch!");
|
||||
Utils.debugLog(TAG, "APK sig: " + Hex.toHexString(getApkSignature(apkFile)));
|
||||
Utils.debugLog(TAG, "F-Droid sig: " + Hex.toHexString(getFDroidSignature()));
|
||||
Utils.debugLog(TAG, "APK sig: " + Utils.toHexString(getApkSignature(apkFile)));
|
||||
Utils.debugLog(TAG, "F-Droid sig: " + Utils.toHexString(getFDroidSignature()));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,12 +4,12 @@ import android.annotation.TargetApi;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Base64;
|
||||
import info.guardianproject.netcipher.NetCipher;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.fdroid.fdroid.BuildConfig;
|
||||
import org.fdroid.fdroid.FDroidApp;
|
||||
import org.fdroid.fdroid.Utils;
|
||||
import org.bouncycastle.util.encoders.Base64;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.File;
|
||||
@@ -151,7 +151,8 @@ public class HttpDownloader extends Downloader {
|
||||
if (username != null && password != null) {
|
||||
// add authorization header from username / password if set
|
||||
String authString = username + ":" + password;
|
||||
connection.setRequestProperty("Authorization", "Basic " + Base64.toBase64String(authString.getBytes()));
|
||||
connection.setRequestProperty("Authorization", "Basic "
|
||||
+ Base64.encodeToString(authString.getBytes(), Base64.NO_WRAP));
|
||||
}
|
||||
return connection;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user