@@ -130,9 +130,9 @@ module BeaconTestFixtures {
130
130
var keyStoreConfig := KTypes. KeyStoreConfig (
131
131
id := None,
132
132
kmsConfiguration := kmsConfig,
133
- logicalKeyStoreName := "foo ",
133
+ logicalKeyStoreName := "KeyStoreDdbTable ",
134
134
grantTokens := None,
135
- ddbTableName := "foo ",
135
+ ddbTableName := "KeyStoreDdbTable ",
136
136
ddbClient := Some(ddbClient),
137
137
kmsClient := Some (kmsClient)
138
138
);
@@ -177,6 +177,24 @@ module BeaconTestFixtures {
177
177
);
178
178
}
179
179
180
+ method GetLotsaBeaconsMulti () returns (output : BeaconVersion)
181
+ ensures output. keyStore. ValidState ()
182
+ ensures fresh (output. keyStore. Modifies)
183
+ ensures output. version == 1
184
+ {
185
+ var store := GetKeyStore ();
186
+ return BeaconVersion (
187
+ version := 1,
188
+ keyStore := store,
189
+ keySource := multi(MultiKeyStore(keyFieldName := "TheKeyField", cacheTTL := 42)),
190
+ standardBeacons := [std2, std4, std6, NameTitleBeacon, NameB, TitleB],
191
+ compoundBeacons := Some ([NameTitle, YearName, Mixed, JustSigned]),
192
+ virtualFields := Some ([NameTitleField]),
193
+ encryptedParts := None,
194
+ signedParts := None
195
+ );
196
+ }
197
+
180
198
const EmptyTableConfig := DynamoDbTableEncryptionConfig (
181
199
logicalTableName := "Foo",
182
200
partitionKeyName := "foo",
@@ -200,7 +218,8 @@ module BeaconTestFixtures {
200
218
"Title" := SE. ENCRYPT_AND_SIGN,
201
219
"TooBad" := SE. ENCRYPT_AND_SIGN,
202
220
"Year" := SE. SIGN_ONLY,
203
- "Date" := SE. SIGN_ONLY
221
+ "Date" := SE. SIGN_ONLY,
222
+ "TheKeyField" := SE. SIGN_ONLY
204
223
]
205
224
)
206
225
@@ -223,6 +242,21 @@ module BeaconTestFixtures {
223
242
return SI. KeySource (client, version.keyStore, SI.LiteralLoc(keys), cache, 0);
224
243
}
225
244
245
+ method GetMultiSource (keyName : string , version : BeaconVersion ) returns (output : SI. KeySource)
246
+ requires version. keyStore. ValidState ()
247
+ ensures output. ValidState ()
248
+ ensures version. keyStore == output. store
249
+ ensures fresh (output. client. Modifies)
250
+ {
251
+ var client :- expect Primitives. AtomicPrimitives ();
252
+ var mpl :- expect MaterialProviders. MaterialProviders ();
253
+ var input := MPT. CreateCryptographicMaterialsCacheInput (
254
+ cache := MPT.Default(Default := MPT.DefaultCache(entryCapacity := 3))
255
+ );
256
+ var cache :- expect mpl. CreateCryptographicMaterialsCache (input);
257
+ return SI. KeySource (client, version.keyStore, SI.MultiLoc(keyName, false), cache, 0);
258
+ }
259
+
226
260
const SimpleItem : DDB. AttributeMap := map [
227
261
"std2" := Std2String,
228
262
"std4" := Std4String,
0 commit comments