Bug fix: remove unnecessary materialDescription validation when decrypting S3 object using metadata
Description
This commit will resolve the error that occurs when encrypting an email through AWS SES using KMS, then decrypting it using this library. We are checking if materialDescription metadata field contains a certain value before we decrypt it. A problem occurs when we use AWS SES encryption rule set because it doesn't populate this metadata field to the S3 encrypted object. We added another if statement to handle this missing use case. Note that other SDK languages already support SES decryption though KMS; hence why this is a bug.
Motivation and Context
Decrypting an email, which was encrypted using AWS SES with KMS, fails because we are validating a metadata field that isn't populated by AWS SES.
https://github.com/aws/amazon-s3-encryption-client-dotnet/issues/26
## Testing
Ran all unit and integration tests locally and they all succeeded
## Types of changes
[X] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist
[X] My code follows the code style of this project
[X] I have read the README document
[X] I have added tests to cover my changes
[X] All new and existing tests passed
License
[X] I confirm that this pull request can be released under the Apache 2 license
Bug fix: remove unnecessary materialDescription validation when decrypting S3 object using metadata
Description
This commit will resolve the error that occurs when encrypting an email through AWS SES using KMS, then decrypting it using this library. We are checking if materialDescription metadata field contains a certain value before we decrypt it. A problem occurs when we use AWS SES encryption rule set because it doesn't populate this metadata field to the S3 encrypted object. We added another if statement to handle this missing use case. Note that other SDK languages already support SES decryption though KMS; hence why this is a bug.
Motivation and Context
Decrypting an email, which was encrypted using AWS SES with KMS, fails because we are validating a metadata field that isn't populated by AWS SES. https://github.com/aws/amazon-s3-encryption-client-dotnet/issues/26 ## Testing Ran all unit and integration tests locally and they all succeeded ## Types of changesChecklist
License