1
0
mirror of https://github.com/moparisthebest/mail synced 2025-01-10 13:07:59 -05:00

catch error in pgp decryption

This commit is contained in:
Tankred Hase 2014-02-28 17:51:08 +01:00
parent cdd467f4bd
commit da7d42cb33

View File

@ -223,6 +223,14 @@ define(function(require) {
openpgp.decryptAndVerifyMessage(this._privateKey, [publicKey], message, onDecrypted);
function onDecrypted(err, decrypted) {
if (err) {
callback({
errMsg: 'Error decrypting PGP message!',
err: err
});
return;
}
// check if signatures are valid
signaturesValid = true;
decrypted.signatures.forEach(function(sig) {