ruby-srp 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/lib/srp/session.rb CHANGED
@@ -25,7 +25,8 @@ module SRP
25
25
 
26
26
  def authenticate(m)
27
27
  if(m == calculate_m(server_secret))
28
- return @m2 = calculate_m2
28
+ @m2 = calculate_m2
29
+ return @user
29
30
  end
30
31
  end
31
32
 
data/ruby-srp.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "ruby-srp"
3
- s.version = "0.1.2"
3
+ s.version = "0.1.3"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.authors = ["Azul"]
6
6
  s.email = ["azul@leap.se"]
data/test/session_test.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/test_helper')
2
+ require 'json'
2
3
 
3
4
  class SessionTest < Test::Unit::TestCase
4
5
 
@@ -21,7 +22,8 @@ class SessionTest < Test::Unit::TestCase
21
22
  session = SRP::Session.new(self, aa)
22
23
  session.send(:initialize_server, aa, b) # seeding b to compare to py_srp
23
24
  assert_equal bb.to_s(16), session.bb.to_s(16)
24
- assert_equal m2, session.authenticate(m)
25
+ assert_equal self, session.authenticate(m)
26
+ assert_equal({'M2' => m2.to_s(16)}.to_json, session.to_json)
25
27
  end
26
28
 
27
29
  def test_zero_padded_salt
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-srp
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 2
10
- version: 0.1.2
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Azul