#89 Decrypt and verify with OpenPGP.js and GnuPG

This commit is contained in:
the-djmaze 2022-02-11 11:01:07 +01:00
parent 85f9209176
commit e0e490c64f
8 changed files with 354 additions and 315 deletions

View file

@ -197,10 +197,15 @@ export const GnuPGUserStore = new class {
async verify(message) {
let data = message.pgpSigned(); // { BodyPartId: "1", SigPartId: "2", MicAlg: "pgp-sha256" }
if (data) {
data = { ...data }; // clone
// const sender = message.from[0].email;
// let mode = await this.hasPublicKeyForEmails([sender]);
data.Folder = message.folder;
data.Uid = message.uid;
if (data.BodyPart) {
data.BodyPart = data.BodyPart.raw;
data.SigPart = data.SigPart.body;
}
let response = await Remote.post('MessagePgpVerify', null, data);
if (response && response.Result) {
return {