Skip to content

Commit

Permalink
m
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmcdonald3 committed Dec 13, 2024
1 parent 76b9b11 commit 7975d15
Show file tree
Hide file tree
Showing 88 changed files with 10,048 additions and 0 deletions.
462 changes: 462 additions & 0 deletions TestVectors/runtimes/python/poetry.lock

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions TestVectors/runtimes/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[tool.poetry]
name = "aws-encryption-sdk-test-vectors"
version = "0.1.0"
description = ""
authors = ["AWS Crypto Tools <[email protected]>"]
packages = [
{ include = "aws_encryption_sdk_test_vectors", from = "src" }
]
# Include generated internaldafny files in package distributions,
# even though they are not included in version control
include = ["**/internaldafny/generated/*.py"]

[tool.poetry.dependencies]
python = "^3.11.0"
aws-cryptographic-material-providers = { path = "../../../mpl/AwsCryptographicMaterialProviders/runtimes/python", develop = false}
aws-cryptography-internal-mpl-testvectors = { path = "../../../mpl/TestVectorsAwsCryptographicMaterialProviders/runtimes/python", develop = false}
aws-encryption-sdk = { path = "../../../AwsEncryptionSDK/runtimes/python", develop = false}

[tool.poetry.group.test.dependencies]
pytest = "^7.4.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

# Initialize generated Dafny
from .internaldafny.generated import module_

# Initialize externs
from .internaldafny import extern
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import (
wrapped_esdk,
)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import aws_encryption_sdk_test_vectors.internaldafny.generated.WrappedESDK as WrappedESDK
import smithy_dafny_standard_library.internaldafny.generated.Wrappers as Wrappers
import aws_encryption_sdk.smithygenerated.aws_cryptography_encryptionsdk.client
import aws_encryption_sdk.smithygenerated.aws_cryptography_encryptionsdk.config
import aws_encryption_sdk.internaldafny.generated.EncryptionSdk as EncryptionSdk
import aws_encryption_sdk_test_vectors.smithygenerated.aws_cryptography_encryptionsdk.shim as shim

class default__(WrappedESDK.default__):

@staticmethod
def WrappedESDK(config):
smithy_client = aws_encryption_sdk.smithygenerated.aws_cryptography_encryptionsdk.client.AwsEncryptionSdk(
dafny_client=EncryptionSdk.default__.ESDK(config).value
)
wrapped_client = shim.ESDKShim(smithy_client)
return Wrappers.Result_Success(wrapped_client)

WrappedESDK.default__ = default__

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Dafny program the_program compiled into Python
import sys
from typing import Callable, Any, TypeVar, NamedTuple
from math import floor
from itertools import count

import aws_encryption_sdk_test_vectors.internaldafny.generated.module_ as module_
import _dafny as _dafny

try:
dafnyArgs = [_dafny.Seq(a) for a in sys.argv]
module_.default__.Test____Main____(dafnyArgs)
except _dafny.HaltException as e:
_dafny.print("[Program halted] " + e.message + "\n")
sys.exit(1)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
file_format_version = "1.0"
dafny_version = "4.9.0.0"
[options_by_module.WrappedAbstractAwsCryptographyEncryptionSdkService]
legacy-module-names = false
python-module-name = "aws_encryption_sdk_test_vectors.internaldafny.generated"
[options_by_module.WrappedESDK]
legacy-module-names = false
python-module-name = "aws_encryption_sdk_test_vectors.internaldafny.generated"
[options_by_module.EsdkManifestOptions]
legacy-module-names = false
python-module-name = "aws_encryption_sdk_test_vectors.internaldafny.generated"
[options_by_module.EsdkTestVectors]
legacy-module-names = false
python-module-name = "aws_encryption_sdk_test_vectors.internaldafny.generated"
[options_by_module.AllEsdkV4NoReqEc]
legacy-module-names = false
python-module-name = "aws_encryption_sdk_test_vectors.internaldafny.generated"
[options_by_module.AllEsdkV4WithReqEc]
legacy-module-names = false
python-module-name = "aws_encryption_sdk_test_vectors.internaldafny.generated"
[options_by_module.WriteEsdkJsonManifests]
legacy-module-names = false
python-module-name = "aws_encryption_sdk_test_vectors.internaldafny.generated"
[options_by_module.WriteVectors]
legacy-module-names = false
python-module-name = "aws_encryption_sdk_test_vectors.internaldafny.generated"
[options_by_module.ParseEsdkJsonManifest]
legacy-module-names = false
python-module-name = "aws_encryption_sdk_test_vectors.internaldafny.generated"
[options_by_module.EsdkTestManifests]
legacy-module-names = false
python-module-name = "aws_encryption_sdk_test_vectors.internaldafny.generated"
[options_by_module.WrappedESDKMain]
legacy-module-names = false
python-module-name = "aws_encryption_sdk_test_vectors.internaldafny.generated"
Loading

0 comments on commit 7975d15

Please sign in to comment.