gpgconf on FreeBSD-8.2

Werner Koch wk at
Mon Apr 2 11:25:32 CEST 2012

On Sun,  1 Apr 2012 14:19, jerry at said:

> Sorry, I thought that was obvious. I want to check the file, in this
> case the ~/.gnupg/gpg.conf file for proper syntax, etc. I am attempting

Oh sure.

  gpgconf --check-programs

checks that all programs are properly installed and that there config
files are okay.  Here is an en example for the output

  gpg:GPG for OpenPGP:/usr/local/bin/gpg2:1:1:
  gpg-agent:GPG Agent:/usr/local/bin/gpg-agent:1:1:
  scdaemon:Smartcard Daemon:/usr/local/bin/scdaemon:1:1:
  gpgsm:[...]:/usr[...]gpgsm:1:0:/home/[...]/gpgsm.conf:24:invalid option:
  dirmngr:Directory Manager:/usr/local/bin/dirmngr:1:1:
  pinentry:PIN and Passphrase Entry:/usr/local/bin/pinentry:1:1:

The "1:1" test you that everything is fine for that program, the "1:0"
for gpgsm indicates an error in the config file.  You may also run it
for a single module:

  gpg--check-options gpgsm

which will return just the line for gpgsm.  I just figure that the exit
code of gpgconf will always be 0 - that is a unfortunate for scripts.
The reason is that we developed it for a GUI which parsed the output.  I
will need to check the GUI code to see whether we can change it to
return 1 on error.



Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.

More information about the Gnupg-users mailing list