Skip to content
Snippets Groups Projects
Commit 139d7ecb authored by cyberta's avatar cyberta Committed by cyberta
Browse files

validate ca certificate after fetching it from the API

parent 087f0093
Branches
Tags
1 merge request!324Release 1.5.0RC1
...@@ -210,6 +210,7 @@ public class ProviderApiManagerV5 extends ProviderApiManagerBase implements IPro ...@@ -210,6 +210,7 @@ public class ProviderApiManagerV5 extends ProviderApiManagerBase implements IPro
try { try {
String cert = bm.getOpenVPNCert(); String cert = bm.getOpenVPNCert();
currentDownload = loadCredentials(provider, cert); currentDownload = loadCredentials(provider, cert);
currentDownload = validateCertificateForProvider(currentDownload, provider);
} catch (Exception e) { } catch (Exception e) {
return eventSender.setErrorResult(currentDownload, R.string.error_json_exception_user_message, null); return eventSender.setErrorResult(currentDownload, R.string.error_json_exception_user_message, null);
} }
...@@ -223,6 +224,7 @@ public class ProviderApiManagerV5 extends ProviderApiManagerBase implements IPro ...@@ -223,6 +224,7 @@ public class ProviderApiManagerV5 extends ProviderApiManagerBase implements IPro
try { try {
CredentialsParser.parseXml(credentials, provider); CredentialsParser.parseXml(credentials, provider);
} catch (XmlPullParserException | IOException e) { } catch (XmlPullParserException | IOException e) {
e.printStackTrace();
return eventSender.setErrorResult(result, vpn_certificate_is_invalid, null); return eventSender.setErrorResult(result, vpn_certificate_is_invalid, null);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment