summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2024-12-03 02:03:16 +0100
committercyberta <cyberta@riseup.net>2024-12-11 00:09:34 +0000
commit139d7ecb0d2532436c380fc12c0df164b35d0b4a (patch)
tree051fae0b2d5a72ab6096013a40560eb365593638
parent087f0093593650e647ced850ac8596c917e51e33 (diff)
validate ca certificate after fetching it from the API
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiManagerV5.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiManagerV5.java b/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiManagerV5.java
index d478c08e..404ded0a 100644
--- a/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiManagerV5.java
+++ b/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiManagerV5.java
@@ -210,6 +210,7 @@ public class ProviderApiManagerV5 extends ProviderApiManagerBase implements IPro
try {
String cert = bm.getOpenVPNCert();
currentDownload = loadCredentials(provider, cert);
+ currentDownload = validateCertificateForProvider(currentDownload, provider);
} catch (Exception e) {
return eventSender.setErrorResult(currentDownload, R.string.error_json_exception_user_message, null);
}
@@ -223,6 +224,7 @@ public class ProviderApiManagerV5 extends ProviderApiManagerBase implements IPro
try {
CredentialsParser.parseXml(credentials, provider);
} catch (XmlPullParserException | IOException e) {
+ e.printStackTrace();
return eventSender.setErrorResult(result, vpn_certificate_is_invalid, null);
}