summaryrefslogtreecommitdiff
path: root/src/se/leap/leapclient/LeapSRPSession.java
AgeCommit message (Collapse)Author
2013-11-09bitmaskclient instead of leapclient in package pathcyBerta
2013-10-03Fixed M2 and M1 constants values.Parménides GV
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".
2013-09-30Moved all constants from ConfigHelper.Parménides GV
They have been relocated to the corresponding classes.
2013-07-26Include GPLv3+ file and header for files in se.leap.leapclient packageSean Leonard
2013-06-20No binary library needed.Parménides GV
I've decided not to include any lib, but to copy the SRPParameters class to our codebase and Util.trim method to ConfigHelper.
2013-06-19First round of comments.Parménides GV
This resolves the first step from issue #2908. Next step: Put user message strings into an appropiate place.
2013-06-10Removed unused methods and variables.Parménides GV
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.
2013-06-08Clean up some unused and some formattingSean Leonard
2013-06-05Fixed passwords with \ character.Parménides GV
The substitution I was doing let me to pass my tests localhost, but was not valid for real use in Android emulator. This was so because JSONObject getString method understood \/ simply as /, while what I wanted was plain \/. This commit makes #2368
2013-06-04Fixed SRP strange characters bugs.Parménides GV
The problem was the encoding of the bytes when calculating the password hash. I supposed that it was UTF-8 (I already saw that encoding in the html code from leap_web), but not, it was ISO-8859-1 (trial/error).
2013-06-04Fixed 2 important bugs.Parménides GV
LeapSRPSession was doing bad SRP calculations when salt byte array started with a 0. Now I trimmed that array before using it. ProviderAPI was not timing out when a server didn't respond. Now, I use a timeout of 1 second to stop waiting for a response.
2013-05-29Fixed passwords with strange characters?Parménides GV
Using two test with values from my localhost leap_web deployment, I've achieved to login with passwords containing ! and $ without problems. This should fix bug #2348.
2013-05-13A bit more clean.Parménides GV
I've upper cased ConfigHelper constants. I've created a new method in ConfigHelper, to send requests to a server, that it's used when sending A and M1.
2013-04-29Changed the message shown when checking if the password is valid or not.Parménides GV
Refactored LeapSRPSession so that there is no need to send A twice.
2013-04-29This commit contains:Parménides GV
- SRP algorithm improved (validate method uses trim, and some other trims have been added). - Refactored calculatePasswordHash, so that it receives a String instead of a char array, and now it is capable of escaping "\" correctly. - A 1000*2 successful logins, with a new test that performs 1000 trials for 2 different username/password/server trios. Next step: think about how the user is going to trigger the log in fragment.
2013-04-29Made SRP working with ProviderAPI methods more frequently than not in ↵Parménides GV
localhost, but I cannot succeed in api.bitmask.net with my personal account. Next step: add tests from api.bitmask.net.
2013-04-11Made LeapSRPSession more beautiful, put javadoc and commented lines ofParménides GV
strings used to check everything's fine manually.
2013-04-10Some more trims added. It passes a lot of tests from the test projectParménides GV
(not included here, still to decide if push it publicly). Next steps: make code beautiful, Android GUI SRP and real communication server, and add even more tests (in my spare time, just to check with more users).
2013-04-10LeapSRPSession response() method is working for the three differentParménides GV
tests I've written for it. Next step: verify()
2013-04-09Response should be correct, as far as different calculationsParménides GV
individually are. But in reality it's not. Tried to fix final hash putting a trim in every byte array, but it did not work. Next step: check the final hash, looking for padding issues.
2013-04-08Done constructor of LeapSRPSession: it's OK.Parménides GV
Next step: fix response() calculations.
2013-04-08Xor method fixed. I use BigInteger Java one.Parménides GV
Next step: understand why SHA-256 digest from NG_1024 is not equals to the one leap_web is calculating.
2013-04-03Fixed bug #2146 => A calculation is now fine. Next step: fix M1Parménides GV
calculation, since right now (using tests) response() method is not doing OK. Added new SRPSession modifying response() method from JBoss SRP implementation. Added hosts-for-android-emulator. Use with the following commands to be able to test on api.lvh.me: adb shell mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system adb push ~/workspace/leap_android/hosts-for-android-emulator /system/etc/hosts