File tree 15 files changed +27
-23
lines changed
dafny/DynamoDbEncryptionTransforms/src
15 files changed +27
-23
lines changed Original file line number Diff line number Diff line change 63
63
uses : dafny-lang/setup-dafny-action@v1.6.1
64
64
with :
65
65
# A && B || C is the closest thing to an if .. then ... else ... or ?: expression the GitHub Actions syntax supports.
66
- dafny-version : ${{ (github.event_name == 'schedule' || inputs.nightly) && 'nightly-latest' || '4.1 .0' }}
66
+ dafny-version : ${{ (github.event_name == 'schedule' || inputs.nightly) && 'nightly-latest' || '4.2 .0' }}
67
67
68
68
- name : Build and locally deploy dependencies for examples
69
69
shell : bash
Original file line number Diff line number Diff line change 59
59
uses : dafny-lang/setup-dafny-action@v1.6.1
60
60
with :
61
61
# A && B || C is the closest thing to an if .. then ... else ... or ?: expression the GitHub Actions syntax supports.
62
- dafny-version : ${{ (github.event_name == 'schedule' || inputs.nightly) && 'nightly-latest' || '4.1 .0' }}
62
+ dafny-version : ${{ (github.event_name == 'schedule' || inputs.nightly) && 'nightly-latest' || '4.2 .0' }}
63
63
64
64
- name : Setup Java ${{ matrix.java-version }}
65
65
uses : actions/setup-java@v3
Original file line number Diff line number Diff line change 60
60
uses : dafny-lang/setup-dafny-action@v1.6.1
61
61
with :
62
62
# A && B || C is the closest thing to an if .. then ... else ... or ?: expression the GitHub Actions syntax supports.
63
- dafny-version : ${{ (github.event_name == 'schedule' || inputs.nightly) && 'nightly-latest' || '4.1 .0' }}
63
+ dafny-version : ${{ (github.event_name == 'schedule' || inputs.nightly) && 'nightly-latest' || '4.2 .0' }}
64
64
65
65
- name : Download Dependencies
66
66
working-directory : ./${{ matrix.library }}
Original file line number Diff line number Diff line change 41
41
- name : Setup Dafny
42
42
uses : dafny-lang/setup-dafny-action@v1.6.1
43
43
with :
44
- dafny-version : ' 4.1 .0'
44
+ dafny-version : ' 4.2 .0'
45
45
46
46
- name : Setup Java ${{ matrix.java-version }}
47
47
uses : actions/setup-java@v3
Original file line number Diff line number Diff line change 50
50
uses : dafny-lang/setup-dafny-action@v1.6.1
51
51
with :
52
52
# A && B || C is the closest thing to an if .. then ... else ... or ?: expression the GitHub Actions syntax supports.
53
- dafny-version : ${{ (github.event_name == 'schedule' || inputs.nightly) && 'nightly-latest' || '4.1 .0' }}
53
+ dafny-version : ${{ (github.event_name == 'schedule' || inputs.nightly) && 'nightly-latest' || '4.2 .0' }}
54
54
55
55
- name : Verify ${{ matrix.library }} Dafny code
56
56
shell : bash
Original file line number Diff line number Diff line change 1
1
[submodule "submodules/MaterialProviders "]
2
2
path = submodules/MaterialProviders
3
- url = https://github.com/aws/aws-cryptographic-material-providers-library-java .git
3
+ url = https://github.com/aws/aws-cryptographic-material-providers-library-dafny .git
4
4
[submodule "submodules/smithy-dafny "]
5
5
path = submodules/smithy-dafny
6
6
url = https://github.com/awslabs/smithy-dafny.git
Original file line number Diff line number Diff line change @@ -41,12 +41,15 @@ module ExecuteTransactionTransform {
41
41
{
42
42
for i := 0 to |input. sdkInput. TransactStatements|
43
43
invariant forall x : nat | 0 <= x < i ::
44
- var statement := DdbStatement. TableFromStatement (input.sdkInput.TransactStatements[x].Statement);
45
- statement . Success? && statement . value ! in config. tableEncryptionConfigs;
44
+ var tableName := DdbStatement. TableFromStatement (input.sdkInput.TransactStatements[x].Statement);
45
+ tableName . Success? && tableName . value ! in config. tableEncryptionConfigs
46
46
{
47
47
var statement := input. sdkInput. TransactStatements[i]. Statement;
48
- var tableName :- MapString (DdbStatement.TableFromStatement(statement));
49
- if tableName in config. tableEncryptionConfigs {
48
+ var tableName := DdbStatement. TableFromStatement (statement);
49
+ if tableName. Failure? {
50
+ return Failure (Error.DynamoDbEncryptionTransformsException(message := tableName.error));
51
+ }
52
+ if tableName. value in config. tableEncryptionConfigs {
50
53
return MakeError ("ExecuteTransaction not Supported on encrypted tables.");
51
54
}
52
55
}
Original file line number Diff line number Diff line change 5
5
<ImplicitUsings >enable</ImplicitUsings >
6
6
<Nullable >disable</Nullable >
7
7
<LangVersion >10</LangVersion >
8
- <TargetFrameworks >net6.0</TargetFrameworks >
8
+ <TargetFrameworks >net6.0;net48 </TargetFrameworks >
9
9
<EnableDefaultCompileItems >false</EnableDefaultCompileItems >
10
10
</PropertyGroup >
11
11
12
12
<ItemGroup >
13
13
<PackageReference Include =" AWSSDK.Core" Version =" 3.7.103" />
14
14
<PackageReference Include =" DafnyRuntime" Version =" 4.2.0" />
15
- <PackageReference Include =" Portable. BouncyCastle" Version =" 1.8.5.2 " />
15
+ <PackageReference Include =" BouncyCastle.Cryptography " Version =" 2.2.1 " />
16
16
<!--
17
17
System.Collections.Immutable can be removed once dafny.msbuild is updated with
18
18
https://github.com/dafny-lang/dafny.msbuild/pull/10 and versioned
27
27
</ItemGroup >
28
28
29
29
<ItemGroup >
30
- <ProjectReference Include =" ../../../submodules/MaterialProviders/AwsCryptographicMaterialProviders/runtimes/net/MPL.csproj" />
31
- <ProjectReference Include =" ../../../submodules/MaterialProviders/AwsCryptographyPrimitives/runtimes/net/Crypto.csproj" />
32
- <ProjectReference Include =" ../../../submodules/MaterialProviders/ComAmazonawsKms/runtimes/net/AWS-KMS.csproj" />
33
- <ProjectReference Include =" ../../../submodules/MaterialProviders/ComAmazonawsDynamodb/runtimes/net/ComAmazonawsDynamodb.csproj" />
30
+ <PackageReference Include =" AWS.Cryptography.Internal.StandardLibrary" Version =" 1.1.1" />
31
+ <PackageReference Include =" AWS.Cryptography.MaterialProviders" Version =" 1.0.0" />
32
+ <PackageReference Include =" AWS.Cryptography.Internal.AwsCryptographyPrimitives" Version =" 1.0.0" />
33
+ <PackageReference Include =" AWS.Cryptography.Internal.ComAmazonawsDynamodb" Version =" 1.0.0" />
34
+ <PackageReference Include =" AWS.Cryptography.Internal.ComAmazonawsKms" Version =" 1.0.0" />
34
35
</ItemGroup >
35
36
36
37
<!--
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ This validates the Database Encryption SDK's cross-version compatibility.
7
7
8
8
### Development Requirements
9
9
10
- * Dafny 4.1 .0: https://github.com/dafny-lang/dafny
10
+ * Dafny 4.2 .0: https://github.com/dafny-lang/dafny
11
11
12
12
The code that executes the test vectors is written in Dafny.
13
13
You must install the Dafny runtime to compile the Dafny tests into Java.
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ phases:
21
21
commands :
22
22
- cd ..
23
23
# Get Dafny
24
- - curl https://github.com/dafny-lang/dafny/releases/download/v4.1 .0/dafny-4.1 .0-x64-ubuntu-20.04.zip -L -o dafny.zip
24
+ - curl https://github.com/dafny-lang/dafny/releases/download/v4.2 .0/dafny-4.2 .0-x64-ubuntu-20.04.zip -L -o dafny.zip
25
25
- unzip -qq dafny.zip && rm dafny.zip
26
26
- export PATH="$PWD/dafny:$PATH"
27
27
# Get Gradle 7.6
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ phases:
14
14
commands :
15
15
- cd ..
16
16
# Get Dafny
17
- - curl https://github.com/dafny-lang/dafny/releases/download/v4.1 .0/dafny-4.1 .0-x64-ubuntu-20.04.zip -L -o dafny.zip
17
+ - curl https://github.com/dafny-lang/dafny/releases/download/v4.2 .0/dafny-4.2 .0-x64-ubuntu-20.04.zip -L -o dafny.zip
18
18
- unzip -qq dafny.zip && rm dafny.zip
19
19
- export PATH="$PWD/dafny:$PATH"
20
20
# Get Gradle 7.6
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ phases:
21
21
commands :
22
22
- cd ..
23
23
# Get Dafny
24
- - curl https://github.com/dafny-lang/dafny/releases/download/v4.1 .0/dafny-4.1 .0-x64-ubuntu-20.04.zip -L -o dafny.zip
24
+ - curl https://github.com/dafny-lang/dafny/releases/download/v4.2 .0/dafny-4.2 .0-x64-ubuntu-20.04.zip -L -o dafny.zip
25
25
- unzip -qq dafny.zip && rm dafny.zip
26
26
- export PATH="$PWD/dafny:$PATH"
27
27
# Get Gradle 7.6
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ phases:
18
18
commands :
19
19
- cd ..
20
20
# Get Dafny
21
- - curl https://github.com/dafny-lang/dafny/releases/download/v4.1 .0/dafny-4.1 .0-x64-ubuntu-20.04.zip -L -o dafny.zip
21
+ - curl https://github.com/dafny-lang/dafny/releases/download/v4.2 .0/dafny-4.2 .0-x64-ubuntu-20.04.zip -L -o dafny.zip
22
22
- unzip -qq dafny.zip && rm dafny.zip
23
23
- export PATH="$PWD/dafny:$PATH"
24
24
# Get Gradle 7.6
Original file line number Diff line number Diff line change 1
1
projectJavaVersion =3.1.0
2
2
mplDependencyJavaVersion =1.0.0
3
- dafnyRuntimeJavaVersion =4.1 .0
3
+ dafnyRuntimeJavaVersion =4.2 .0
4
4
smithyDafnyJavaConversionVersion =0.1
You can’t perform that action at this time.
0 commit comments