smaak 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aa324b6c89ae844f39d2b56535a909251aaf9ad3
4
- data.tar.gz: bdce6d9eae9fce29e41b9a573de6add9d02164d8
3
+ metadata.gz: ddec83cc7a5d5c010e63518fd89b5fe8fc5bf7bf
4
+ data.tar.gz: a5f99cbce942c1d6a206e497efa1695816bfdfae
5
5
  SHA512:
6
- metadata.gz: 45006348cf0feb78d1e6460e9190cff22480895c22e08d10a38bde025729d599b23446c8ecd9bb71f9ef994cb7c2b2ea3c600b39079e644a15d0c103855078c2
7
- data.tar.gz: 9ead16c1d804141e74c5d60be4cb811841489a102746d5bfd71f89ac0cf69d9f60d64c8e317f30c6f4c1d7cc61cf2b34f5d037f0e29c687e9f54465dd9c8cb5c
6
+ metadata.gz: 2a9a7b93c4c338723c6e7cd7411fa710a8d15d73ab64144df0efdcdc4699abf3649ef163adf7583252dc213b57dc925b3f5c2ba813fa578987cd2b8f4806fd3d
7
+ data.tar.gz: a6e58e031f5258a628698fd795f6ecb5214c48da051c8c234459c1756e2fb78e671283c9b4ff041c26727db488d086e8e743240d07c78a4df802532af6810a43
@@ -51,7 +51,6 @@ module Smaak
51
51
  return false if expired?
52
52
  return false if not signature_ok?(signature, pubkey)
53
53
  return false if not psk_match?(Smaak::obfuscate_psk(psk))
54
- return false if not intended_for_recipient?(pubkey.export)
55
54
  identity
56
55
  end
57
56
 
data/lib/smaak/server.rb CHANGED
@@ -1,5 +1,6 @@
1
- require 'smaak.rb'
2
- require 'smaak/associate.rb'
1
+ require 'smaak'
2
+ require 'smaak/associate'
3
+ require 'smaak/auth_message'
3
4
 
4
5
  module Smaak
5
6
  class Server < Associate
@@ -38,6 +39,7 @@ module Smaak
38
39
 
39
40
  def verify_auth_message(auth_message, signature)
40
41
  return false if not auth_message_unique?(auth_message)
42
+ return false if not auth_message.intended_for_recipient?(@key.export)
41
43
  identity = auth_message.identity
42
44
  pubkey = @association_store[identity]['public_key']
43
45
  psk = @association_store[identity]['psk']
data/lib/smaak/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Smaak
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -226,11 +226,6 @@ describe Smaak::AuthMessage do
226
226
  expect(@iut.verify(@test_signature, @test_server_public_key, @test_psk)).to eq(false)
227
227
  end
228
228
 
229
- it "should ensure the message is intended for this service and return false if it is not" do
230
- expect(@iut).to(receive(:intended_for_recipient?)).and_return(false)
231
- expect(@iut.verify(@test_signature, @test_server_public_key, @test_psk)).to eq(false)
232
- end
233
-
234
229
  it "should return the identity specified in the message if the message was successfully verified" do
235
230
  expect(@iut.verify(@test_signature, @test_server_public_key, @test_psk)).to eq(@test_identity)
236
231
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smaak
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ernst van Graan