summaryrefslogtreecommitdiff
path: root/src/se/leap
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2013-06-10 18:43:50 +0200
committerParménides GV <parmegv@sdf.org>2013-06-10 18:43:50 +0200
commit265a66e66cffacbd2c99f99bebbcec3bf100a546 (patch)
tree250998c19486ce7cad8972710aaa6aa577bfb76e /src/se/leap
parentf6899be0bfbe834364dcc234aa05ed59176af108 (diff)
OpenVPN certificate is downloaded from API_BASE, using api_uri field
from provider.json. This fixes bug #2780
Diffstat (limited to 'src/se/leap')
-rw-r--r--src/se/leap/leapclient/ProviderAPI.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/se/leap/leapclient/ProviderAPI.java b/src/se/leap/leapclient/ProviderAPI.java
index cd19da04..a51c3a05 100644
--- a/src/se/leap/leapclient/ProviderAPI.java
+++ b/src/se/leap/leapclient/ProviderAPI.java
@@ -423,8 +423,8 @@ public class ProviderAPI extends IntentService {
String type_of_certificate = task.getString(ConfigHelper.TYPE_OF_CERTIFICATE);
try {
JSONObject provider_json = ConfigHelper.getJsonFromSharedPref(ConfigHelper.PROVIDER_KEY);
- URL provider_main_url = new URL(provider_json.getString(ConfigHelper.API_URL_KEY).replace("api.", ""));
- String new_cert_string_url = provider_main_url.getProtocol() + "://" + provider_main_url.getHost() + "/" + provider_json.getString(ConfigHelper.API_VERSION_KEY) + "/" + ConfigHelper.CERT_KEY;
+ URL provider_main_url = new URL(provider_json.getString(ConfigHelper.API_URL_KEY));
+ String new_cert_string_url = provider_main_url.toString() + "/" + provider_json.getString(ConfigHelper.API_VERSION_KEY) + "/" + ConfigHelper.CERT_KEY;
if(type_of_certificate.equalsIgnoreCase(ConfigHelper.AUTHED_CERTIFICATE)) {
HttpCookie session_id_cookie = new HttpCookie(task.getString(ConfigHelper.SESSION_ID_COOKIE_KEY), task.getString(ConfigHelper.SESSION_ID_KEY));