diff options
author | cyberta <cyberta@riseup.net> | 2022-01-31 23:32:41 +0000 |
---|---|---|
committer | cyberta <cyberta@riseup.net> | 2022-01-31 23:32:41 +0000 |
commit | e631257d3f0e55bfb77e32d25a798bd3d0d3ff25 (patch) | |
tree | 41796be8a9b56f5a66ab803b8a98a10f9d43f6af /app/src | |
parent | 77908103f7d6d5bd6c8bd20c8e2ca0c9ac45da4d (diff) | |
parent | 30cedf1f95f4f430ddc378d963e8cd46c1bd0903 (diff) |
Merge branch 'update_tor-android-buildTools' into 'master'
Some cleanup
See merge request leap/bitmask_android!167
Diffstat (limited to 'app/src')
3 files changed, 8 insertions, 4 deletions
diff --git a/app/src/fatweb/java/se.leap.bitmaskclient/appUpdate/DownloadNotificationManager.java b/app/src/fatweb/java/se.leap.bitmaskclient/appUpdate/DownloadNotificationManager.java index 939ed852..e7e871fd 100644 --- a/app/src/fatweb/java/se.leap.bitmaskclient/appUpdate/DownloadNotificationManager.java +++ b/app/src/fatweb/java/se.leap.bitmaskclient/appUpdate/DownloadNotificationManager.java @@ -23,6 +23,7 @@ import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; +import android.graphics.Color; import android.os.Build; import androidx.annotation.NonNull; diff --git a/app/src/insecure/java/se/leap/bitmaskclient/providersetup/ProviderApiManager.java b/app/src/insecure/java/se/leap/bitmaskclient/providersetup/ProviderApiManager.java index dfb5346b..221871ef 100644 --- a/app/src/insecure/java/se/leap/bitmaskclient/providersetup/ProviderApiManager.java +++ b/app/src/insecure/java/se/leap/bitmaskclient/providersetup/ProviderApiManager.java @@ -69,6 +69,7 @@ import static se.leap.bitmaskclient.base.utils.ConfigHelper.getProviderFormatted import static se.leap.bitmaskclient.providersetup.ProviderAPI.ERRORS; import static se.leap.bitmaskclient.providersetup.ProviderSetupFailedDialog.DOWNLOAD_ERRORS.ERROR_CERTIFICATE_PINNING; import static se.leap.bitmaskclient.providersetup.ProviderSetupFailedDialog.DOWNLOAD_ERRORS.ERROR_CORRUPTED_PROVIDER_JSON; +import static se.leap.bitmaskclient.tor.TorStatusObservable.getProxyPort; /** * Created by cyberta on 04.01.18. @@ -325,7 +326,7 @@ public class ProviderApiManager extends ProviderApiManagerBase { String responseString; JSONObject errorJson = new JSONObject(); - OkHttpClient okHttpClient = clientGenerator.initCommercialCAHttpClient(errorJson); + OkHttpClient okHttpClient = clientGenerator.initCommercialCAHttpClient(errorJson, getProxyPort()); if (okHttpClient == null) { return errorJson.toString(); } @@ -360,7 +361,7 @@ public class ProviderApiManager extends ProviderApiManagerBase { private String downloadFromUrlWithProviderCA(String urlString, Provider provider, boolean dangerOn) { String responseString; JSONObject errorJson = new JSONObject(); - OkHttpClient okHttpClient = clientGenerator.initSelfSignedCAHttpClient(provider.getCaCert(), errorJson); + OkHttpClient okHttpClient = clientGenerator.initSelfSignedCAHttpClient(provider.getCaCert(), getProxyPort(), errorJson); if (okHttpClient == null) { return errorJson.toString(); } @@ -395,7 +396,7 @@ public class ProviderApiManager extends ProviderApiManagerBase { JSONObject initError = new JSONObject(); String responseString; - OkHttpClient okHttpClient = clientGenerator.initSelfSignedCAHttpClient(caCert, initError); + OkHttpClient okHttpClient = clientGenerator.initSelfSignedCAHttpClient(caCert, getProxyPort(), initError); if (okHttpClient == null) { return initError.toString(); } diff --git a/app/src/test/java/se/leap/bitmaskclient/eip/ProviderApiManagerTest.java b/app/src/test/java/se/leap/bitmaskclient/eip/ProviderApiManagerTest.java index 4b523edb..31d6ae89 100644 --- a/app/src/test/java/se/leap/bitmaskclient/eip/ProviderApiManagerTest.java +++ b/app/src/test/java/se/leap/bitmaskclient/eip/ProviderApiManagerTest.java @@ -439,7 +439,9 @@ public class ProviderApiManagerTest { @Test public void test_handleIntentSetupProvider_preseededCustomProviderAndCA_failedConfiguration() throws IOException, CertificateEncodingException, NoSuchAlgorithmException, JSONException { - + if ("insecure".equals(BuildConfig.FLAVOR_implementation )) { + return; + } Provider provider = getConfiguredProvider(); mockProviderApiConnector(ERROR_CASE_MICONFIGURED_PROVIDER); |