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
No related branches found
No related tags found
1 merge request!324Release 1.5.0RC1
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment