OpenPgp: small improvements

This commit is contained in:
RainLoop Team 2015-09-01 22:50:30 +03:00
parent fc827326c4
commit d6d19c99bf
6 changed files with 28 additions and 13 deletions

View file

@ -7,6 +7,7 @@
_ = require('_'),
ko = require('ko'),
key = require('key'),
$ = require('$'),
Utils = require('Common/Utils'),
Enums = require('Common/Enums'),
@ -61,18 +62,25 @@ _.delay(_.bind(function() {
{
if (!oPrivateKey.decrypt(Utils.pString(this.password())))
{
Utils.log('Error: Private key cannot be decrypted');
oPrivateKey = null;
}
}
catch (e)
{
Utils.log(e);
oPrivateKey = null;
}
}
else
{
Utils.log('Error: Private key cannot be found');
}
}
}
catch (oExc)
catch (e)
{
Utils.log(e);
oPrivateKey = null;
}