From 71641d35c45e7c0c6aaada0968d93cd2cb1ca30d Mon Sep 17 00:00:00 2001 From: TheCatLady <52870424+TheCatLady@users.noreply.github.com> Date: Mon, 14 Jun 2021 23:16:33 -0400 Subject: [PATCH] build(deps): bump openpgp from 5.0.0-2 to 5.0.0-3 (#1734) --- package.json | 2 +- server/lib/email/openpgpEncrypt.ts | 8 ++++---- yarn.lock | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 117ac5e7b..0cb3840c2 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "node-cache": "^5.1.2", "node-schedule": "^2.0.0", "nodemailer": "^6.6.1", - "openpgp": "^5.0.0-2", + "openpgp": "^5.0.0-3", "plex-api": "^5.3.1", "pug": "^3.0.2", "react": "17.0.2", diff --git a/server/lib/email/openpgpEncrypt.ts b/server/lib/email/openpgpEncrypt.ts index 607173f79..020e2e493 100644 --- a/server/lib/email/openpgpEncrypt.ts +++ b/server/lib/email/openpgpEncrypt.ts @@ -41,7 +41,7 @@ class PGPEncryptor extends Transform { const validPublicKeys = await Promise.all( this._encryptionKeys.map((armoredKey) => openpgp.readKey({ armoredKey })) ); - let privateKey: openpgp.Key | undefined; + let privateKey: openpgp.PrivateKey | undefined; // Just return the message if there is no one to encrypt for if (!validPublicKeys.length) { @@ -51,7 +51,7 @@ class PGPEncryptor extends Transform { // Only sign the message if private key and password exist if (this._signingKey && this._password) { - privateKey = await openpgp.readKey({ + privateKey = await openpgp.readPrivateKey({ armoredKey: this._signingKey, }); @@ -135,8 +135,8 @@ class PGPEncryptor extends Transform { emailPartDelimiter + messageParts.join(emailPartDelimiter), }), - publicKeys: validPublicKeys, - privateKeys: privateKey, + encryptionKeys: validPublicKeys, + signingKeys: privateKey, }); const body = diff --git a/yarn.lock b/yarn.lock index f689b99cb..ce9c51a10 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10293,10 +10293,10 @@ opener@^1.5.1: resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598" integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A== -openpgp@^5.0.0-2: - version "5.0.0-2" - resolved "https://registry.yarnpkg.com/openpgp/-/openpgp-5.0.0-2.tgz#da54385eb9298c259bc6aa76ab556532298897d4" - integrity sha512-es+5A50Y+4JbtV+eugLPW9v/UkUIOufeOUyTcjbG8SMILNaLY9nEwUSJKDjQOadY+16w7Uqt0FDQ3Z1Vq7/F9g== +openpgp@^5.0.0-3: + version "5.0.0-3" + resolved "https://registry.yarnpkg.com/openpgp/-/openpgp-5.0.0-3.tgz#08bbd878edc7c8e3c8443d8ace2c3b2236e3150c" + integrity sha512-5Yzd7hjoCtR0m27yrM6+Li1RcuUPIyVJXKMfR82HJotfst5NEEQHxCyUJvDWc8SqKS53zFyTl0SlPaZ08C2PxA== dependencies: asn1.js "^5.0.0"