Sha256: 69b8b78327262bd54d55c97770e395ff2c739bd8ab910da96218d70e2c0bb4ff

Contents?: true

Size: 1.12 KB

Versions: 211

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

211 entries across 211 versions & 2 rubygems

Version Path
aws-sdk-s3-1.115.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.114.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.113.2 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.113.1 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.113.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.112.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.111.3 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.111.2 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.111.1 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.111.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.110.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.109.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.108.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.107.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.106.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.105.1 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.105.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.104.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.103.0 lib/aws-sdk-s3/encryptionV2/errors.rb
aws-sdk-s3-1.102.0 lib/aws-sdk-s3/encryptionV2/errors.rb