Skip to content

Commit 1d7ec85

Browse files
fix(go): make Encrypt and Decrypt fail always for Legacy version (#1926)
1 parent 7a98eb6 commit 1d7ec85

File tree

1 file changed

+2
-8
lines changed
  • DynamoDbEncryption/runtimes/go/ImplementationFromDafny-go/InternalLegacyOverride

1 file changed

+2
-8
lines changed

DynamoDbEncryption/runtimes/go/ImplementationFromDafny-go/InternalLegacyOverride/extern.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,15 @@ func (CompanionStruct_InternalLegacyOverride_) Build(config interface{}) Wrapper
2424
}
2525

2626
func (InternalLegacyOverride) EncryptItem(config interface{}) Wrappers.Result {
27-
// Go does not support the Legacy DDB-EC
28-
if policy.Is_FORBID__LEGACY__ENCRYPT__FORBID__LEGACY__DECRYPT() {
29-
return Wrappers.Companion_Result_.Create_Success_(Wrappers.Companion_Option_.Create_None_())
30-
}
27+
// Go does not support the Legacy DDB-EC. So, this function will not be reached.
3128
err := &awscryptographydbencryptionsdkdynamodbitemencryptorsmithygeneratedtypes.DynamoDbItemEncryptorException{
3229
Message: "Legacy configuration unsupported.",
3330
}
3431
return Wrappers.Companion_Result_.Create_Failure_(err)
3532
}
3633

3734
func (InternalLegacyOverride) DecryptItem(config interface{}) Wrappers.Result {
38-
// Go does not support the Legacy DDB-EC
39-
if policy.Is_FORBID__LEGACY__ENCRYPT__FORBID__LEGACY__DECRYPT() {
40-
return Wrappers.Companion_Result_.Create_Success_(Wrappers.Companion_Option_.Create_None_())
41-
}
35+
// Go does not support the Legacy DDB-EC. So, this function will not be reached.
4236
err := &awscryptographydbencryptionsdkdynamodbitemencryptorsmithygeneratedtypes.DynamoDbItemEncryptorException{
4337
Message: "Legacy configuration unsupported.",
4438
}

0 commit comments

Comments
 (0)