Remove superfluous lines
Signed-off-by: Georg Pfuetzenreuter <georg.pfuetzenreuter@suse.com>
This commit is contained in:
parent
f8f343c859
commit
b10e3faf45
@ -42,7 +42,6 @@ class PGP {
|
|||||||
publicKeyArmored = this.trimKey(publicKeyArmored);
|
publicKeyArmored = this.trimKey(publicKeyArmored);
|
||||||
|
|
||||||
const r = await openpgp.readKeys({armoredKeys: publicKeyArmored});
|
const r = await openpgp.readKeys({armoredKeys: publicKeyArmored});
|
||||||
//const r = await openpgp.key.readArmored(publicKeyArmored);
|
|
||||||
if (r.err) {
|
if (r.err) {
|
||||||
const error = r.err[0];
|
const error = r.err[0];
|
||||||
log.error('pgp', 'Failed to parse PGP key:\n%s', publicKeyArmored, error);
|
log.error('pgp', 'Failed to parse PGP key:\n%s', publicKeyArmored, error);
|
||||||
@ -53,7 +52,6 @@ class PGP {
|
|||||||
|
|
||||||
// verify primary key
|
// verify primary key
|
||||||
const key = r[0];
|
const key = r[0];
|
||||||
//const primaryKey = key;
|
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
const verifyDate = key.created > now ? key.created : now;
|
const verifyDate = key.created > now ? key.created : now;
|
||||||
try {
|
try {
|
||||||
@ -159,7 +157,6 @@ class PGP {
|
|||||||
async filterKeyByUserIds(userIds, armored) {
|
async filterKeyByUserIds(userIds, armored) {
|
||||||
const emails = userIds.map(({email}) => email);
|
const emails = userIds.map(({email}) => email);
|
||||||
const key = await openpgp.readKey({armoredKey: armored});
|
const key = await openpgp.readKey({armoredKey: armored});
|
||||||
//const {keys: [key]} = r;
|
|
||||||
key.users = key.users.filter(({userId}) => !userId || emails.includes(util.normalizeEmail(userId.email)));
|
key.users = key.users.filter(({userId}) => !userId || emails.includes(util.normalizeEmail(userId.email)));
|
||||||
return key.armor();
|
return key.armor();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user