keybase / kbpgp

OpenPGP (RFC4880) Implementation in IcedCoffeeScript
https://keybase.io/kbpgp
BSD 3-Clause "New" or "Revised" License
533 stars 74 forks source link

Load Multiple Keys #151

Open dsanghan opened 7 years ago

dsanghan commented 7 years ago

Is there a way to load multiple keys at once from a .gpg file?

If its armored ascii, I'm currently splitting it up into individual keys and loading it using import_from_armored_pgp

If its a single encoded unarmored key, i'm using import_from_pgp_message.

Can't figure out what to do about loading multiple unarmored keys from a .gpg file?

dsanghan commented 7 years ago

Also, when exporting a keyring from gpg using gpg --armor --export > keys.asc , it exports multiple keys within a single armored block, this also seems to be a little troublesome to deal with. Maybe the best solution is import_from_armored_pgp should callback with an array of imported keys / have another import_from_data that parses the packets and extracts all the keys.