diff options
author | Parménides GV <parmegv@sdf.org> | 2013-06-10 18:43:50 +0200 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2013-06-10 18:43:50 +0200 |
commit | 265a66e66cffacbd2c99f99bebbcec3bf100a546 (patch) | |
tree | 250998c19486ce7cad8972710aaa6aa577bfb76e | |
parent | f6899be0bfbe834364dcc234aa05ed59176af108 (diff) |
OpenVPN certificate is downloaded from API_BASE, using api_uri field
from provider.json.
This fixes bug #2780
-rw-r--r--[l---------] | README | 66 | ||||
-rw-r--r-- | src/se/leap/leapclient/ProviderAPI.java | 4 |
2 files changed, 67 insertions, 3 deletions
@@ -1 +1,65 @@ -README.txt
\ No newline at end of file +Compiling +========= + +Preconditions +---------------- + +1. Android SDK installed (follow instructions from http://developer.android.com/sdk/index.html) +2. API version 16 or version installed. +2. Ant 1.6 or greater + +Instructions to compile +----------------------- + +1. cd $PROJECT_LOCATION/leap_android +2. ./compile.sh + +Postconditions +-------------- + +1. $PROJECT_LOCATION/leap_android/bin/LEAP Android-debug.apk exists + +Running on the emulator +========================= + +Preconditions +----------------- + +1. Android SDK is installed, and its tools are in the PATH. +2. leap_android has been compiled. +3. An avd exists in ~/.android/avd/ (if you do not have one, follow instructions from http://developer.android.com/tools/devices/managing-avds-cmdline.html) + +Instructions to run on the emulator +----------------------------------- + +1. cd $PROJECT_LOCATION/leap_android +1. Run script: ./run.sh @AVD-NAME . (avd names are the names of the files in ~/.android/avd with extension .avd). + +Postconditions +-------------- + +1. LEAP Android is running. + +Debugging from console +====================== + +Preconditions +----------------- + +1. Android SDK is installed, and its tools are in the PATH. +2. leap_android has been compiled. +3. An avd exists in ~/.android/avd/ (if you do not have one, follow instructions from http://developer.android.com/tools/devices/managing-avds-cmdline.html). +4. jdb is installed (this program is part of OpenJDK 7) + +Instructions to debug from the console +----------------------------------- + +1. cd $PROJECT_LOCATION/leap_android +2. Run script: ./debug.sh @AVD-NAME . (avd names are the names of the files in ~/.android/avd with extension .avd). + +Postconditions +-------------- + +1. LEAP Android is running. +2. LEAP Android does not show the message "Application LEAP for Android (process se.leap.leapclient) is waiting for the debugger to attach". +3. You are in a jdb debuggin session. 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)); |