blockstack 7.0.1 → 8.0.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 98dc45c77ec49a8d6725daf6e4eb4e642edad166
4
- data.tar.gz: 02e764103cafbc18bac059b23487a8827ccc1128
3
+ metadata.gz: 7b7e7aab8a9750f1bacc91e808200d85878fac07
4
+ data.tar.gz: 9e2ec815aaa11a6170a1c829eab0654b8faf66ab
5
5
  SHA512:
6
- metadata.gz: 64266c0200959358ae3f0e06d3d7678d56bc1a0c9030e831dd21b56b209e0d2397a636cdf47d04107b6b960b11e18d9124172504aa3f62f1c138f886b4d81d43
7
- data.tar.gz: 589cec9d95fc24c24f64679da6b3f4fdea85e9d9924044fd0a1038f8482fd80e5aa074771a5f81f4d7b6c4746e9490a480bda99b1d1a73753efb2876224d6b8a
6
+ metadata.gz: 1362057581eb42163b064f7bf48bcf7f47053cbe4c0554134e732e75428dde789443c20b11b7eb30c0c071dd71e02314d45eadd5fe3255b00867f269e57fce11
7
+ data.tar.gz: eac2012c2ec8b0ff7b16762c6a7e8d1449448a5b9d99ef16d75cf72dfe41d263dad2dc5756132934a0b3cdf8416c592699bd4a8f3820708f31cc3eac5b8b0dce
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module Blockstack
2
- VERSION = "7.0.1"
2
+ VERSION = "8.0.0"
3
3
  end
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: 7.0.1
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-01 00:00:00.000000000 Z
11
+ date: 2018-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler