Commit c6dce205 by Isaac Betesh Committed by Jon Yurek

Both v1 and v2 of the AWS Ruby SDK accept the string literal AES256, no need to…

Both v1 and v2 of the AWS Ruby SDK accept the string literal AES256, no need to differentiate. (thank you, @trevorrowe)
parent d713a4a6
......@@ -152,7 +152,7 @@ module Paperclip
@s3_storage_class = set_storage_class(@options[:s3_storage_class])
@s3_server_side_encryption = aws_v1? ? :aes256 : "AES256"
@s3_server_side_encryption = "AES256"
if @options[:s3_server_side_encryption].blank?
@s3_server_side_encryption = false
end
......
......@@ -145,7 +145,6 @@ unless ENV["S3_BUCKET"].blank?
end
context "An attachment that uses S3 for storage and uses AES256 encryption" do
let(:encryption_method) { defined?(::AWS) ? :aes356 : "AES256" }
before do
rebuild_model styles: { thumb: "100x100", square: "32x32#" },
storage: :s3,
......@@ -156,7 +155,7 @@ unless ENV["S3_BUCKET"].blank?
aws_access_key_id: ENV['AWS_ACCESS_KEY_ID'],
aws_secre_access_key: ENV['AWS_SECRET_ACCESS_KEY']
},
s3_server_side_encryption: encryption_method
s3_server_side_encryption: "AES256"
Dummy.delete_all
@dummy = Dummy.new
end
......@@ -178,7 +177,7 @@ unless ENV["S3_BUCKET"].blank?
end
it "is encrypted on S3" do
assert @dummy.avatar.s3_object.server_side_encryption == encryption_method
assert @dummy.avatar.s3_object.server_side_encryption == "AES256"
end
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment