GnuPG and standard output

Daniel Kahn Gillmor dkg at fifthhorseman.net
Tue Aug 1 20:35:59 CEST 2017


On Tue 2017-08-01 14:17:37 -0400, Robert J. Hansen wrote:
> (If you're wondering why I'd do this, GPGME does not yet have a way to
> query key prefs, and I need them for a project.)

Thanks for the suggestion, i've recorded it here:
https://dev.gnupg.org/T3323

> There's no security reason to dump this to the console.  It's just
> publicly-available information about the certificate.  And yet, it
> consistently puts zero bytes in result.stdout, while displaying data to
> the console.

I agree this seems like a non-useful behavior, but if you're planning on
using gpg in an automated way and you want machine-parseable output, i
recommend including at least the following arguments in addition to
whatever else you want gpg to do:

    --no-tty
    --batch
    --quiet
    --with-colons
    --fixed-list-mode

hth,

        --dkg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: </pipermail/attachments/20170801/d3e77837/attachment.sig>


More information about the Gnupg-users mailing list