Skip to content

Commit de3a9f3

Browse files
authoredOct 6, 2023
chore: update MPL submodule (#476)
* chore: update MPL submodule, bouncycastle, Dafny 4.2
1 parent 00899ee commit de3a9f3

File tree

15 files changed

+27
-23
lines changed

15 files changed

+27
-23
lines changed
 

‎.github/workflows/ci_examples_java.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
uses: dafny-lang/setup-dafny-action@v1.6.1
6464
with:
6565
# 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' }}
6767

6868
- name: Build and locally deploy dependencies for examples
6969
shell: bash

‎.github/workflows/ci_test_java.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
uses: dafny-lang/setup-dafny-action@v1.6.1
6060
with:
6161
# 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' }}
6363

6464
- name: Setup Java ${{ matrix.java-version }}
6565
uses: actions/setup-java@v3

‎.github/workflows/ci_test_net.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
uses: dafny-lang/setup-dafny-action@v1.6.1
6161
with:
6262
# 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' }}
6464

6565
- name: Download Dependencies
6666
working-directory: ./${{ matrix.library }}

‎.github/workflows/ci_test_vector_java.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: Setup Dafny
4242
uses: dafny-lang/setup-dafny-action@v1.6.1
4343
with:
44-
dafny-version: '4.1.0'
44+
dafny-version: '4.2.0'
4545

4646
- name: Setup Java ${{ matrix.java-version }}
4747
uses: actions/setup-java@v3

‎.github/workflows/ci_verification.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
uses: dafny-lang/setup-dafny-action@v1.6.1
5151
with:
5252
# 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' }}
5454

5555
- name: Verify ${{ matrix.library }} Dafny code
5656
shell: bash

‎.gitmodules

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[submodule "submodules/MaterialProviders"]
22
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
44
[submodule "submodules/smithy-dafny"]
55
path = submodules/smithy-dafny
66
url = https://github.com/awslabs/smithy-dafny.git

‎DynamoDbEncryption/dafny/DynamoDbEncryptionTransforms/src/ExecuteTransactionTransform.dfy

+7-4
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,15 @@ module ExecuteTransactionTransform {
4141
{
4242
for i := 0 to |input.sdkInput.TransactStatements|
4343
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
4646
{
4747
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 {
5053
return MakeError("ExecuteTransaction not Supported on encrypted tables.");
5154
}
5255
}

‎DynamoDbEncryption/runtimes/net/DynamoDbEncryption.csproj

+7-6
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>disable</Nullable>
77
<LangVersion>10</LangVersion>
8-
<TargetFrameworks>net6.0</TargetFrameworks>
8+
<TargetFrameworks>net6.0;net48</TargetFrameworks>
99
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
1010
</PropertyGroup>
1111

1212
<ItemGroup>
1313
<PackageReference Include="AWSSDK.Core" Version="3.7.103" />
1414
<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" />
1616
<!--
1717
System.Collections.Immutable can be removed once dafny.msbuild is updated with
1818
https://github.com/dafny-lang/dafny.msbuild/pull/10 and versioned
@@ -27,10 +27,11 @@
2727
</ItemGroup>
2828

2929
<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" />
3435
</ItemGroup>
3536

3637
<!--

‎TestVectors/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This validates the Database Encryption SDK's cross-version compatibility.
77

88
### Development Requirements
99

10-
* Dafny 4.1.0: https://github.com/dafny-lang/dafny
10+
* Dafny 4.2.0: https://github.com/dafny-lang/dafny
1111

1212
The code that executes the test vectors is written in Dafny.
1313
You must install the Dafny runtime to compile the Dafny tests into Java.

‎codebuild/release/release-prod.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ phases:
2121
commands:
2222
- cd ..
2323
# 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
2525
- unzip -qq dafny.zip && rm dafny.zip
2626
- export PATH="$PWD/dafny:$PATH"
2727
# Get Gradle 7.6

‎codebuild/release/validate-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ phases:
1414
commands:
1515
- cd ..
1616
# 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
1818
- unzip -qq dafny.zip && rm dafny.zip
1919
- export PATH="$PWD/dafny:$PATH"
2020
# Get Gradle 7.6

‎codebuild/staging/release-staging.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ phases:
2121
commands:
2222
- cd ..
2323
# 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
2525
- unzip -qq dafny.zip && rm dafny.zip
2626
- export PATH="$PWD/dafny:$PATH"
2727
# Get Gradle 7.6

‎codebuild/staging/validate-staging.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ phases:
1818
commands:
1919
- cd ..
2020
# 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
2222
- unzip -qq dafny.zip && rm dafny.zip
2323
- export PATH="$PWD/dafny:$PATH"
2424
# Get Gradle 7.6

‎project.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
projectJavaVersion=3.1.0
22
mplDependencyJavaVersion=1.0.0
3-
dafnyRuntimeJavaVersion=4.1.0
3+
dafnyRuntimeJavaVersion=4.2.0
44
smithyDafnyJavaConversionVersion=0.1

0 commit comments

Comments
 (0)
Please sign in to comment.