[Gpg4win-devel] New --list-config command for gpgconf

Werner Koch wk at gnupg.org
Tue Oct 23 20:09:10 CEST 2007


Hi,

the current SVN of GnuPG (4605) has a new feature for gpgconf:


`--list-config [FILENAME]'
     List the global configuration file in a colon separated format.  If
     FILENAME is given, check that file instead.



7.4.7 Listing global options
----------------------------

Sometimes it is useful for applications to look at the global options
file `gpgconf.conf'.  The colon separated listing format is record
oriented and uses the first field to identify the record type:

`k'
     This describes a key record to start the definition of a new
     ruleset for a user/group.  The format of a key record is:

     `k:USER:GROUP:'

    USER
          This is the user field of the key.  It is percent escaped.
          See the definition of the gpgconf.conf format for details.

    GROUP
          This is the group field of the key.  It is percent escaped.

`r'
     This describes a rule record. All rule records up to the next key
     record make up a rule set for that key.  The format of a rule
     record is:

     `r:::COMPONENT:OPTION:FLAGS:VALUE:'

    COMPONENT
          This is the component part of a rule.  It is a plain string.

    OPTION
          This is the option part of a rule.  It is a plain string.

    FLAG
          This is the flags part of a rule.  There may be only one flag
          per rule but by using the same component and option, several
          flags may be assigned to an option.  It is a plain string.

    VALUE
          This is the optional value for the option.  It is a percent
          escaped string with a single quotation mark to indicate a
          string.  The quotation mark is only required to distinguish
          between no value specified and an empty string.


Unknown record typs should be ignored.  Note that there is intentionally
no feature to change the global option file through `gpgconf'.

Example of the output (taken from the example gpgconf.conf file):

  k::staff:
  r:::gpg-agent:allow-mark-trusted:change::
  r:::gpg-agent:min-passphrase-len::"6:
  k:*::
  r:::gpg-agent:min-passphrase-len:no-change:"8:
  r:::gpg-agent:min-passphrase-nonalpha:no-change:"1:
  r:::gpg-agent:max-passphrase-days:no-change:"700:
  r:::gpg-agent:enable-passphrase-history:no-change::
  r:::gpg-agent:enforce-passphrase-constraints:default::
  r:::gpg-agent:enforce-passphrase-constraints:no-change::
  r:::gpg-agent:max-cache-ttl:no-change:"10800:
  r:::gpg-agent:max-cache-ttl-ssh:no-change:"10800:
  r:::gpg-agent:allow-mark-trusted:default::
  r:::gpg-agent:allow-mark-trusted:no-change::
  r:::gpgsm:enable-ocsp:::
  


Shalom-Salam,

   Werner



-- 
Die Gedanken sind frei.  Auschnahme regelt ein Bundeschgesetz.




More information about the Gpg4win-devel mailing list