Skip to content

Commit

Permalink
OpenPGP.js 5.0.0-2
Browse files Browse the repository at this point in the history
  • Loading branch information
crazy-max committed May 7, 2021
1 parent 72f0164 commit e30550d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -25,7 +25,7 @@
"@actions/core": "^1.2.6",
"@actions/exec": "^1.0.4",
"addressparser": "^1.0.1",
"openpgp": "5.0.0-1"
"openpgp": "5.0.0-2"
},
"devDependencies": {
"@types/jest": "^26.0.14",
Expand Down
6 changes: 3 additions & 3 deletions src/openpgp.ts
Expand Up @@ -20,14 +20,14 @@ export const readPrivateKey = async (key: string): Promise<PrivateKey> => {
});

const address = await privateKey.getPrimaryUser().then(primaryUser => {
return addressparser(primaryUser.user.userId?.userid)[0];
return addressparser(primaryUser.user.userID?.userID)[0];
});

return {
fingerprint: privateKey.getFingerprint().toUpperCase(),
keyID: await privateKey.getEncryptionKey().then(encKey => {
// @ts-ignore
return encKey?.getKeyId().toHex().toUpperCase();
return encKey?.getKeyID().toHex().toUpperCase();
}),
name: address.name,
email: address.address,
Expand All @@ -37,7 +37,7 @@ export const readPrivateKey = async (key: string): Promise<PrivateKey> => {

export const generateKeyPair = async (name: string, email: string, passphrase: string, type?: 'ecc' | 'rsa'): Promise<KeyPair> => {
const keyPair = await openpgp.generateKey({
userIds: [{name: name, email: email}],
userIDs: [{name: name, email: email}],
passphrase: passphrase,
type: type
});
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Expand Up @@ -2765,10 +2765,10 @@ onetime@^5.1.0:
dependencies:
mimic-fn "^2.1.0"

openpgp@5.0.0-1:
version "5.0.0-1"
resolved "https://registry.yarnpkg.com/openpgp/-/openpgp-5.0.0-1.tgz#28456d930895483770f099e373045e3ce9dbf9f9"
integrity sha512-yfmRStdmOQPZbNbvwyQrqjLOTGW4QO0/aok/Vt08Zhf4UB9w0tGA5c6zBxDefxq+SmXlqEsmdNu+AtYx5G8D6A==
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==
dependencies:
asn1.js "^5.0.0"

Expand Down

0 comments on commit e30550d

Please sign in to comment.