aws-sdk-sns 1.32.0 → 1.32.1
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/aws-sdk-sns.rb +1 -1
- data/lib/aws-sdk-sns/client.rb +1 -1
- data/lib/aws-sdk-sns/message_verifier.rb +22 -5
- 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: 26b3c7ca043707d291ea47c619e2b0481b24282b95f57f031a7bca55d477fb6c
|
4
|
+
data.tar.gz: 0f12afc9f439d81955cbe98497e47e360e7fdd97cc2ff177122e9e4b1000e393
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10a4c7eabec788ff54f27ad3125798004d9ca937a80cba277215ff3901460f70fbb6faf1816bf211854073f5fd345097dd3928570418f88d7a809e088d2f8186
|
7
|
+
data.tar.gz: 1fe0e8dd6cc7609d6390de957406444b330b240e737da2a74a64d30cd494579235bd591ef4634ee41befdca623e349da6e765583e3c155dcb449c0e627eaa8bd
|
data/lib/aws-sdk-sns.rb
CHANGED
data/lib/aws-sdk-sns/client.rb
CHANGED
@@ -6,7 +6,6 @@ require 'base64'
|
|
6
6
|
|
7
7
|
module Aws
|
8
8
|
module SNS
|
9
|
-
|
10
9
|
# A utility class that can be used to verify the authenticity of messages
|
11
10
|
# sent by Amazon SNS.
|
12
11
|
#
|
@@ -33,16 +32,20 @@ module Aws
|
|
33
32
|
'Timestamp',
|
34
33
|
'Token',
|
35
34
|
'TopicArn',
|
36
|
-
'Type'
|
35
|
+
'Type'
|
37
36
|
].freeze
|
38
37
|
|
39
38
|
# @api private
|
40
39
|
AWS_HOSTNAMES = [
|
41
40
|
/^sns\.[a-zA-Z0-9\-]{3,}\.amazonaws\.com(\.cn)?$/
|
42
|
-
]
|
41
|
+
].freeze
|
43
42
|
|
44
|
-
|
43
|
+
# @param [Hash] http_options Supported options to be passed to Net::HTTP.
|
44
|
+
# @option http_options [String] :http_proxy A proxy to send
|
45
|
+
# requests through. Formatted like 'http://proxy.com:123'.
|
46
|
+
def initialize(http_options = {})
|
45
47
|
@cached_pems = {}
|
48
|
+
@http_proxy = http_options[:http_proxy]
|
46
49
|
end
|
47
50
|
|
48
51
|
# @param [String<JSON>] message_body
|
@@ -151,7 +154,11 @@ module Aws
|
|
151
154
|
end
|
152
155
|
|
153
156
|
def https_get(uri, failed_attempts = 0)
|
154
|
-
|
157
|
+
args = []
|
158
|
+
args << uri.host
|
159
|
+
args << uri.port
|
160
|
+
args += http_proxy_parts
|
161
|
+
http = Net::HTTP.new(*args.compact)
|
155
162
|
http.use_ssl = true
|
156
163
|
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
157
164
|
http.start
|
@@ -168,6 +175,16 @@ module Aws
|
|
168
175
|
raise VerificationError, error.message
|
169
176
|
end
|
170
177
|
|
178
|
+
def http_proxy_parts
|
179
|
+
# empty string if not configured, URI parts return nil
|
180
|
+
http_proxy = URI.parse(@http_proxy.to_s)
|
181
|
+
[
|
182
|
+
http_proxy.host,
|
183
|
+
http_proxy.port,
|
184
|
+
(http_proxy.user && CGI.unescape(http_proxy.user)),
|
185
|
+
(http_proxy.password && CGI.unescape(http_proxy.password))
|
186
|
+
]
|
187
|
+
end
|
171
188
|
end
|
172
189
|
end
|
173
190
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-sns
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.32.
|
4
|
+
version: 1.32.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|