summaryrefslogtreecommitdiff
path: root/app/src/insecure
diff options
context:
space:
mode:
authorcyberta <cyberta@riseup.net>2019-07-12 07:50:59 -0700
committercyberta <cyberta@riseup.net>2019-07-12 07:50:59 -0700
commit144244cab15014d495985f396c618729209a8f8a (patch)
treef00ca9565e5e7c27f1019b637b82caee026fd049 /app/src/insecure
parent7ac4446d834786b0139cb8565b22279ed6955d42 (diff)
parentce69a6c81f69801c20ac9e05faa86f5d4db4ba44 (diff)
Merge branch 'UI_tweaks' into 'master'
Ui tweaks See merge request leap/bitmask_android!90
Diffstat (limited to 'app/src/insecure')
-rw-r--r--app/src/insecure/java/se/leap/bitmaskclient/ProviderApiManager.java10
1 files changed, 7 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 3325d82b..1190d382 100644
--- a/app/src/insecure/java/se/leap/bitmaskclient/ProviderApiManager.java
+++ b/app/src/insecure/java/se/leap/bitmaskclient/ProviderApiManager.java
@@ -62,6 +62,7 @@ import static se.leap.bitmaskclient.R.string.malformed_url;
import static se.leap.bitmaskclient.R.string.setup_error_text;
import static se.leap.bitmaskclient.R.string.warning_corrupted_provider_cert;
import static se.leap.bitmaskclient.R.string.warning_corrupted_provider_details;
+import static se.leap.bitmaskclient.utils.ConfigHelper.getProviderFormattedString;
/**
* Created by cyberta on 04.01.18.
@@ -281,7 +282,8 @@ public class ProviderApiManager extends ProviderApiManagerBase {
try {
// try to download with provider CA on certificate error
JSONObject responseErrorJson = new JSONObject(responseString);
- if (dangerOn && responseErrorJson.getString(ERRORS).equals(resources.getString(R.string.certificate_error))) {
+ if (dangerOn && responseErrorJson.getString(ERRORS).equals(
+ getProviderFormattedString(resources, R.string.certificate_error))) {
responseString = downloadWithoutCA(stringUrl);
}
} catch (JSONException e) {
@@ -309,7 +311,8 @@ public class ProviderApiManager extends ProviderApiManagerBase {
try {
// try to download with provider CA on certificate error
JSONObject responseErrorJson = new JSONObject(responseString);
- if (dangerOn && responseErrorJson.getString(ERRORS).equals(resources.getString(R.string.certificate_error))) {
+ if (dangerOn && responseErrorJson.getString(ERRORS).equals(
+ getProviderFormattedString(resources, R.string.certificate_error))) {
responseString = downloadWithCommercialCA(urlString, dangerOn);
}
} catch (JSONException e) {
@@ -344,7 +347,8 @@ public class ProviderApiManager extends ProviderApiManagerBase {
try {
// danger danger: try to download without CA on certificate error
JSONObject responseErrorJson = new JSONObject(responseString);
- if (dangerOn && responseErrorJson.getString(ERRORS).equals(resources.getString(R.string.certificate_error))) {
+ if (dangerOn && responseErrorJson.getString(ERRORS).equals(
+ getProviderFormattedString(resources, R.string.certificate_error))) {
responseString = downloadWithoutCA(urlString);
}
} catch (JSONException e) {