@@ -292,31 +292,39 @@ export const processTeams = async (teams: NN<ITeam>[], storage: VaultStorage, de
292
292
}
293
293
}
294
294
295
- switch ( team . teamKeyType ) {
296
- case Records . RecordKeyType . ENCRYPTED_BY_DATA_KEY :
297
- teamPrivateKeys [ teamUid + '_priv' ] = {
298
- data : team . teamPrivateKey ,
299
- dataId : teamUid + '_priv' ,
300
- keyId : teamUid ,
301
- encryptionType : 'cbc' ,
302
- unwrappedType : 'rsa' ,
303
- }
304
- break
305
- // RSA TAGGED - this essentially changes the unwrapped type to ecc. make sure this is fine
306
- case Records . RecordKeyType . ENCRYPTED_BY_PUBLIC_KEY_ECC :
307
- teamPrivateKeys [ teamUid + '_priv' ] = {
308
- data : team . teamPrivateKey ,
309
- dataId : teamUid + '_priv' ,
310
- keyId : 'pk_ecc' ,
311
- encryptionType : 'ecc' ,
312
- unwrappedType : 'aes' ,
313
- }
314
- break
315
- default :
316
- console . error ( `Key ${ team . teamKeyType } type for team folder private key ${ teamUid } is not supported for team folder decryption` )
317
- break
295
+ teamPrivateKeys [ teamUid + '_priv' ] = {
296
+ data : team . teamPrivateKey ,
297
+ dataId : teamUid + '_priv' ,
298
+ keyId : teamUid ,
299
+ encryptionType : 'cbc' ,
300
+ unwrappedType : 'rsa' ,
318
301
}
319
302
303
+ // switch (team.teamKeyType) {
304
+ // case Records.RecordKeyType.ENCRYPTED_BY_DATA_KEY:
305
+ // teamPrivateKeys[teamUid + '_priv'] = {
306
+ // data: team.teamPrivateKey,
307
+ // dataId: teamUid + '_priv',
308
+ // keyId: teamUid,
309
+ // encryptionType: 'cbc',
310
+ // unwrappedType: 'rsa',
311
+ // }
312
+ // break
313
+ // // RSA TAGGED - this essentially changes the unwrapped type to ecc. make sure this is fine
314
+ // case Records.RecordKeyType.ENCRYPTED_BY_PUBLIC_KEY_ECC:
315
+ // teamPrivateKeys[teamUid + '_priv'] = {
316
+ // data: team.teamPrivateKey,
317
+ // dataId: teamUid + '_priv',
318
+ // keyId: 'pk_ecc',
319
+ // encryptionType: 'ecc',
320
+ // unwrappedType: 'aes',
321
+ // }
322
+ // break
323
+ // default:
324
+ // console.error(`Key ${team.teamKeyType} type for team folder private key ${teamUid} is not supported for team folder decryption`)
325
+ // break
326
+ // }
327
+
320
328
// RSA TAGGED - fix is the switch case above. need to confirm the encryptionType and unwrappedType are correct
321
329
// teamPrivateKeys[teamUid + '_priv'] = {
322
330
// data: team.teamPrivateKey,
@@ -354,15 +362,15 @@ export const processTeams = async (teams: NN<ITeam>[], storage: VaultStorage, de
354
362
unwrappedType : 'aes' ,
355
363
}
356
364
break
357
- case Records . RecordKeyType . ENCRYPTED_BY_PUBLIC_KEY_ECC :
358
- teamSharedFolderKeys [ folderUid ] = {
359
- data : folderKey . sharedFolderKey ,
360
- dataId : folderUid ,
361
- keyId : 'pk_ecc' ,
362
- encryptionType : 'ecc' ,
363
- unwrappedType : 'aes' ,
364
- }
365
- break
365
+ // case Records.RecordKeyType.ENCRYPTED_BY_PUBLIC_KEY_ECC:
366
+ // teamSharedFolderKeys[folderUid] = {
367
+ // data: folderKey.sharedFolderKey,
368
+ // dataId: folderUid,
369
+ // keyId: 'pk_ecc',
370
+ // encryptionType: 'ecc',
371
+ // unwrappedType: 'aes',
372
+ // }
373
+ // break
366
374
default :
367
375
console . error ( `Key ${ folderKey . keyType } type for team folder key ${ teamUid } /${ folderUid } is not supported for team folder decryption` )
368
376
break
0 commit comments