mirror of
https://codeberg.org/PGPainless/cert-d-pgpainless.git
synced 2025-09-10 02:39:45 +02:00
Adopt latest changes from pgp-cert-d and add armor headers for get command
This commit is contained in:
parent
7b6162682e
commit
33d93cc39a
5 changed files with 25 additions and 86 deletions
|
@ -5,7 +5,10 @@
|
|||
package pgp.cert_d.cli.commands;
|
||||
|
||||
import org.bouncycastle.bcpg.ArmoredOutputStream;
|
||||
import org.bouncycastle.openpgp.PGPKeyRing;
|
||||
import org.bouncycastle.util.io.Streams;
|
||||
import org.pgpainless.PGPainless;
|
||||
import org.pgpainless.util.ArmorUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import pgp.cert_d.SpecialNames;
|
||||
|
@ -46,7 +49,8 @@ public class Get implements Runnable {
|
|||
}
|
||||
|
||||
if (armor) {
|
||||
ArmoredOutputStream armorOut = new ArmoredOutputStream(System.out);
|
||||
PGPKeyRing keyRing = PGPainless.readKeyRing().keyRing(record.getInputStream());
|
||||
ArmoredOutputStream armorOut = ArmorUtils.toAsciiArmoredStream(keyRing, System.out);
|
||||
Streams.pipeAll(record.getInputStream(), armorOut);
|
||||
armorOut.close();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue