File tree Expand file tree Collapse file tree 4 files changed +18
-19
lines changed
WrappedDynamoDbItemEncryptor/src Expand file tree Collapse file tree 4 files changed +18
-19
lines changed Original file line number Diff line number Diff line change 4
4
include "LibraryIndex. dfy"
5
5
include "TestVectors. dfy"
6
6
include "WriteSetPermutations. dfy"
7
+ include ".. / .. / WrappedDynamoDbItemEncryptor/ src/ Index. dfy"
7
8
8
9
module WrappedDDBEncryptionMain {
9
10
import opened Wrappers
@@ -16,6 +17,7 @@ module WrappedDDBEncryptionMain {
16
17
import opened JSONHelpers
17
18
import KeyVectors
18
19
import KeyVectorsTypes = AwsCryptographyMaterialProvidersTestVectorKeysTypes
20
+ import WrappedItemEncryptor
19
21
20
22
21
23
const DEFAULT_KEYS : string := ".. / .. / .. / submodules/ MaterialProviders/ TestVectorsAwsCryptographicMaterialProviders/ dafny/ TestVectorsAwsCryptographicMaterialProviders/ test/ keys. json"
Original file line number Diff line number Diff line change 3
3
// Empty stub expected by Smithy-Dafny
4
4
5
5
include ".. / .. / .. / .. / DynamoDbEncryption/ dafny/ DynamoDbItemEncryptor/ src/ Index. dfy"
6
- module {:extern "software. amazon. cryptography. dbencryptionsdk. dynamodb. itemencryptor. internaldafny. wrapped" } WrappedItemEncryptor refines WrappedAbstractAwsCryptographyDbEncryptionSdkDynamoDbItemEncryptorService {}
6
+ include ".. / Model/ AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptorTypesWrapped. dfy"
7
+ module {:extern "software. amazon. cryptography. dbencryptionsdk. dynamodb. itemencryptor. internaldafny. wrapped" } WrappedItemEncryptor refines WrappedAbstractAwsCryptographyDbEncryptionSdkDynamoDbItemEncryptorService {
8
+
9
+ import ComAmazonawsDynamodbTypes
10
+
11
+ import DynamoDbItemEncryptor
12
+
13
+ function method WrappedDefaultDynamoDbItemEncryptorConfig (): DynamoDbItemEncryptorConfig
14
+ {
15
+ DynamoDbItemEncryptor. DefaultDynamoDbItemEncryptorConfig ()
16
+ }
17
+ }
Original file line number Diff line number Diff line change @@ -18,20 +18,7 @@ impl _CreateWrappedItemEncryptor_Compile::_default {
18
18
pub fn CreateWrappedItemEncryptor (
19
19
config : & Rc < crate :: implementation_from_dafny:: software:: amazon:: cryptography:: dbencryptionsdk:: dynamodb:: itemencryptor:: internaldafny:: types:: DynamoDbItemEncryptorConfig >
20
20
) -> Rc < _Wrappers_Compile:: Result < Object < dyn IDynamoDbItemEncryptorClient > , Rc < Error > > > {
21
- let native_config = crate :: deps:: aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor:: conversions:: dynamo_db_item_encryptor_config:: _dynamo_db_item_encryptor_config:: plain_from_dafny ( config) ;
22
-
23
- let item_encryptor = match item_encryptor_client:: Client :: from_conf ( native_config) {
24
- Ok ( client) => client,
25
- Err ( e) => return Rc :: new ( crate :: r#_Wrappers_Compile:: Result :: Failure {
26
- error : error:: to_dafny ( e) ,
27
- } ) ,
28
- } ;
29
-
30
- let wrapped_encryptor = wrapped_item_encryptor_client:: Client { wrapped : item_encryptor} ;
31
- let dafny_encryptor = :: dafny_runtime:: upcast_object ( ) ( :: dafny_runtime:: object:: new ( wrapped_encryptor) ) ;
32
-
33
- Rc :: new ( crate :: r#_Wrappers_Compile:: Result :: Success {
34
- value : dafny_encryptor,
35
- } )
21
+ // from_conf converts Dafny config to native, constructs a native client, and wraps it in a Dafny client
22
+ return wrapped_item_encryptor_client:: Client :: from_conf ( config) ;
36
23
}
37
24
}
Original file line number Diff line number Diff line change @@ -14,15 +14,14 @@ pub mod operation;
14
14
pub mod types;
15
15
pub mod validation;
16
16
pub mod intercept;
17
-
18
- // removed wrapped-client feature using sed;
19
- // removed wrapped module using sed;
17
+ pub mod wrapped;
20
18
21
19
mod standard_library_conversions;
22
20
mod standard_library_externs;
23
21
24
22
pub use client:: Client ;
25
23
24
+ pub use crate :: deps:: aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor;
26
25
pub use crate :: deps:: aws_cryptography_dbEncryptionSdk_structuredEncryption;
27
26
pub use crate :: deps:: aws_cryptography_keyStore;
28
27
pub use crate :: deps:: aws_cryptography_materialProviders;
You can’t perform that action at this time.
0 commit comments