build(deps): bump openpgp from 5.0.0-1 to 5.0.0-2 (#1565)

pull/1567/head
TheCatLady 4 years ago committed by GitHub
parent 26580eaa21
commit f8b2c3c1b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -45,7 +45,7 @@
"node-cache": "^5.1.2", "node-cache": "^5.1.2",
"node-schedule": "^2.0.0", "node-schedule": "^2.0.0",
"nodemailer": "^6.6.0", "nodemailer": "^6.6.0",
"openpgp": "^5.0.0-1", "openpgp": "^5.0.0-2",
"plex-api": "^5.3.1", "plex-api": "^5.3.1",
"pug": "^3.0.2", "pug": "^3.0.2",
"react": "17.0.2", "react": "17.0.2",

@ -1,6 +1,6 @@
import crypto from 'crypto';
import * as openpgp from 'openpgp'; import * as openpgp from 'openpgp';
import { Transform, TransformCallback } from 'stream'; import { Transform, TransformCallback } from 'stream';
import crypto from 'crypto';
interface EncryptorOptions { interface EncryptorOptions {
signingKey?: string; signingKey?: string;
@ -54,7 +54,8 @@ class PGPEncryptor extends Transform {
privateKey = await openpgp.readKey({ privateKey = await openpgp.readKey({
armoredKey: this._signingKey, armoredKey: this._signingKey,
}); });
await privateKey.decrypt(this._password);
await openpgp.decryptKey({ privateKey, passphrase: this._password });
} }
const emailPartDelimiter = '\r\n\r\n'; const emailPartDelimiter = '\r\n\r\n';
@ -128,11 +129,12 @@ class PGPEncryptor extends Transform {
.join('\r\n'); .join('\r\n');
const encryptedMessage = await openpgp.encrypt({ const encryptedMessage = await openpgp.encrypt({
message: openpgp.Message.fromText( message: await openpgp.createMessage({
contentHeadersRaw + text:
contentHeadersRaw +
emailPartDelimiter + emailPartDelimiter +
messageParts.join(emailPartDelimiter) messageParts.join(emailPartDelimiter),
), }),
publicKeys: validPublicKeys, publicKeys: validPublicKeys,
privateKeys: privateKey, privateKeys: privateKey,
}); });

@ -10114,10 +10114,10 @@ opener@^1.5.1:
resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598" resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598"
integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A== integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==
openpgp@^5.0.0-1: openpgp@^5.0.0-2:
version "5.0.0-1" version "5.0.0-2"
resolved "https://registry.yarnpkg.com/openpgp/-/openpgp-5.0.0-1.tgz#28456d930895483770f099e373045e3ce9dbf9f9" resolved "https://registry.yarnpkg.com/openpgp/-/openpgp-5.0.0-2.tgz#da54385eb9298c259bc6aa76ab556532298897d4"
integrity sha512-yfmRStdmOQPZbNbvwyQrqjLOTGW4QO0/aok/Vt08Zhf4UB9w0tGA5c6zBxDefxq+SmXlqEsmdNu+AtYx5G8D6A== integrity sha512-es+5A50Y+4JbtV+eugLPW9v/UkUIOufeOUyTcjbG8SMILNaLY9nEwUSJKDjQOadY+16w7Uqt0FDQ3Z1Vq7/F9g==
dependencies: dependencies:
asn1.js "^5.0.0" asn1.js "^5.0.0"

Loading…
Cancel
Save