blockstack 7.0.1 → 8.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/blockstack.rb +2 -2
- data/lib/blockstack/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b7e7aab8a9750f1bacc91e808200d85878fac07
|
4
|
+
data.tar.gz: 9e2ec815aaa11a6170a1c829eab0654b8faf66ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1362057581eb42163b064f7bf48bcf7f47053cbe4c0554134e732e75428dde789443c20b11b7eb30c0c071dd71e02314d45eadd5fe3255b00867f269e57fce11
|
7
|
+
data.tar.gz: eac2012c2ec8b0ff7b16762c6a7e8d1449448a5b9d99ef16d75cf72dfe41d263dad2dc5756132934a0b3cdf8416c592699bd4a8f3820708f31cc3eac5b8b0dce
|
data/lib/blockstack.rb
CHANGED
@@ -49,7 +49,7 @@ module Blockstack
|
|
49
49
|
end
|
50
50
|
|
51
51
|
# decode & verify signature
|
52
|
-
def self.verify_with_signature(auth_token)
|
52
|
+
def self.verify_with_signature(auth_token, public_keys)
|
53
53
|
compressed_hex_public_key = public_keys[0]
|
54
54
|
bignum = OpenSSL::BN.new(compressed_hex_public_key, 16)
|
55
55
|
group = OpenSSL::PKey::EC::Group.new 'secp256k1'
|
@@ -74,7 +74,7 @@ module Blockstack
|
|
74
74
|
public_keys = decoded_token['public_keys']
|
75
75
|
fail InvalidAuthResponse.new('Invalid public_keys array: only 1 key is supported') unless public_keys.length == 1
|
76
76
|
|
77
|
-
decoded_token = verify_with_signature(auth_token)
|
77
|
+
decoded_token = verify_with_signature(auth_token, public_keys)
|
78
78
|
fail InvalidAuthResponse.new("Public keys don't match issuer address") unless self.public_keys_match_issuer?(decoded_token)
|
79
79
|
fail InvalidAuthResponse.new("Public keys don't match owner of claimed username") unless self.public_keys_match_username?(decoded_token)
|
80
80
|
|
data/lib/blockstack/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blockstack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 8.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Larry Salibra
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|