aws-sdk-s3 1.76.0 → 1.77.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ad990de2b05716f6116d73be9cdc33d6e1da94fe806c88f8d614242ac10718b5
4
- data.tar.gz: 7a54769829c7c767a0f8dedd8955e62878fd1fcb8edcd013f8de3511ca11c62b
3
+ metadata.gz: 422b6a3ada8260b63191be267db716f2f368ea6beddf79715211383f1e43a694
4
+ data.tar.gz: 2fa30458ca058fc7594fdf92b26c46491cf44b9d5f724f279c72a8c3ee32557e
5
5
  SHA512:
6
- metadata.gz: ba2bac310409551c19f28d89b70a1f1aa830fac115051a15f565db4ff16eb261471f9fa6c4b27544d1faa1fb5b5604fe20b59c4e5c244faec5444ec4aae49c02
7
- data.tar.gz: 6e13da20ed6caad1c3bcf2025e24ccc074185f18dc115d5f30a3276077fc42c7fc782c62b43e8c8ee7ce1edf8bee47dd2758ab4f3912ebf65b1444311df0d324
6
+ metadata.gz: a3937af88ca256e605d8f83d34d34577c7c49c8357526fe27c8af61c6d58fe0fe54e630259b8a97848c9fc80bb8f72abf509c39c341ba137582bb3feac0b499d
7
+ data.tar.gz: 5b0dfeccd6803d948ec8db2282628e9647e4ce5efe08e09a4c32e7a40b9371103f3eef8b9e8c5210700a7e612bc5197bb23e291c9f4e7b117a20e22ff35260d6
@@ -68,6 +68,6 @@ require_relative 'aws-sdk-s3/event_streams'
68
68
  # @service
69
69
  module Aws::S3
70
70
 
71
- GEM_VERSION = '1.76.0'
71
+ GEM_VERSION = '1.77.0'
72
72
 
73
73
  end
@@ -11960,7 +11960,7 @@ module Aws::S3
11960
11960
  params: params,
11961
11961
  config: config)
11962
11962
  context[:gem_name] = 'aws-sdk-s3'
11963
- context[:gem_version] = '1.76.0'
11963
+ context[:gem_version] = '1.77.0'
11964
11964
  Seahorse::Client::Request.new(handlers, context)
11965
11965
  end
11966
11966
 
@@ -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.
@@ -392,7 +394,7 @@ module Aws
392
394
  # @option (see S3::Client#get_object)
393
395
  # @return (see S3::Client#get_object)
394
396
  # @see S3::Client#get_object
395
- # @note The `:range` request parameter is not yet supported.
397
+ # @note The `:range` request parameter is not supported.
396
398
  def get_object(params = {}, &block)
397
399
  if params[:range]
398
400
  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-s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.76.0
4
+ version: 1.77.0
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-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-kms
@@ -47,7 +47,7 @@ dependencies:
47
47
  version: '3'
48
48
  - - ">="
49
49
  - !ruby/object:Gem::Version
50
- version: 3.104.1
50
+ version: 3.104.3
51
51
  type: :runtime
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
@@ -57,7 +57,7 @@ dependencies:
57
57
  version: '3'
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: 3.104.1
60
+ version: 3.104.3
61
61
  description: Official AWS Ruby gem for Amazon Simple Storage Service (Amazon S3).
62
62
  This gem is part of the AWS SDK for Ruby.
63
63
  email: