File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
platform/encryption/electron-main
workbench/services/secrets/electron-sandbox Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,8 @@ export class EncryptionMainService implements IEncryptionMainService {
3131 }
3232
3333 async encrypt ( value : string ) : Promise < string > {
34+ this . logService . trace ( '[EncryptionMainService] Encrypting value.' ) ;
3435 try {
35- this . logService . trace ( '[EncryptionMainService] Encrypting value.' ) ;
3636 const result = JSON . stringify ( safeStorage . encryptString ( value ) ) ;
3737 this . logService . trace ( '[EncryptionMainService] Encrypted value.' ) ;
3838 return result ;
@@ -57,7 +57,14 @@ export class EncryptionMainService implements IEncryptionMainService {
5757 const bufferToDecrypt = Buffer . from ( parsedValue . data ) ;
5858
5959 this . logService . trace ( '[EncryptionMainService] Decrypting value.' ) ;
60- return safeStorage . decryptString ( bufferToDecrypt ) ;
60+ try {
61+ const result = safeStorage . decryptString ( bufferToDecrypt ) ;
62+ this . logService . trace ( '[EncryptionMainService] Decrypted value.' ) ;
63+ return result ;
64+ } catch ( e ) {
65+ this . logService . error ( e ) ;
66+ throw e ;
67+ }
6168 }
6269
6370 isEncryptionAvailable ( ) : Promise < boolean > {
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ export class NativeSecretStorageService extends BaseSecretStorageService {
4444
4545 } ) ;
4646
47- return this . _sequencer . queue ( key , ( ) => super . set ( key , value ) ) ;
47+ return super . set ( key , value ) ;
4848 }
4949
5050 private notifyOfNoEncryptionOnce = once ( ( ) => this . notifyOfNoEncryption ( ) ) ;
You can’t perform that action at this time.
0 commit comments