summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2012-08-06 13:07:11 +0200
committerAzul <azul@leap.se>2012-08-06 13:08:43 +0200
commit56a95c99cdfd8d0cf501f92ea9156b20d2dc07c7 (patch)
tree1cde8a933f0af13c5ac0fa7dcc493aa7e991cc2a
parent552574bfb0a0160935452b605bb262b5b52c4f67 (diff)
hand over the login on handshake like we normally would
still missing the salt in this. auth should be more independent from registry to resemble the real process more closely
-rw-r--r--lib/srp/client.rb2
-rw-r--r--test/auth_test.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/srp/client.rb b/lib/srp/client.rb
index be94072..484d12b 100644
--- a/lib/srp/client.rb
+++ b/lib/srp/client.rb
@@ -19,7 +19,7 @@ module SRP
x = calculate_x(username, password, salt)
a = bigrand(32).hex
aa = modpow(GENERATOR, a, PRIME_N) # A = g^a (mod N)
- bb = server.handshake(aa)
+ bb = server.handshake(username, aa)
u = calculate_u(aa, bb, PRIME_N)
client_s = calculate_client_s(x, a, bb, u)
server.validate(calculate_m(aa, bb, client_s))
diff --git a/test/auth_test.rb b/test/auth_test.rb
index 182722f..4311683 100644
--- a/test/auth_test.rb
+++ b/test/auth_test.rb
@@ -11,7 +11,7 @@ class User
@verifier = verifier
end
- def handshake(aa)
+ def handshake(login, aa)
@session = initialize_auth(aa)
return @session.bb
end