aws-sdk-cloudfront 1.128.0 → 1.129.0

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: e79b83bc41d7d07c8108b92d45157324b73036c430051568c04cc347562807ad
4
- data.tar.gz: 04bee4e7b76cd054014fa04aa35986d50586c165f5d0b2279dda736951e92a7e
3
+ metadata.gz: 96968fbd04594b3497832cfdf34799da384d62b08636dc2ec3c91b31ff754f8b
4
+ data.tar.gz: e703deb7dd848df7ac8dd6df8872e66f0a65a4d21567d948ed638449aa5791a1
5
5
  SHA512:
6
- metadata.gz: d355cc97ca8273a8fb68c4789a119128a9cffd959d379e63007b3fcb070e47f27c338312637030e76c8826bac1658d8a9a8c52fa392e1ce74c9f6079aab9575d
7
- data.tar.gz: 55fc6b1666bbddc258baf5af4491a65f6075918512ede6af243071db83cd6e0207c7d2d00ff78f96b5fe7041dde2b4c19f08e64804b0254497c0ebcede55461d
6
+ metadata.gz: 1c249b64d3a44d6155abb2c7bbe48adf3b24522b4d4f38050ee7dff376fd4cc9c2ca30d18f9730bf1f0155ea40b38bc9896db1038891307f045f0acfbee8aeac
7
+ data.tar.gz: 05057c2b612a1ecf27e9ac6e2bf8e7d2917980c662e3a36da30533a43059d71aaf15c321f854b6fc69b6e2a2ed6f6d34583b956d4b95fb39ee9cd1b392cc4bc4
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.129.0 (2025-09-16)
5
+ ------------------
6
+
7
+ * Feature - CloudFront signers now support ECDSA private keys in addition to RSA keys.
8
+
4
9
  1.128.0 (2025-09-03)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.128.0
1
+ 1.129.0
@@ -12296,7 +12296,7 @@ module Aws::CloudFront
12296
12296
  tracer: tracer
12297
12297
  )
12298
12298
  context[:gem_name] = 'aws-sdk-cloudfront'
12299
- context[:gem_version] = '1.128.0'
12299
+ context[:gem_version] = '1.129.0'
12300
12300
  Seahorse::Client::Request.new(handlers, context)
12301
12301
  end
12302
12302
 
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # utility classes
4
3
  module Aws
5
4
  module CloudFront
6
5
  autoload :Signer, 'aws-sdk-cloudfront/signer'
@@ -7,25 +7,22 @@ require 'openssl'
7
7
 
8
8
  module Aws
9
9
  module CloudFront
10
-
11
10
  module Signer
12
-
13
11
  # @option options [String] :key_pair_id
14
12
  # @option options [String] :private_key
15
13
  # @option options [String] :private_key_path
16
14
  def initialize(options = {})
17
15
  @key_pair_id = key_pair_id(options)
18
- @cipher = OpenSSL::Digest::SHA1.new
19
- @private_key = OpenSSL::PKey::RSA.new(private_key(options))
16
+ @cipher = OpenSSL::Digest.new('SHA1')
17
+ @private_key = OpenSSL::PKey.read(private_key(options))
20
18
  end
21
19
 
22
20
  private
23
21
 
24
22
  def scheme_and_uri(url)
25
23
  url_sections = url.split('://', 2)
26
- if url_sections.length < 2
27
- raise ArgumentError, "Invalid URL:#{url}"
28
- end
24
+ raise ArgumentError, "Invalid URL:#{url}" if url_sections.length < 2
25
+
29
26
  scheme = url_sections[0].delete('*')
30
27
  uri = "#{scheme}://#{url_sections[1]}"
31
28
  [scheme, uri]
@@ -69,7 +66,7 @@ module Aws
69
66
  resource_content
70
67
  end
71
68
  else
72
- msg = "Invalid URI scheme:#{scheme}.Scheme must be one of: http, https or rtmp."
69
+ msg = "Invalid URI scheme:#{scheme}. Scheme must be one of: http, https or rtmp."
73
70
  raise ArgumentError, msg
74
71
  end
75
72
  end
@@ -87,7 +84,7 @@ module Aws
87
84
  policy = canned_policy(params[:resource], params[:expires])
88
85
  signature_content['Expires'] = params[:expires]
89
86
  else
90
- msg = "Either a policy or a resource with an expiration time must be provided."
87
+ msg = 'Either a policy or a resource with an expiration time must be provided.'
91
88
  raise ArgumentError, msg
92
89
  end
93
90
 
@@ -106,37 +103,34 @@ module Aws
106
103
  json_hash = {
107
104
  'Statement' => [
108
105
  'Resource' => resource,
109
- 'Condition' => {
110
- 'DateLessThan' => {'AWS:EpochTime' => expires}
111
- }
106
+ 'Condition' => { 'DateLessThan' => { 'AWS:EpochTime' => expires } }
112
107
  ]
113
108
  }
114
109
  Aws::Json.dump(json_hash)
115
110
  end
116
111
 
117
112
  def encode(policy)
118
- Base64.encode64(policy).gsub(/[+=\/]/, '+' => '-', '=' => '_', '/' => '~')
113
+ Base64.encode64(policy).gsub(%r{[+=/]}, '+' => '-', '=' => '_', '/' => '~')
119
114
  end
120
115
 
121
116
  def key_pair_id(options)
122
- if options[:key_pair_id].nil? or options[:key_pair_id] == ''
123
- raise ArgumentError, ":key_pair_id must not be blank"
124
- else
125
- options[:key_pair_id]
117
+ if options[:key_pair_id].nil? || (options[:key_pair_id] == '')
118
+ raise ArgumentError, ':key_pair_id must not be blank'
126
119
  end
120
+
121
+ options[:key_pair_id]
127
122
  end
128
123
 
129
124
  def private_key(options)
130
125
  if options[:private_key]
131
126
  options[:private_key]
132
127
  elsif options[:private_key_path]
133
- File.open(options[:private_key_path], 'rb') { |f| f.read }
128
+ File.open(options[:private_key_path], 'rb', &:read)
134
129
  else
135
- msg = ":private_key or :private_key_path should be provided"
130
+ msg = ':private_key or :private_key_path should be provided'
136
131
  raise ArgumentError, msg
137
132
  end
138
133
  end
139
-
140
134
  end
141
135
  end
142
136
  end
@@ -55,7 +55,7 @@ module Aws::CloudFront
55
55
  autoload :EndpointProvider, 'aws-sdk-cloudfront/endpoint_provider'
56
56
  autoload :Endpoints, 'aws-sdk-cloudfront/endpoints'
57
57
 
58
- GEM_VERSION = '1.128.0'
58
+ GEM_VERSION = '1.129.0'
59
59
 
60
60
  end
61
61
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-cloudfront
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.128.0
4
+ version: 1.129.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services