Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: GnuPG: users

gpgconf on FreeBSD-8.2

 

 

GnuPG users RSS feed   Index | Next | Previous | View Threaded


jerry at seibercom

Mar 31, 2012, 7:25 AM

Post #1 of 6 (304 views)
Permalink
gpgconf on FreeBSD-8.2

I am not sure if there is even a problem here, so please bear with me.

First, I have gpg2 installed on my system:

gpg (GnuPG) 2.0.18
libgcrypt 1.5.0
Home: ~/.gnupg

Now, when I run gpgconf, I receive this error:

$ gpgconf --check-config
gpgconf: can not open global config file `/usr/local/etc/gnupg/gpgconf.conf': No such file or directory

There is no gpgconf.conf file on a FreeBSD system. Therefore, I give
the command the address to my gpg.conf file:

gpgconf --check-config ~/.gnupg/gpg.conf

which produces this output:

gpgconf: missing component at `/home/gerard/.gnupg/gpg.conf', line 59
gpgconf: unknown component at `/home/gerard/.gnupg/gpg.conf', line 69
gpgconf: missing option at `/home/gerard/.gnupg/gpg.conf', line 69
gpgconf: unknown component at `/home/gerard/.gnupg/gpg.conf', line 166
gpgconf: missing option at `/home/gerard/.gnupg/gpg.conf', line 166
gpgconf: unknown component at `/home/gerard/.gnupg/gpg.conf', line 205
gpgconf: missing option at `/home/gerard/.gnupg/gpg.conf', line 205
gpgconf: missing component at `/home/gerard/.gnupg/gpg.conf', line 206
gpgconf: missing component at `/home/gerard/.gnupg/gpg.conf', line 209
gpgconf: unknown component at `/home/gerard/.gnupg/gpg.conf', line 210
gpgconf: missing option at `/home/gerard/.gnupg/gpg.conf', line 210
gpgconf: unknown component at `/home/gerard/.gnupg/gpg.conf', line 211
gpgconf: missing option at `/home/gerard/.gnupg/gpg.conf', line 211
gpgconf: unknown component at `/home/gerard/.gnupg/gpg.conf', line 213
gpgconf: missing option at `/home/gerard/.gnupg/gpg.conf', line 213
gpgconf: missing component at `/home/gerard/.gnupg/gpg.conf', line 214

I am not sure exactly what is wrong with the lines indicated.

The following is the file truncated as much as possible.

Line 59: require-cross-certification

Line 69: charset utf-8

Line 166: keyserver-options auto-key-retrieve

Line 205: default-key A14359AB219555DDC70CC277C0B4548708208E42
Line 206: use-agent

###+++--- GPGConf ---+++###
Line 209: utf8-strings
Line 210: auto-key-locate local
Line 211: auto-key-locate keyserver

Line 213: keyserver hkp://wwwkeys.us.pgp.net
Line 214: verbose
###+++--- GPGConf ---+++### Wed Oct 19 09:56:39 2011 EDT
# GPGConf edited this configuration file.
# It will disable options before this marked block, but it will
# never change anything below these lines.

Everything seems to be working correctly so I am not sure why I am
receiving these error messages when I run gpgconf.

--
Jerry ♔

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__________________________________________________________________


_______________________________________________
Gnupg-users mailing list
Gnupg-users [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-users


wk at gnupg

Apr 1, 2012, 3:07 AM

Post #2 of 6 (288 views)
Permalink
Re: gpgconf on FreeBSD-8.2 [In reply to]

On Sat, 31 Mar 2012 16:25, jerry [at] seibercom said:

> $ gpgconf --check-config
> gpgconf: can not open global config file `/usr/local/etc/gnupg/gpgconf.conf': No such file or directory

gpgconf.conf is an optional file it can be used to change the defaults
compiled into gpgconf on a per user base. The idea is to disallow users
to change certain options from Kleopatra or another frontend. Sure,
they can still edit the respective configuration files manually.

> gpgconf --check-config ~/.gnupg/gpg.conf

The gpgconf.conf file as a different syntax than gpg.conf,
gpg-agent.conf et al.

What to you want to do?


Salam-Shalom,

Werner



--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.


_______________________________________________
Gnupg-users mailing list
Gnupg-users [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-users


jerry at seibercom

Apr 1, 2012, 5:19 AM

Post #3 of 6 (288 views)
Permalink
Re: gpgconf on FreeBSD-8.2 [In reply to]

On Sun, 01 Apr 2012 12:07:42 +0200
Werner Koch articulated:

> On Sat, 31 Mar 2012 16:25, jerry [at] seibercom said:
>
> > $ gpgconf --check-config
> > gpgconf: can not open global config file
> > `/usr/local/etc/gnupg/gpgconf.conf': No such file or directory
>
> gpgconf.conf is an optional file it can be used to change the defaults
> compiled into gpgconf on a per user base. The idea is to disallow
> users to change certain options from Kleopatra or another frontend.
> Sure, they can still edit the respective configuration files
> manually.
>
> > gpgconf --check-config ~/.gnupg/gpg.conf
>
> The gpgconf.conf file as a different syntax than gpg.conf,
> gpg-agent.conf et al.
>
> What to you want to do?

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
to use in in the same fashion that I use "postconf" to check Postfix's
configuration files. Many applications have utilities to check their
config files, "Dovecot", "ClamAV", etcetera. I thought that the
"gpgconf" utility would accomplish the same thing.

While the documentation does not specifically state that it DOES work
on the gpg.conf file, nothing says that it doesn't either. In my humble
opinion, the documentation is slightly ambiguous.

Sorry to have wasted your time.

--
Jerry ♔

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__________________________________________________________________
The rose of yore is but a name, mere names are left to us.

_______________________________________________
Gnupg-users mailing list
Gnupg-users [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-users


wk at gnupg

Apr 2, 2012, 2:25 AM

Post #4 of 6 (280 views)
Permalink
Re: gpgconf on FreeBSD-8.2 [In reply to]

On Sun, 1 Apr 2012 14:19, jerry [at] seibercom 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.


Shalom-Salam,

Werner

--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.


_______________________________________________
Gnupg-users mailing list
Gnupg-users [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-users


jerry at seibercom

Apr 2, 2012, 5:22 AM

Post #5 of 6 (291 views)
Permalink
Re: gpgconf on FreeBSD-8.2 [In reply to]

On Mon, 02 Apr 2012 11:25:32 +0200
Werner Koch articulated:

> On Sun, 1 Apr 2012 14:19, jerry [at] seibercom 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.

$ gpgconf --check-programs
gpg:GPG for OpenPGP:/usr/local/bin/gpg2:1:1:
gpg-agent:GPG Agent:/usr/local/bin/gpg-agent:1:1:
gpgconf: error running `/usr/local/bin/scdaemon': probably not installed
scdaemon:Smartcard Daemon:/usr/local/bin/scdaemon:0:0:
gpgsm:GPG for S/MIME:/usr/local/bin/gpgsm:1:1:
dirmngr:Directory Manager:/usr/local/bin/dirmngr:1:1:

$ gpgconf --check-options gpg
gpg:GPG for OpenPGP:/usr/local/bin/gpg2:1:1:

However, since I do not have a global gpg configuration file, what
file is it checking, if any? I assume it is not checking the
~/.gnupg.gpg.conf file, since if I try to check it manually with
gpgconf, it reports errors.

--
Jerry ♔

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__________________________________________________________________


_______________________________________________
Gnupg-users mailing list
Gnupg-users [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-users


wk at gnupg

Apr 2, 2012, 9:54 AM

Post #6 of 6 (282 views)
Permalink
Re: gpgconf on FreeBSD-8.2 [In reply to]

On Mon, 2 Apr 2012 14:22, jerry [at] seibercom said:

> However, since I do not have a global gpg configuration file, what
> file is it checking, if any? I assume it is not checking the
> ~/.gnupg.gpg.conf file, since if I try to check it manually with
> gpgconf, it reports errors.

You can't check it manually. gpgconf knows which configuration files
belongs to which modules. Technically gpgconf calls gpg with the
options this way:

gpg2 --gpgconf-test

However, it is better to use gpgconf, the way you did it.


Shalom-Salam,

Werner

--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.


_______________________________________________
Gnupg-users mailing list
Gnupg-users [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-users

GnuPG users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.