mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-05 15:37:03 +03:00
#89 Decrypt and verify with OpenPGP.js and GnuPG
This commit is contained in:
parent
85f9209176
commit
e0e490c64f
8 changed files with 354 additions and 315 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue