Sha256: 69b8b78327262bd54d55c97770e395ff2c739bd8ab910da96218d70e2c0bb4ff

Contents?: true

Size: 1.12 KB

Versions: 212

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

212 entries across 212 versions & 2 rubygems

Version Path
aws-sdk-s3-1.182.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.181.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.180.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.179.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.178.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.177.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.176.1 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.176.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.175.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.174.0 lib/aws-sdk-s3/encryptionV2/errors.rb
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