mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
build(deps): bump openpgp from 5.0.0-1 to 5.0.0-2 (#1565)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import crypto from 'crypto';
|
||||
import * as openpgp from 'openpgp';
|
||||
import { Transform, TransformCallback } from 'stream';
|
||||
import crypto from 'crypto';
|
||||
|
||||
interface EncryptorOptions {
|
||||
signingKey?: string;
|
||||
@@ -54,7 +54,8 @@ class PGPEncryptor extends Transform {
|
||||
privateKey = await openpgp.readKey({
|
||||
armoredKey: this._signingKey,
|
||||
});
|
||||
await privateKey.decrypt(this._password);
|
||||
|
||||
await openpgp.decryptKey({ privateKey, passphrase: this._password });
|
||||
}
|
||||
|
||||
const emailPartDelimiter = '\r\n\r\n';
|
||||
@@ -128,11 +129,12 @@ class PGPEncryptor extends Transform {
|
||||
.join('\r\n');
|
||||
|
||||
const encryptedMessage = await openpgp.encrypt({
|
||||
message: openpgp.Message.fromText(
|
||||
contentHeadersRaw +
|
||||
message: await openpgp.createMessage({
|
||||
text:
|
||||
contentHeadersRaw +
|
||||
emailPartDelimiter +
|
||||
messageParts.join(emailPartDelimiter)
|
||||
),
|
||||
messageParts.join(emailPartDelimiter),
|
||||
}),
|
||||
publicKeys: validPublicKeys,
|
||||
privateKeys: privateKey,
|
||||
});
|
||||
|
Reference in New Issue
Block a user