clear enc key from memory on lock as well
This commit is contained in:
parent
e079b70e6a
commit
6e9d4e8d6e
|
@ -284,13 +284,18 @@ function initCryptoService(constantsService) {
|
||||||
return deferred.promise;
|
return deferred.promise;
|
||||||
};
|
};
|
||||||
|
|
||||||
CryptoService.prototype.clearEncKey = function () {
|
CryptoService.prototype.clearEncKey = function (memoryOnly) {
|
||||||
var deferred = Q.defer();
|
var deferred = Q.defer();
|
||||||
|
|
||||||
_encKey = null;
|
_encKey = null;
|
||||||
|
if (memoryOnly) {
|
||||||
|
deferred.resolve();
|
||||||
|
}
|
||||||
|
else {
|
||||||
chrome.storage.local.remove('encKey', function () {
|
chrome.storage.local.remove('encKey', function () {
|
||||||
deferred.resolve();
|
deferred.resolve();
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return deferred.promise;
|
return deferred.promise;
|
||||||
};
|
};
|
||||||
|
|
|
@ -73,7 +73,8 @@ function initLockService(self) {
|
||||||
return Q.all([
|
return Q.all([
|
||||||
self.cryptoService.clearKey(),
|
self.cryptoService.clearKey(),
|
||||||
self.cryptoService.clearOrgKeys(true),
|
self.cryptoService.clearOrgKeys(true),
|
||||||
self.cryptoService.clearPrivateKey(true)
|
self.cryptoService.clearPrivateKey(true),
|
||||||
|
self.cryptoService.clearEncKey(true)
|
||||||
]).then(function () {
|
]).then(function () {
|
||||||
self.setIcon();
|
self.setIcon();
|
||||||
self.folderService.clearCache();
|
self.folderService.clearCache();
|
||||||
|
|
Loading…
Reference in New Issue