reyes 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/reyes/pgp_wrapper.rb +18 -3
- data/lib/reyes/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZTM1YmZiYjM5MzMyNWQ4N2MyZGFiZGQyMmFmNjBlYzA5ZWY0ZTUxOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NDk5ZmZlNTExMThjZDk3NDc0YTc3MWJiNzRkMTRkMDQ3YTk0NTczZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MzhiNzk5NTI2NDE3MGE4Y2ZkMTY2ZDRhZDNjMDY5ZGYxZDAzMzFlMGRiNmJj
|
10
|
+
ZDEzZmU5ZDhkMjk5MTdlNDc3NDhjYmYxMWQzMmQ5ZGJkNDc2ZTUzMzJiYmE4
|
11
|
+
MGRmYjZhYmU2MmIzYWE2MGJjYzNhZWVkYTc5ZmUyZjExNTU5ZTY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NmM0NjJiMmNjY2JhMWQwZmNhYmMzZTRkZDlmNjcwMjAzNDQ0NDlkMzQwMDJm
|
14
|
+
MTMzMGI1MDY5MzkyYThmNWNhMDlmNmJmNzBhOTNlMzFlOGI5NTM4MTQ5NjZk
|
15
|
+
MzM0NTQ2MzMzM2QyOGFmNzI1Yzk1NzgzYjAyYTVjNDRhZWZmYjU=
|
data/lib/reyes/pgp_wrapper.rb
CHANGED
@@ -27,7 +27,7 @@ module Reyes
|
|
27
27
|
#
|
28
28
|
# @return [String] the stripped cleartext data
|
29
29
|
#
|
30
|
-
def verify!(data)
|
30
|
+
def verify!(data, retries=1)
|
31
31
|
log.info("Verifying #{data.length} bytes against key #{key_id}")
|
32
32
|
|
33
33
|
gpg_cmd = %w{gpg --batch --decrypt --status-fd 2} + keyring_args + ['-']
|
@@ -42,7 +42,18 @@ module Reyes
|
|
42
42
|
raise VerificationFailed.new("Bad key match") unless $1 == $2
|
43
43
|
raise VerificationFailed.new("Bad Key ID") unless $1 == key_id
|
44
44
|
else
|
45
|
-
|
45
|
+
# There's a weird and very rare race condition where the stderr
|
46
|
+
# output returned by Subprocess can be truncated.
|
47
|
+
# Retry in this case.
|
48
|
+
if err.split("\n").length < 4 && retries > 0
|
49
|
+
log.error("Looks like we hit hit GPG/Subprocess race condition")
|
50
|
+
log.error("GPG stderr:")
|
51
|
+
log.error(err.inspect)
|
52
|
+
log.error("Retrying...")
|
53
|
+
return verify!(data, retries - 1)
|
54
|
+
else
|
55
|
+
raise VerificationFailed.new("Pattern does not match")
|
56
|
+
end
|
46
57
|
end
|
47
58
|
rescue VerificationFailed => exc
|
48
59
|
log.error("GPG verification failed: #{exc.message}")
|
@@ -73,7 +84,11 @@ module Reyes
|
|
73
84
|
log.error("GPG stderr:")
|
74
85
|
log.error(err)
|
75
86
|
log.error("GPG stdout:")
|
76
|
-
|
87
|
+
if out.length > 80
|
88
|
+
log.error(out[0..80] + '...')
|
89
|
+
else
|
90
|
+
log.error(out)
|
91
|
+
end
|
77
92
|
|
78
93
|
write_tmp_file("input data", data) unless data.empty?
|
79
94
|
end
|
data/lib/reyes/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reyes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Brody
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-02-
|
12
|
+
date: 2015-02-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk
|