summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2013-06-10 18:56:34 +0200
committerParménides GV <parmegv@sdf.org>2013-06-10 18:59:20 +0200
commit1e2470b1e940877f6fe247a65bccd2b62b621eb6 (patch)
tree87797f93529df1e2e04a5ecf924ada9abdb3b729
parent265a66e66cffacbd2c99f99bebbcec3bf100a546 (diff)
Removed unused methods and variables.
Variables from LeapSRPSession were there because I used it while testing srp calculations, comparing that strings with the ones from javascript. Unused method from ProviderAPI was there because I foresee I'll have to implement it in the future, but I've removed it since it's already in the history. This fixes #2781.
l---------[-rw-r--r--]README66
-rw-r--r--src/se/leap/leapclient/LeapSRPSession.java6
-rw-r--r--src/se/leap/leapclient/ProviderAPI.java12
3 files changed, 1 insertions, 83 deletions
diff --git a/README b/README
index 7d57a6e3..c3ca0746 100644..120000
--- a/README
+++ b/README
@@ -1,65 +1 @@
-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.
+README.txt \ No newline at end of file
diff --git a/src/se/leap/leapclient/LeapSRPSession.java b/src/se/leap/leapclient/LeapSRPSession.java
index 8eb28c4d..0a8e735f 100644
--- a/src/se/leap/leapclient/LeapSRPSession.java
+++ b/src/se/leap/leapclient/LeapSRPSession.java
@@ -173,7 +173,6 @@ public class LeapSRPSession {
// Calculate x = H(s | H(U | ':' | password))
byte[] xb = calculatePasswordHash(username, password, Util.trim(salt_bytes));
this.x = new BigInteger(1, xb);
- String xstr = x.toString(16);
// Calculate v = kg^x mod N
String k_string = "bf66c44a428916cad64aa7c679f3fd897ad4c375e9bbb4cbf2f5de241d618ef0";
@@ -210,7 +209,6 @@ public class LeapSRPSession {
// Calculate S = (B - kg^x) ^ (a + u * x) % N
BigInteger S = calculateS(Bbytes);
byte[] S_bytes = Util.trim(S.toByteArray());
- String Sstr = S.toString(16);
// K = SessionHash(S)
String hash_algorithm = params.hashAlgorithm;
@@ -219,10 +217,8 @@ public class LeapSRPSession {
// clientHash = H(N) xor H(g) | H(U) | A | B | K
clientHash.update(K);
- String Kstr = new BigInteger(1, K).toString(16);
byte[] M1 = Util.trim(clientHash.digest());
- String M1str = new BigInteger(1, M1).toString(16);
// serverHash = Astr + M + K
serverHash.update(Abytes);
@@ -246,9 +242,7 @@ public class LeapSRPSession {
BigInteger u = new BigInteger(1, u_bytes);
BigInteger B_minus_v = B.subtract(v);
- String vstr = v.toString(16);
BigInteger a_ux = a.add(u.multiply(x));
- String xstr = x.toString(16);
BigInteger S = B_minus_v.modPow(a_ux, N);
return S;
}
diff --git a/src/se/leap/leapclient/ProviderAPI.java b/src/se/leap/leapclient/ProviderAPI.java
index a51c3a05..0898ebb8 100644
--- a/src/se/leap/leapclient/ProviderAPI.java
+++ b/src/se/leap/leapclient/ProviderAPI.java
@@ -125,18 +125,6 @@ public class ProviderAPI extends IntentService {
return false;
}
}
-
- private boolean registerWithSRP(Bundle task) {
- String username = (String) task.get(ConfigHelper.USERNAME_KEY);
- String password = (String) task.get(ConfigHelper.PASSWORD_KEY);
- String authentication_server = (String) task.get(ConfigHelper.API_URL_KEY);
-
- BigInteger ng_1024 = new BigInteger(ConfigHelper.NG_1024, 16);
- BigInteger salt = ng_1024.probablePrime(1024, null);
- byte[] salt_in_bytes = salt.toByteArray();
-
- return false;
- }
private Bundle authenticateBySRP(Bundle task) {
Bundle session_id_bundle = new Bundle();