fix(email): use decrypted private key (#2232)

pull/2240/head
TheCatLady 3 years ago committed by GitHub
parent 216447121b
commit 8d2968572a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -51,11 +51,12 @@ class PGPEncryptor extends Transform {
// Only sign the message if private key and password exist
if (this._signingKey && this._password) {
privateKey = await openpgp.readPrivateKey({
armoredKey: this._signingKey,
privateKey = await openpgp.decryptKey({
privateKey: await openpgp.readPrivateKey({
armoredKey: this._signingKey,
}),
passphrase: this._password,
});
await openpgp.decryptKey({ privateKey, passphrase: this._password });
}
const emailPartDelimiter = '\r\n\r\n';

Loading…
Cancel
Save