summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2020-03-17 11:39:52 +0100
committercyBerta <cyberta@riseup.net>2020-03-17 11:39:52 +0100
commitf9d15cd5c90a919135d3e0153a4059720275345e (patch)
tree59dcccd1b4bfa0bf57fcf86df787854dd367824a
parentd56686f1d5f5aa96d4c13c8bde48e6e4e9729e4f (diff)
fix insecure flavor
-rw-r--r--app/src/insecure/java/se/leap/bitmaskclient/ProviderApiManager.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/insecure/java/se/leap/bitmaskclient/ProviderApiManager.java b/app/src/insecure/java/se/leap/bitmaskclient/ProviderApiManager.java
index e86ab8ea..b67f6fa5 100644
--- a/app/src/insecure/java/se/leap/bitmaskclient/ProviderApiManager.java
+++ b/app/src/insecure/java/se/leap/bitmaskclient/ProviderApiManager.java
@@ -144,7 +144,7 @@ public class ProviderApiManager extends ProviderApiManagerBase {
if(providerDefinition.length() == 0 || caCert.isEmpty())
providerDotJsonString = downloadWithCommercialCA(providerMainUrl + "/provider.json", dangerOn);
else
- providerDotJsonString = downloadFromApiUrlWithProviderCA("/provider.json", caCert, providerDefinition, dangerOn);
+ providerDotJsonString = downloadFromApiUrlWithProviderCA("/provider.json", caCert, provider, dangerOn);
if (ConfigHelper.checkErroneousDownload(providerDotJsonString) || !isValidJson(providerDotJsonString)) {
setErrorResult(result, malformed_url, null);
@@ -291,10 +291,10 @@ public class ProviderApiManager extends ProviderApiManagerBase {
return responseString;
}
- private String downloadFromApiUrlWithProviderCA(String path, String caCert, JSONObject providerDefinition, boolean dangerOn) {
+ private String downloadFromApiUrlWithProviderCA(String path, String caCert, Provider provider, boolean dangerOn) {
String responseString;
JSONObject errorJson = new JSONObject();
- String baseUrl = getApiUrl(providerDefinition);
+ String baseUrl = provider.getApiUrlString();
OkHttpClient okHttpClient = clientGenerator.initSelfSignedCAHttpClient(caCert, errorJson);
if (okHttpClient == null) {
return errorJson.toString();