mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 06:27:02 +03:00
Update openpgpjs (1.2.0 -> 2.3.0) (#1023)
This commit is contained in:
parent
125d4e0282
commit
a655b94aba
19 changed files with 20792 additions and 195 deletions
|
|
@ -184,15 +184,28 @@
|
|||
{
|
||||
if (oPrivateKey && 0 === aPublicKeys.length)
|
||||
{
|
||||
oPromise = PgpStore.openpgp.signClearMessage([oPrivateKey], self.text());
|
||||
// oPromise = PgpStore.openpgp.signClearMessage([oPrivateKey], self.text()); // 1.2.0
|
||||
oPromise = PgpStore.openpgp.sign({
|
||||
data: self.text(),
|
||||
privateKeys: [oPrivateKey]
|
||||
});
|
||||
}
|
||||
else if (oPrivateKey && 0 < aPublicKeys.length)
|
||||
{
|
||||
oPromise = PgpStore.openpgp.signAndEncryptMessage(aPublicKeys, oPrivateKey, self.text());
|
||||
// oPromise = PgpStore.openpgp.signAndEncryptMessage(aPublicKeys, oPrivateKey, self.text()); // 1.2.0
|
||||
oPromise = PgpStore.openpgp.encrypt({
|
||||
data: self.text(),
|
||||
publicKeys: aPublicKeys,
|
||||
privateKeys: [oPrivateKey]
|
||||
});
|
||||
}
|
||||
else if (!oPrivateKey && 0 < aPublicKeys.length)
|
||||
{
|
||||
oPromise = PgpStore.openpgp.encryptMessage(aPublicKeys, self.text());
|
||||
// oPromise = PgpStore.openpgp.encryptMessage(aPublicKeys, self.text()); // 1.2.0
|
||||
oPromise = PgpStore.openpgp.encrypt({
|
||||
data: self.text(),
|
||||
publicKeys: aPublicKeys
|
||||
});
|
||||
}
|
||||
}
|
||||
catch (e)
|
||||
|
|
@ -210,7 +223,7 @@
|
|||
{
|
||||
oPromise.then(function (mData) {
|
||||
|
||||
self.resultCallback(mData);
|
||||
self.resultCallback(mData.data);
|
||||
self.cancelCommand();
|
||||
|
||||
})['catch'](function (e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue