@@ -274,15 +274,15 @@ export class BranchKeyStoreNode implements IBranchKeyStoreNode {
274
274
needs (
275
275
activeEncryptedBranchKey . type instanceof
276
276
ActiveHierarchicalSymmetricVersion ,
277
- 'Unexpected type. Not an version record.'
277
+ 'Unexpected type. Not a version record.'
278
278
)
279
279
280
280
//= aws-encryption-sdk-specification/framework/branch-key-store.md#getactivebranchkey
281
281
//# GetActiveBranchKey MUST verify that the returned EncryptedHierarchicalKey MUST have a logical table name equal to the configured logical table name.
282
282
needs (
283
283
activeEncryptedBranchKey . encryptionContext [ TABLE_FIELD ] ==
284
284
this . logicalKeyStoreName ,
285
- 'Unexpected logical table name.'
285
+ 'Unexpected logical table name. Expected ${this.logicalKeyStoreName}, found ${activeEncryptedBranchKey.encryptionContext[TABLE_FIELD]}. '
286
286
)
287
287
288
288
//= aws-encryption-sdk-specification/framework/branch-key-store.md#getactivebranchkey
@@ -319,7 +319,7 @@ export class BranchKeyStoreNode implements IBranchKeyStoreNode {
319
319
'MUST supply a string branch key id'
320
320
)
321
321
needs (
322
- branchKeyId && branchKeyVersion ,
322
+ branchKeyVersion && typeof branchKeyVersion === 'string ,
323
323
' MUST supply a string branch key version '
324
324
)
325
325
@@ -352,15 +352,15 @@ export class BranchKeyStoreNode implements IBranchKeyStoreNode {
352
352
//# GetActiveBranchKey MUST verify that the returned EncryptedHierarchicalKey is an HierarchicalSymmetricVersion.
353
353
needs (
354
354
encryptedBranchKey . type instanceof HierarchicalSymmetricVersion ,
355
- 'Unexpected type. Not an version record.'
355
+ 'Unexpected type. Not a version record.'
356
356
)
357
357
358
358
//= aws-encryption-sdk-specification/framework/branch-key-store.md#getbranchkeyversion
359
359
//# GetBranchKeyVersion MUST verify that the returned EncryptedHierarchicalKey MUST have a logical table name equal to the configured logical table name.
360
360
needs (
361
361
encryptedBranchKey . encryptionContext [ TABLE_FIELD ] ==
362
362
this . logicalKeyStoreName ,
363
- 'Unexpected logical table name.'
363
+ 'Unexpected logical table name. Expected ${this.logicalKeyStoreName}, found ${encryptedBranchKey.encryptionContext[TABLE_FIELD}. '
364
364
)
365
365
366
366
//= aws-encryption-sdk-specification/framework/branch-key-store.md#getbranchkeyversion
0 commit comments