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 {
31
31
}
32
32
33
33
async encrypt ( value : string ) : Promise < string > {
34
+ this . logService . trace ( '[EncryptionMainService] Encrypting value.' ) ;
34
35
try {
35
- this . logService . trace ( '[EncryptionMainService] Encrypting value.' ) ;
36
36
const result = JSON . stringify ( safeStorage . encryptString ( value ) ) ;
37
37
this . logService . trace ( '[EncryptionMainService] Encrypted value.' ) ;
38
38
return result ;
@@ -57,7 +57,14 @@ export class EncryptionMainService implements IEncryptionMainService {
57
57
const bufferToDecrypt = Buffer . from ( parsedValue . data ) ;
58
58
59
59
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
+ }
61
68
}
62
69
63
70
isEncryptionAvailable ( ) : Promise < boolean > {
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ export class NativeSecretStorageService extends BaseSecretStorageService {
44
44
45
45
} ) ;
46
46
47
- return this . _sequencer . queue ( key , ( ) => super . set ( key , value ) ) ;
47
+ return super . set ( key , value ) ;
48
48
}
49
49
50
50
private notifyOfNoEncryptionOnce = once ( ( ) => this . notifyOfNoEncryption ( ) ) ;
You can’t perform that action at this time.
0 commit comments