From 230ae10fb3a0c08cbd16e91fce041133bdf5ae8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Mon, 5 May 2014 16:06:53 +0200 Subject: 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. --- app/src/debug/java/se/leap/bitmaskclient/ProviderAPI.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'app/src/debug/java/se/leap') 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(); -- cgit v1.2.3