summaryrefslogtreecommitdiff
path: root/src/se
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2013-10-03 10:18:18 +0200
committerParménides GV <parmegv@sdf.org>2013-10-03 10:18:18 +0200
commit83f18ec709d71d843155a8df853b014e5a599c01 (patch)
tree07f7d05616c4c2d3a0425c96cc6ed8fc83f19d38 /src/se
parent97b517f386cdecefff806d79ad29355b60636e96 (diff)
Fixed M2 and M1 constants values.
Logging in, it was returning a "Bad response from server" due to the malinterpretation of the received JSON. It was looking for a field named "m2", but it was "M2".
Diffstat (limited to 'src/se')
-rw-r--r--src/se/leap/leapclient/LeapSRPSession.java4
-rw-r--r--src/se/leap/leapclient/ProviderAPI.java2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/se/leap/leapclient/LeapSRPSession.java b/src/se/leap/leapclient/LeapSRPSession.java
index fc30bd2b..5a78219b 100644
--- a/src/se/leap/leapclient/LeapSRPSession.java
+++ b/src/se/leap/leapclient/LeapSRPSession.java
@@ -36,8 +36,8 @@ import org.jboss.security.srp.SRPParameters;
public class LeapSRPSession {
final public static String SALT = "salt";
- final public static String M1 = "m1";
- final public static String M2 = "m2";
+ final public static String M1 = "M1";
+ final public static String M2 = "M2";
private SRPParameters params;
private String username;
diff --git a/src/se/leap/leapclient/ProviderAPI.java b/src/se/leap/leapclient/ProviderAPI.java
index 0935cd8d..e7d329f8 100644
--- a/src/se/leap/leapclient/ProviderAPI.java
+++ b/src/se/leap/leapclient/ProviderAPI.java
@@ -238,7 +238,7 @@ public class ProviderAPI extends IntentService {
byte[] Bbytes = new BigInteger(saltAndB.getString("B"), 16).toByteArray();
byte[] M1 = client.response(new BigInteger(salt, 16).toByteArray(), Bbytes);
JSONObject session_idAndM2 = sendM1ToSRPServer(authentication_server, username, M1);
- if(session_idAndM2.has("M2") && client.verify((byte[])session_idAndM2.get("M2"))) {
+ if(session_idAndM2.has(LeapSRPSession.M2) && client.verify((byte[])session_idAndM2.get(LeapSRPSession.M2))) {
session_id_bundle.putBoolean(RESULT_KEY, true);
} else {
session_id_bundle.putBoolean(RESULT_KEY, false);