From 90121be557d5dc16f48be9f0b1fed028874712ce Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Tue, 3 Jun 2025 12:26:23 -0700 Subject: [PATCH 1/2] fix EncryptItem and DecryptItem to fail always --- .../InternalLegacyOverride/extern.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/DynamoDbEncryption/runtimes/go/ImplementationFromDafny-go/InternalLegacyOverride/extern.go b/DynamoDbEncryption/runtimes/go/ImplementationFromDafny-go/InternalLegacyOverride/extern.go index 487b1145a..23369d0d8 100644 --- a/DynamoDbEncryption/runtimes/go/ImplementationFromDafny-go/InternalLegacyOverride/extern.go +++ b/DynamoDbEncryption/runtimes/go/ImplementationFromDafny-go/InternalLegacyOverride/extern.go @@ -24,10 +24,7 @@ func (CompanionStruct_InternalLegacyOverride_) Build(config interface{}) Wrapper } func (InternalLegacyOverride) EncryptItem(config interface{}) Wrappers.Result { - // Go does not support the Legacy DDB-EC - if policy.Is_FORBID__LEGACY__ENCRYPT__FORBID__LEGACY__DECRYPT() { - return Wrappers.Companion_Result_.Create_Success_(Wrappers.Companion_Option_.Create_None_()) - } + // Go does not support the Legacy DDB-EC. So, this function will not be reached. err := &awscryptographydbencryptionsdkdynamodbitemencryptorsmithygeneratedtypes.DynamoDbItemEncryptorException{ Message: "Legacy configuration unsupported.", } @@ -35,10 +32,7 @@ func (InternalLegacyOverride) EncryptItem(config interface{}) Wrappers.Result { } func (InternalLegacyOverride) DecryptItem(config interface{}) Wrappers.Result { - // Go does not support the Legacy DDB-EC - if policy.Is_FORBID__LEGACY__ENCRYPT__FORBID__LEGACY__DECRYPT() { - return Wrappers.Companion_Result_.Create_Success_(Wrappers.Companion_Option_.Create_None_()) - } + // Go does not support the Legacy DDB-EC. So, this function will not be reached. err := &awscryptographydbencryptionsdkdynamodbitemencryptorsmithygeneratedtypes.DynamoDbItemEncryptorException{ Message: "Legacy configuration unsupported.", } From 2dd8b5857702df53ff9c32c35b0eec0b73462fed Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Tue, 3 Jun 2025 12:30:51 -0700 Subject: [PATCH 2/2] emtpy commit to run CI