smaak 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/smaak/auth_message.rb +0 -1
- data/lib/smaak/server.rb +4 -2
- data/lib/smaak/version.rb +1 -1
- data/spec/lib/smaak/auth_message_spec.rb +0 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ddec83cc7a5d5c010e63518fd89b5fe8fc5bf7bf
|
4
|
+
data.tar.gz: a5f99cbce942c1d6a206e497efa1695816bfdfae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a9a7b93c4c338723c6e7cd7411fa710a8d15d73ab64144df0efdcdc4699abf3649ef163adf7583252dc213b57dc925b3f5c2ba813fa578987cd2b8f4806fd3d
|
7
|
+
data.tar.gz: a6e58e031f5258a628698fd795f6ecb5214c48da051c8c234459c1756e2fb78e671283c9b4ff041c26727db488d086e8e743240d07c78a4df802532af6810a43
|
data/lib/smaak/auth_message.rb
CHANGED
data/lib/smaak/server.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
require 'smaak
|
2
|
-
require 'smaak/associate
|
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
@@ -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
|