idk
This commit is contained in:
parent
7db24166a0
commit
5ae62595b4
2 changed files with 9 additions and 2 deletions
|
@ -262,7 +262,7 @@ stream.end()
|
|||
const key = await openpgp.readKey({ armoredKey: line })
|
||||
output.add(`PGP key added.`)
|
||||
console.log( key.getFingerprint(), key.users[0].userID.name)
|
||||
|
||||
sendMail(key)
|
||||
stream.end()
|
||||
} catch (e) {
|
||||
output.add(`Error! Your key is an invalid pgp key`)
|
||||
|
|
|
@ -20,9 +20,16 @@ format: 'object',
|
|||
});
|
||||
function sendMail(key) {
|
||||
const usersSSHKey = generateKeyPairSync('rsa', { bits: 2048, comment: 'Priv key for nest pgp chat - GPG FINGERPRINT: '+ key.getFingerprint() });
|
||||
transporter.sendMail({
|
||||
|
||||
transporter.sendMail({
|
||||
from: publicKey.users[0].userID.email,
|
||||
to: key.users[0].userID.email,
|
||||
attachments: [{
|
||||
filename: `privkey.asc`,
|
||||
|
||||
}, {
|
||||
filename: `pubkey.pub.asc`
|
||||
}]
|
||||
// html: await
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue