xrbp 0.1.10 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/xrbp/nodestore/db.rb +3 -1
- data/lib/xrbp/overlay/handshake.rb +10 -7
- data/lib/xrbp/version.rb +1 -1
- data/spec/xrbp/nodestore/backends/db_parser.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6390bfb57eaa26b5285cb3f3c3fb10d85d0a3a81e09e3c3b1e52eff6d4a00514
|
4
|
+
data.tar.gz: b616a6a4324fbd34ec8e77529c2827fca77949f635a0785ab33d8ca867baccc2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b96064684b5ef84f089808649e4b281e9f055610543deec66b8d09122c7a7b545da95f44b55e60a8e73e6402ec3d03f52cfc79ea9ee85bacc9e66003dbf0b01
|
7
|
+
data.tar.gz: 1f9f959987d864d4500ffc5ba2172c5341a9705a3eec9e3af09de88bfa9bf5f8feabbae0a7030db3437af75348a924b2535abb0b4661192aa44b3d5e300715df
|
data/lib/xrbp/nodestore/db.rb
CHANGED
@@ -413,7 +413,9 @@ module XRBP
|
|
413
413
|
hash_prefix = Format::HASH_PREFIXES[obj["hash_prefix"].upcase]
|
414
414
|
raise unless hash_prefix == :inner_node
|
415
415
|
|
416
|
-
Format::INNER_NODE.decode(node)
|
416
|
+
node = Format::INNER_NODE.decode(node)
|
417
|
+
node['node_type'] = Format::NODE_TYPE_CODES[node['node_type']]
|
418
|
+
node
|
417
419
|
end
|
418
420
|
|
419
421
|
protected
|
@@ -12,8 +12,8 @@ module XRBP
|
|
12
12
|
# XXX this module requires the openssl-ruby gem with the following patches:
|
13
13
|
# https://github.com/ruby/openssl/pull/250
|
14
14
|
#
|
15
|
-
# Otherwise the ssl_socket#
|
16
|
-
# not be available
|
15
|
+
# Otherwise the ssl_socket#finished_message and #peer_finished_message
|
16
|
+
# methods will not be available
|
17
17
|
#
|
18
18
|
# Currently the only way to apply this is to checkout openssl-ruby, apply
|
19
19
|
# the patches, and then rebuild/reinstall the gem locally!
|
@@ -39,8 +39,8 @@ module XRBP
|
|
39
39
|
def shared
|
40
40
|
@shared ||= begin
|
41
41
|
sha512 = OpenSSL::Digest::SHA512.new
|
42
|
-
sf = socket.
|
43
|
-
pf = socket.
|
42
|
+
sf = socket.finished_message
|
43
|
+
pf = socket.peer_finished_message
|
44
44
|
sf = sha512.digest(sf)
|
45
45
|
pf = sha512.digest(pf)
|
46
46
|
shared = sf.to_bn ^ pf.to_bn
|
@@ -74,9 +74,12 @@ Session-Signature: #{shared}\r
|
|
74
74
|
read_sockets, _, _ = IO.select([socket], nil, nil, 0.1)
|
75
75
|
|
76
76
|
if read_sockets && read_sockets[0]
|
77
|
-
|
78
|
-
|
79
|
-
|
77
|
+
begin
|
78
|
+
out = socket.read_nonblock(1024)
|
79
|
+
@response += out.strip
|
80
|
+
break if out[-4..-1] == "\r\n\r\n"
|
81
|
+
rescue OpenSSL::SSL::SSLErrorWaitReadable
|
82
|
+
end
|
80
83
|
end
|
81
84
|
end
|
82
85
|
end
|
data/lib/xrbp/version.rb
CHANGED
@@ -10,7 +10,7 @@ shared_examples "a database parser" do |opts={}|
|
|
10
10
|
|
11
11
|
let(:inner_node_key) { ["001b46daaea7a40d9dcdc30f83918db8c8f9110c22e1207bcd8f9145dbe032dd"].pack("H*") }
|
12
12
|
# XXX - see: https://github.com/ripple/rippled/issues/2960
|
13
|
-
let(:inner_node_type) { described_class == XRBP::NodeStore::Backends::NuDB ?
|
13
|
+
let(:inner_node_type) { described_class == XRBP::NodeStore::Backends::NuDB ? :unknown : :account_node }
|
14
14
|
let(:inner_node) { {"node_type"=>inner_node_type, "hp_inner_node"=>"4d494e00", "child0"=>"0000000000000000000000000000000000000000000000000000000000000000", "child1"=>"0000000000000000000000000000000000000000000000000000000000000000", "child2"=>"0000000000000000000000000000000000000000000000000000000000000000", "child3"=>"0000000000000000000000000000000000000000000000000000000000000000", "child4"=>"0000000000000000000000000000000000000000000000000000000000000000", "child5"=>"0000000000000000000000000000000000000000000000000000000000000000", "child6"=>"0000000000000000000000000000000000000000000000000000000000000000", "child7"=>"0000000000000000000000000000000000000000000000000000000000000000", "child8"=>"0000000000000000000000000000000000000000000000000000000000000000", "child9"=>"0000000000000000000000000000000000000000000000000000000000000000", "child10"=>"0000000000000000000000000000000000000000000000000000000000000000", "child11"=>"0000000000000000000000000000000000000000000000000000000000000000", "child12"=>"0000000000000000000000000000000000000000000000000000000000000000", "child13"=>"0000000000000000000000000000000000000000000000000000000000000000", "child14"=>"0000000000000000000000000000000000000000000000000000000000000000", "child15"=>"666a34c47ed2890eab999536b6c0f728b3b2d616080bd38837f7c9f509b55204", "child16"=>"", "child17"=>"", "child18"=>"", "child19"=>"", "child20"=>"", "child21"=>"", "child22"=>"", "child23"=>"", "child24"=>"", "child25"=>"", "child26"=>"", "child27"=>"", "child28"=>"", "child29"=>"", "child30"=>"", "child31"=>""} }
|
15
15
|
|
16
16
|
it "returns ledger" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xrbp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dev Null Productions
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|