diff options
author | Parménides GV <parmegv@sdf.org> | 2014-05-05 16:06:53 +0200 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2014-05-05 16:06:53 +0200 |
commit | 230ae10fb3a0c08cbd16e91fce041133bdf5ae8e (patch) | |
tree | 37ab910d47817399301aed25374d5c9fd37cb22c /app/src/debug | |
parent | 3ab74308e7ba1fda02d3427ec795eac397707199 (diff) |
New menu option: signup.
There is some problem in the maths, because the server says it's ok but
login doesn't work from Android app nor from webapp.
Diffstat (limited to 'app/src/debug')
-rw-r--r-- | app/src/debug/java/se/leap/bitmaskclient/ProviderAPI.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/src/debug/java/se/leap/bitmaskclient/ProviderAPI.java b/app/src/debug/java/se/leap/bitmaskclient/ProviderAPI.java index f8895983..8678cc80 100644 --- a/app/src/debug/java/se/leap/bitmaskclient/ProviderAPI.java +++ b/app/src/debug/java/se/leap/bitmaskclient/ProviderAPI.java @@ -214,27 +214,32 @@ public class ProviderAPI extends IntentService { LeapSRPSession client = new LeapSRPSession(username, password, params); byte[] salted_password = client.calculateSaltedPassword(); /* Calculate password verifier */ - BigInteger password_verifier = client.calculateV(); + BigInteger password_verifier = client.calculateV(username, password, salted_password); /* Send to the server */ try { - sendNewUserDataToSRPServer(authentication_server, username, new BigInteger(salted_password).toString(), password_verifier.toString()); + JSONObject result = sendNewUserDataToSRPServer(authentication_server, username, new BigInteger(salted_password).toString(16), password_verifier.toString()); + Log.d(TAG, result.toString()); broadcast_progress(progress++); } catch (ClientProtocolException e) { // session_id_bundle.putBoolean(RESULT_KEY, false); // session_id_bundle.putString(getResources().getString(R.string.user_message), getResources().getString(R.string.error_client_http_user_message)); // session_id_bundle.putString(LogInDialog.USERNAME, username); + e.printStackTrace(); } catch (IOException e) { // session_id_bundle.putBoolean(RESULT_KEY, false); // session_id_bundle.putString(getResources().getString(R.string.user_message), getResources().getString(R.string.error_io_exception_user_message)); // session_id_bundle.putString(LogInDialog.USERNAME, username); + e.printStackTrace(); } catch (JSONException e) { // session_id_bundle.putBoolean(RESULT_KEY, false); // session_id_bundle.putString(getResources().getString(R.string.user_message), getResources().getString(R.string.error_json_exception_user_message)); // session_id_bundle.putString(LogInDialog.USERNAME, username); + e.printStackTrace(); } catch (NoSuchAlgorithmException e) { // session_id_bundle.putBoolean(RESULT_KEY, false); // session_id_bundle.putString(getResources().getString(R.string.user_message), getResources().getString(R.string.error_no_such_algorithm_exception_user_message)); // session_id_bundle.putString(LogInDialog.USERNAME, username); + e.printStackTrace(); } catch (KeyManagementException e) { // TODO Auto-generated catch block e.printStackTrace(); |