File tree 2 files changed +16
-8
lines changed
DynamoDbEncryption/dafny/DynamoDbEncryption
2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -137,14 +137,19 @@ module SearchConfigToInfo {
137
137
else
138
138
MPT. Default (Default := MPT.DefaultCache(entryCapacity := 1));
139
139
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
+ }
148
153
149
154
if config. multi? {
150
155
:- 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 {
181
181
ensures output. keyStore. ValidState ()
182
182
ensures fresh (output. keyStore. Modifies)
183
183
ensures output. version == 1
184
+ ensures
185
+ && output. keySource. multi?
186
+ && output. keySource. multi. cache. None?
184
187
{
185
188
var store := GetKeyStore ();
186
189
return BeaconVersion (
You can’t perform that action at this time.
0 commit comments