diff options
author | cyBerta <cyberta@riseup.net> | 2018-02-20 14:25:56 +0100 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2018-02-20 14:25:56 +0100 |
commit | 8256666a9981ac347e4a6e769e1981007c408b3a (patch) | |
tree | 899dea255868263e0f71f75b7cbdee3cb0b629c7 /app/src/insecure/java/se/leap/bitmaskclient | |
parent | 2bb5c64efda2cefcb2f9768f32be2b2936edadef (diff) |
#8853 fix failing vpn cert download callback for insecure flavor and use new provider method to build the api url
Diffstat (limited to 'app/src/insecure/java/se/leap/bitmaskclient')
-rw-r--r-- | app/src/insecure/java/se/leap/bitmaskclient/ProviderApiManager.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/app/src/insecure/java/se/leap/bitmaskclient/ProviderApiManager.java b/app/src/insecure/java/se/leap/bitmaskclient/ProviderApiManager.java index 42bd576a..24803564 100644 --- a/app/src/insecure/java/se/leap/bitmaskclient/ProviderApiManager.java +++ b/app/src/insecure/java/se/leap/bitmaskclient/ProviderApiManager.java @@ -206,9 +206,7 @@ public class ProviderApiManager extends ProviderApiManagerBase { protected Bundle updateVpnCertificate(Provider provider) { Bundle result = new Bundle(); try { - JSONObject providerJson = provider.getDefinition(); - String providerMainUrl = providerJson.getString(Provider.API_URL); - URL newCertStringUrl = new URL(providerMainUrl + "/" + providerJson.getString(Provider.API_VERSION) + "/" + PROVIDER_VPN_CERTIFICATE); + URL newCertStringUrl = new URL(provider.getApiUrlWithVersion() + "/" + PROVIDER_VPN_CERTIFICATE); String certString = downloadWithProviderCA(provider.getCaCert(), newCertStringUrl.toString(), lastDangerOn); if (ConfigHelper.checkErroneousDownload(certString)) { @@ -223,8 +221,7 @@ public class ProviderApiManager extends ProviderApiManagerBase { } } result = loadCertificate(provider, certString); - } catch (IOException | JSONException e) { - // TODO try to get Provider Json + } catch (IOException e) { setErrorResult(result, downloading_vpn_certificate_failed, null); e.printStackTrace(); } |