diff --git a/.github/workflows/library_interop_tests.yml b/.github/workflows/library_interop_tests.yml index 8e6beaca8..40e7a1924 100644 --- a/.github/workflows/library_interop_tests.yml +++ b/.github/workflows/library_interop_tests.yml @@ -193,17 +193,6 @@ jobs: # # # NET_41_VECTOR_PATH=$GITHUB_WORKSPACE/net41/vectors # # Set-Location -Path "$env:GITHUB_WORKSPACE\net41\vectors" # # Compress-Archive -Path "$env:GITHUB_WORKSPACE\net41\vectors\*" -DestinationPath "$env:GITHUB_WORKSPACE\net41\vectors\net41.zip" - - - name: Fetch Python 2.3.0 Test Vectors - working-directory: ./ - shell: bash - run: | - PYTHON_23_VECTOR_PATH=$GITHUB_WORKSPACE/python23/vectors - mkdir -p $PYTHON_23_VECTOR_PATH - DOWNLOAD_NAME=python23.zip - curl --no-progress-meter --output $DOWNLOAD_NAME --location $VECTORS_URL - unzip -o -qq $DOWNLOAD_NAME -d $PYTHON_23_VECTOR_PATH - rm $DOWNLOAD_NAME - name: Generate Test Vectors with .NET Framework net6.0 # TODO Post-#619: Fix Zip file creation on Windows @@ -214,8 +203,6 @@ jobs: NET_41_VECTOR_PATH=net41/vectors mkdir -p $NET_41_VECTOR_PATH GEN_PATH=runtimes/net/TestVectorsNative/TestVectorGenerator - PYTHON_23_VECTOR_PATH=$GITHUB_WORKSPACE/python23/vectors - DAFNY_AWS_ESDK_TEST_VECTOR_MANIFEST_PATH="$PYTHON_23_VECTOR_PATH/manifest.json" \ dotnet run --project $GEN_PATH --framework net6.0 -- \ --encrypt-manifest $GEN_PATH/resources/0006-awses-message-decryption-generation.v2.json \ --output-dir $NET_41_VECTOR_PATH diff --git a/AwsEncryptionSDK/runtimes/net/TestVectorsNative/TestVectorLib/MaterialProviderFactory.cs b/AwsEncryptionSDK/runtimes/net/TestVectorsNative/TestVectorLib/MaterialProviderFactory.cs index ac7e36a89..30875bd49 100644 --- a/AwsEncryptionSDK/runtimes/net/TestVectorsNative/TestVectorLib/MaterialProviderFactory.cs +++ b/AwsEncryptionSDK/runtimes/net/TestVectorsNative/TestVectorLib/MaterialProviderFactory.cs @@ -166,20 +166,6 @@ private static IKeyring CreateKeyring(MasterKey keyInfo, Key key, CryptoOperatio } if (keyInfo.Type == "aws-kms-hierarchy") { - // Convert JSON to bytes for KeyVectors input - string jsonString = JsonConvert.SerializeObject(keyInfo); - - var stream = new MemoryStream(); - var writer = new StreamWriter(stream); - writer.Write(jsonString); - writer.Flush(); - stream.Position = 0; - - // Create KeyVectors keyring - var getKeyDescriptionInput = new GetKeyDescriptionInput - { - Json = stream - }; // Lazily create a singleton KeyVectors client. // KeyVectors manifest is only required if a test vector specifies a hierarchy keyring. @@ -202,6 +188,21 @@ private static IKeyring CreateKeyring(MasterKey keyInfo, Key key, CryptoOperatio singletonKeyVectors = new(keyVectorsConfig); } + // Convert JSON to bytes for KeyVectors input + string jsonString = JsonConvert.SerializeObject(keyInfo); + + var stream = new MemoryStream(); + var writer = new StreamWriter(stream); + writer.Write(jsonString); + writer.Flush(); + stream.Position = 0; + + // Create KeyVectors keyring + var getKeyDescriptionInput = new GetKeyDescriptionInput + { + Json = stream + }; + var desc = singletonKeyVectors.GetKeyDescription(getKeyDescriptionInput); var testVectorKeyringInput = new TestVectorKeyringInput