GnuPG 2.2 - Comments in gpg.conf

Werner Koch wk at gnupg.org
Fri Sep 29 10:26:50 CEST 2017


On Thu, 28 Sep 2017 15:10, ilf at zeromail.org said:

> I think comments start with "#" and that does not have to be at the
> beginning of the line. There are multiple examples of software that
> agree. I still think it would be right to allow this comment form.

The man page clearly states.

    Lines with a hash ('#') as the first non-white-space character are
    ignored.

This is common for many conf files and makes a lot of sense because it
avoids complicated and hard to learn rules on how to quote
values.  Consider the shell syntax where '#' is used at several places
(e.g. $#, ${#foo}, #!) and thus you need to implement a full lexer to
detect the '#<word>' token which marks a trailing comment.  Even Bash's
readline configuration file won't accept those trailing comments.

> But if the solution is to allow this only for specific configuration
> options, I would also like this for "default-key" in addition to

--default-key is different because it accepts a user id (which is
allowed to contain a #).  --trusted-key accepts a long keyid and nothing
else.  This is the very reason why I would accept a workaround for this
option.  Whether this really makes sense is a different question and
depends on how many gpgtools users ran into that problem.

> keyring, a comment definitely makes sense in addition to the
> key-id. And as we can see, many people just ad comments to the same

Use one or more comment line above the keyword,


Shalom-Salam,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: </pipermail/attachments/20170929/f4f9e682/attachment.sig>


More information about the Gnupg-devel mailing list