Skip to content

Commit 8849c1e

Browse files
authored
chore: remove assert to fix verification (#1360)
1 parent 303a8bd commit 8849c1e

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

DynamoDbEncryption/dafny/DynamoDbEncryptionTransforms/src/QueryTransform.dfy

-10
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,6 @@ module QueryTransform {
9292
var decryptRes := tableConfig.itemEncryptor.DecryptItem(decryptInput);
9393
var decrypted :- MapError(decryptRes);
9494

95-
// If the decrypted result was plaintext, i.e. has no parsedHeader
96-
// then this is expected IFF the table config allows plaintext read
97-
assert decrypted.parsedHeader.None? ==>
98-
&& EncOps.IsPlaintextItem(encryptedItems[x])
99-
&& !tableConfig.plaintextOverride.FORBID_PLAINTEXT_WRITE_FORBID_PLAINTEXT_READ?
100-
&& (
101-
|| tableConfig.plaintextOverride.FORBID_PLAINTEXT_WRITE_ALLOW_PLAINTEXT_READ?
102-
|| tableConfig.plaintextOverride.FORCE_PLAINTEXT_WRITE_ALLOW_PLAINTEXT_READ?
103-
);
104-
10595
if keyId.KeyId? && decrypted.parsedHeader.Some? {
10696
:- Need(|decrypted.parsedHeader.value.encryptedDataKeys| == 1, E("Query result has more than one Encrypted Data Key"));
10797
if decrypted.parsedHeader.value.encryptedDataKeys[0].keyProviderInfo == keyIdUtf8 {

DynamoDbEncryption/dafny/DynamoDbEncryptionTransforms/src/ScanTransform.dfy

-10
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,6 @@ module ScanTransform {
9090
var decryptRes := tableConfig.itemEncryptor.DecryptItem(decryptInput);
9191
var decrypted :- MapError(decryptRes);
9292

93-
// If the decrypted result was plaintext, i.e. has no parsedHeader
94-
// then this is expected IFF the table config allows plaintext read
95-
assert decrypted.parsedHeader.None? ==>
96-
&& EncOps.IsPlaintextItem(encryptedItems[x])
97-
&& !tableConfig.plaintextOverride.FORBID_PLAINTEXT_WRITE_FORBID_PLAINTEXT_READ?
98-
&& (
99-
|| tableConfig.plaintextOverride.FORBID_PLAINTEXT_WRITE_ALLOW_PLAINTEXT_READ?
100-
|| tableConfig.plaintextOverride.FORCE_PLAINTEXT_WRITE_ALLOW_PLAINTEXT_READ?
101-
);
102-
10393
if keyId.KeyId? && decrypted.parsedHeader.Some? {
10494
:- Need(|decrypted.parsedHeader.value.encryptedDataKeys| == 1, E("Scan result has more than one Encrypted Data Key"));
10595
if decrypted.parsedHeader.value.encryptedDataKeys[0].keyProviderInfo == keyIdUtf8 {

0 commit comments

Comments
 (0)