Added PGP verify operation

Added some more metadata to decrypt & verify
Fixes gchq/CyberChef#581
This commit is contained in:
Matt 2019-06-27 16:48:03 +01:00
parent ca9bab5d4c
commit 4c27a46d35
No known key found for this signature in database
GPG key ID: 2DD462FE98BF38C2
2 changed files with 114 additions and 2 deletions

View file

@ -93,7 +93,7 @@ class PGPDecryptAndVerify extends Operation {
text += `${signer.username} `;
}
if (signer.comment) {
text += `${signer.comment} `;
text += `(${signer.comment}) `;
}
if (signer.email) {
text += `<${signer.email}>`;
@ -102,7 +102,8 @@ class PGPDecryptAndVerify extends Operation {
}
text += [
`PGP fingerprint: ${km.get_pgp_fingerprint().toString("hex")}`,
`Signed on ${new Date(ds.sig.hashed_subpackets[0].time * 1000).toUTCString()}`,
`PGP key ID: ${km.get_pgp_short_key_id()}`,
`Signed on ${new Date(ds.sig.when_generated() * 1000).toUTCString()}`,
"----------------------------------\n"
].join("\n");
text += unboxedLiterals.toString();