File tree Expand file tree Collapse file tree 2 files changed +16
-8
lines changed
DynamoDbEncryption/dafny/DynamoDbEncryption Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -137,14 +137,19 @@ module SearchConfigToInfo {
137137 else
138138 MPT. Default (Default := MPT.DefaultCache(entryCapacity := 1));
139139
140- // = specification/searchable-encryption/search-config.md#key-store-cache
141- // # For a Beacon Key Source a [CMC](../../submodules/MaterialProviders/aws-encryption-sdk-specification/framework/cryptographic-materials-cache.md)
142- // # MUST be created.
143- var input := MPT. CreateCryptographicMaterialsCacheInput (
144- cache := cacheType
145- );
146- var maybeCache := mpl. CreateCryptographicMaterialsCache (input);
147- var cache :- maybeCache. MapFailure (e => AwsCryptographyMaterialProviders(e));
140+ var cache;
141+ if cacheType. Shared? {
142+ cache := cacheType. Shared;
143+ } else {
144+ // = specification/searchable-encryption/search-config.md#key-store-cache
145+ // # For a Beacon Key Source a [CMC](../../submodules/MaterialProviders/aws-encryption-sdk-specification/framework/cryptographic-materials-cache.md)
146+ // # MUST be created.
147+ var input := MPT. CreateCryptographicMaterialsCacheInput (
148+ cache := cacheType
149+ );
150+ var maybeCache := mpl. CreateCryptographicMaterialsCache (input);
151+ cache :- maybeCache. MapFailure (e => AwsCryptographyMaterialProviders(e));
152+ }
148153
149154 if config. multi? {
150155 :- Need (0 < config.multi.cacheTTL, E("Beacon Cache TTL must be at least 1."));
Original file line number Diff line number Diff line change @@ -181,6 +181,9 @@ module BeaconTestFixtures {
181181 ensures output. keyStore. ValidState ()
182182 ensures fresh (output. keyStore. Modifies)
183183 ensures output. version == 1
184+ ensures
185+ && output. keySource. multi?
186+ && output. keySource. multi. cache. None?
184187 {
185188 var store := GetKeyStore ();
186189 return BeaconVersion (
You can’t perform that action at this time.
0 commit comments