aws-sdk-resources 2.11.562 → 2.11.567

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
  SHA256:
3
- metadata.gz: b6ac0e253aa72fe0c66930c23a50c0f1e944e79e500febf995d11aba32bc80a7
4
- data.tar.gz: 8f60593f8927f98912a6655231a22cdfadc747e276d0f1ef277835f0a8dc3163
3
+ metadata.gz: 9189160e2aaa6aacd9e34e0320034aaa3ce95cf6cf10aea8013cef39478a895e
4
+ data.tar.gz: 22e2052188cd327fad94507ae3c85f85da6d1e10ef412e6d81028c96356345f4
5
5
  SHA512:
6
- metadata.gz: c6d6b6eddfead95cc30c36f3d6d760353edcea6387d4213c2164d5b5afa063836cf24c929e9f1d9efa4f1ce8b0a1ca1d53b6376531d494c11e38cf0056f57ac2
7
- data.tar.gz: 4df465e650e56888d180f7c9b3adea51f4be02b5b456eb971a4c8193948aa0dd6a67cec90bc35cc3bc0b654599dbc2365fad31247df232d2b637dea7e9575287
6
+ metadata.gz: 11f0db5aace8b89d37f4921a0ae4a480b66d83cf309838573f09d86f709864de051e9ba9781b305a4f668c2d5695781f90522a5b5fe1cc841872d1278bdd0907
7
+ data.tar.gz: 78e69b1b7de41d7688dee9950a6aa23e6c712698181db36abced93aa53693804e33d7adcb922a2af8c3c7c0d3e4ccf6734472047ae5e47bcef482426d9ccea68
@@ -7,6 +7,7 @@ module Aws
7
7
  module Encryption
8
8
  # @api private
9
9
  class DecryptHandler < Seahorse::Client::Handler
10
+ @@warned_response_target_proc = false
10
11
 
11
12
  V1_ENVELOPE_KEYS = %w(
12
13
  x-amz-key
@@ -45,6 +46,16 @@ module Aws
45
46
  def call(context)
46
47
  attach_http_event_listeners(context)
47
48
  apply_cse_user_agent(context)
49
+
50
+ if context[:response_target].is_a?(Proc) && !@@warned_response_target_proc
51
+ @@warned_response_target_proc = true
52
+ warn(':response_target is a Proc, or a block was provided. ' \
53
+ 'Read the entire object to the ' \
54
+ 'end before you start using the decrypted data. This is to ' \
55
+ 'verify that the object has not been modified since it ' \
56
+ 'was encrypted.')
57
+ end
58
+
48
59
  @handler.call(context)
49
60
  end
50
61
 
@@ -75,11 +86,11 @@ module Aws
75
86
  end
76
87
 
77
88
  def decryption_cipher(context)
78
- if envelope = get_encryption_envelope(context)
89
+ if (envelope = get_encryption_envelope(context))
79
90
  cipher = context[:encryption][:cipher_provider]
80
91
  .decryption_cipher(
81
92
  envelope,
82
- kms_encryption_context: context[:encryption][:kms_encryption_context]
93
+ context[:encryption]
83
94
  )
84
95
  [cipher, envelope]
85
96
  else
@@ -9,9 +9,10 @@ module Aws
9
9
  # @param [OpenSSL::Cipher] cipher
10
10
  # @param [IO#write] io An IO-like object that responds to `#write`.
11
11
  def initialize(cipher, io)
12
- @cipher = cipher.clone
12
+ @cipher = cipher
13
13
  # Ensure that IO is reset between retries
14
14
  @io = io.tap { |io| io.truncate(0) if io.respond_to?(:truncate) }
15
+ @cipher_buffer = String.new
15
16
  end
16
17
 
17
18
  # @return [#write]
@@ -19,17 +20,17 @@ module Aws
19
20
 
20
21
  def write(chunk)
21
22
  # decrypt and write
22
- @io.write(@cipher.update(chunk))
23
+ if @cipher.method(:update).arity == 1
24
+ @io.write(@cipher.update(chunk))
25
+ else
26
+ @io.write(@cipher.update(chunk, @cipher_buffer))
27
+ end
23
28
  end
24
29
 
25
30
  def finalize
26
31
  @io.write(@cipher.final)
27
32
  end
28
33
 
29
- def size
30
- @io.size
31
- end
32
-
33
34
  end
34
35
  end
35
36
  end
@@ -71,6 +71,7 @@ module Aws
71
71
  # ## Required Configuration
72
72
  #
73
73
  # You must configure all of the following:
74
+ #
74
75
  # * a key or key provider - See the Keys section below. The key provided determines
75
76
  # the key wrapping schema(s) supported for both encryption and decryption.
76
77
  # * `key_wrap_schema` - The key wrapping schema. It must match the type of key configured.
@@ -234,6 +235,7 @@ module Aws
234
235
  def_delegators :@client, :config, :delete_object, :head_object, :build_request
235
236
 
236
237
  # Creates a new encryption client. You must configure all of the following:
238
+ #
237
239
  # * a key or key provider - The key provided also determines the key wrapping
238
240
  # schema(s) supported for both encryption and decryption.
239
241
  # * `key_wrap_schema` - The key wrapping schema. It must match the type of key configured.
@@ -387,7 +389,7 @@ module Aws
387
389
  # @option (see S3::Client#get_object)
388
390
  # @return (see S3::Client#get_object)
389
391
  # @see S3::Client#get_object
390
- # @note The `:range` request parameter is not yet supported.
392
+ # @note The `:range` request parameter is not supported.
391
393
  def get_object(params = {}, &block)
392
394
  if params[:range]
393
395
  raise NotImplementedError, '#get_object with :range not supported'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-resources
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.562
4
+ version: 2.11.567
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-08-07 00:00:00.000000000 Z
11
+ date: 2020-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 2.11.562
19
+ version: 2.11.567
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 2.11.562
26
+ version: 2.11.567
27
27
  description: AWS SDK For Ruby V2 has been marked as deprecated. Please upgrade to
28
28
  AWS SDK For Ruby V3.Provides resource oriented interfaces and other higher-level
29
29
  abstractions for many AWS services. This gem is part of the official AWS SDK for