Sha256: 69b8b78327262bd54d55c97770e395ff2c739bd8ab910da96218d70e2c0bb4ff

Contents?: true

Size: 1.12 KB

Versions: 202

Compression:

Stored size: 1.12 KB

Contents

# frozen_string_literal: true

module Aws
  module S3
    module EncryptionV2
      module Errors

        # Generic DecryptionError
        class DecryptionError < RuntimeError; end

        class EncryptionError < RuntimeError; end

        # Raised when attempting to decrypt a legacy (V1) encrypted object
        # when using a security_profile that does not support it.
        class LegacyDecryptionError < DecryptionError
          def initialize(*args)
            msg = 'The requested object is ' \
              'encrypted with V1 encryption schemas that have been disabled ' \
              'by client configuration security_profile = :v2. Retry with ' \
              ':v2_and_legacy or re-encrypt the object.'
            super(msg)
          end
        end

        class CEKAlgMismatchError < DecryptionError
          def initialize(*args)
            msg = 'The content encryption algorithm used at encryption time ' \
              'does not match the algorithm stored for decryption time. ' \
              'The object may be altered or corrupted.'
            super(msg)
          end
        end

      end
    end
  end
end

Version data entries

202 entries across 202 versions & 2 rubygems

Version Path
aws-sdk-s3-1.173.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.172.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.171.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.170.1 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.170.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.169.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.168.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.167.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.166.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.165.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.164.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.163.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.162.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.161.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.160.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.159.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.158.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.157.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.156.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.155.0 lib/aws-sdk-s3/encryptionV2/errors.rb