summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/gc-opt-flags.h6
-rw-r--r--dirmngr/dirmngr.c22
-rw-r--r--doc/gpg.texi19
-rw-r--r--doc/gpgsm.texi2
-rw-r--r--g10/call-dirmngr.c2
-rw-r--r--g10/gpg.c4
-rw-r--r--g10/options.h1
-rw-r--r--tools/gpgconf-comp.c5
8 files changed, 35 insertions, 26 deletions
diff --git a/common/gc-opt-flags.h b/common/gc-opt-flags.h
index b777c06d6..11ecec030 100644
--- a/common/gc-opt-flags.h
+++ b/common/gc-opt-flags.h
@@ -36,5 +36,11 @@
a default, which is described by the value of the ARGDEF field. */
#define GC_OPT_FLAG_NO_ARG_DESC (1UL << 6)
+/* The NO_CHANGE flag for an option indicates that the user should not
+ be allowed to change this option using the standard gpgconf method.
+ Frontends using gpgconf should grey out such options, so that only
+ the current value is displayed. */
+#define GC_OPT_FLAG_NO_CHANGE (1UL <<7)
+
#endif /*GNUPG_GC_OPT_FLAGS_H*/
diff --git a/dirmngr/dirmngr.c b/dirmngr/dirmngr.c
index 0cbdc7ba0..7bcff7a6a 100644
--- a/dirmngr/dirmngr.c
+++ b/dirmngr/dirmngr.c
@@ -57,6 +57,7 @@
#include "asshelp.h"
#include "ldap-wrapper.h"
#include "../common/init.h"
+#include "gc-opt-flags.h"
/* The plain Windows version uses the windows service system. For
example to start the service you may use "sc start dirmngr".
@@ -709,7 +710,7 @@ main (int argc, char **argv)
}
/* If --daemon has been given on the command line but not --homedir,
- we switch to /etc/dirmngr as default home directory. Note, that
+ we switch to /etc/gnupg as default home directory. Note, that
this also overrides the GNUPGHOME environment variable. */
if (opt.system_daemon && !homedir_seen)
{
@@ -910,7 +911,7 @@ main (int argc, char **argv)
if (cmd == aServer)
{
- /* Note that this server mode is maily useful for debugging. */
+ /* Note that this server mode is mainly useful for debugging. */
if (argc)
wrong_args ("--server");
@@ -1193,23 +1194,6 @@ main (int argc, char **argv)
char *filename;
char *filename_esc;
- /* List options and default values in the GPG Conf format. */
-
-/* The following list is taken from gnupg/tools/gpgconf-comp.c. */
-/* Option flags. YOU MUST NOT CHANGE THE NUMBERS OF THE EXISTING
- FLAGS, AS THEY ARE PART OF THE EXTERNAL INTERFACE. */
-#define GC_OPT_FLAG_NONE 0UL
-/* The DEFAULT flag for an option indicates that the option has a
- default value. */
-#define GC_OPT_FLAG_DEFAULT (1UL << 4)
-/* The DEF_DESC flag for an option indicates that the option has a
- default, which is described by the value of the default field. */
-#define GC_OPT_FLAG_DEF_DESC (1UL << 5)
-/* The NO_ARG_DESC flag for an option indicates that the argument has
- a default, which is described by the value of the ARGDEF field. */
-#define GC_OPT_FLAG_NO_ARG_DESC (1UL << 6)
-#define GC_OPT_FLAG_NO_CHANGE (1UL <<7)
-
#ifdef HAVE_W32_SYSTEM
/* On Windows systems, dirmngr always runs as system daemon, and
the per-user configuration is never used. So we short-cut
diff --git a/doc/gpg.texi b/doc/gpg.texi
index c1ce07b98..e1ad33cfc 100644
--- a/doc/gpg.texi
+++ b/doc/gpg.texi
@@ -1696,6 +1696,25 @@ been given. Given that this option is not anymore used by
@command{gpg2}, it should be avoided if possible.
@end ifset
+
+@ifclear gpgone
+@item --agent-program @var{file}
+@opindex agent-program
+Specify an agent program to be used for secret key operations. The
+default value is the @file{/usr/bin/gpg-agent}. This is only used
+as a fallback when the environment variable @code{GPG_AGENT_INFO} is not
+set or a running agent cannot be connected.
+@end ifclear
+
+@ifset gpgtwoone
+@item --dirmngr-program @var{file}
+@opindex dirmngr-program
+Specify a dirmngr program to be used for keyserver access. The
+default value is @file{/usr/sbin/dirmngr}. This is only used as a
+fallback when the environment variable @code{DIRMNGR_INFO} is not set or
+a running dirmngr cannot be connected.
+@end ifset
+
@item --lock-once
@opindex lock-once
Lock the databases the first time a lock is requested
diff --git a/doc/gpgsm.texi b/doc/gpgsm.texi
index f7cedaf95..3d2594f68 100644
--- a/doc/gpgsm.texi
+++ b/doc/gpgsm.texi
@@ -350,7 +350,7 @@ as a fallback when the environment variable @code{GPG_AGENT_INFO} is not
set or a running agent cannot be connected.
@item --dirmngr-program @var{file}
-@opindex dirmnr-program
+@opindex dirmngr-program
Specify a dirmngr program to be used for @acronym{CRL} checks. The
default value is @file{/usr/sbin/dirmngr}. This is only used as a
fallback when the environment variable @code{DIRMNGR_INFO} is not set or
diff --git a/g10/call-dirmngr.c b/g10/call-dirmngr.c
index 2310d8bd7..993533377 100644
--- a/g10/call-dirmngr.c
+++ b/g10/call-dirmngr.c
@@ -121,7 +121,7 @@ create_context (ctrl_t ctrl, assuan_context_t *r_ctx)
err = start_new_dirmngr (&ctx,
GPG_ERR_SOURCE_DEFAULT,
opt.homedir,
- NULL,
+ opt.dirmngr_program,
opt.verbose, DBG_ASSUAN,
NULL /*gpg_status2*/, ctrl);
if (!err)
diff --git a/g10/gpg.c b/g10/gpg.c
index d24cc23a9..361a25a8c 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -346,6 +346,7 @@ enum cmd_and_opt_values
oPersonalDigestPreferences,
oPersonalCompressPreferences,
oAgentProgram,
+ oDirmngrProgram,
oDisplay,
oTTYname,
oTTYtype,
@@ -739,7 +740,9 @@ static ARGPARSE_OPTS opts[] = {
ARGPARSE_s_s (oPersonalCipherPreferences, "personal-cipher-prefs", "@"),
ARGPARSE_s_s (oPersonalDigestPreferences, "personal-digest-prefs", "@"),
ARGPARSE_s_s (oPersonalCompressPreferences, "personal-compress-prefs", "@"),
+
ARGPARSE_s_s (oAgentProgram, "agent-program", "@"),
+ ARGPARSE_s_s (oDirmngrProgram, "dirmngr-program", "@"),
ARGPARSE_s_s (oDisplay, "display", "@"),
ARGPARSE_s_s (oTTYname, "ttyname", "@"),
ARGPARSE_s_s (oTTYtype, "ttytype", "@"),
@@ -2974,6 +2977,7 @@ main (int argc, char **argv)
pers_compress_list=pargs.r.ret_str;
break;
case oAgentProgram: opt.agent_program = pargs.r.ret_str; break;
+ case oDirmngrProgram: opt.dirmngr_program = pargs.r.ret_str; break;
case oDisplay:
set_opt_session_env ("DISPLAY", pargs.r.ret_str);
diff --git a/g10/options.h b/g10/options.h
index 47b8bfb29..592e06698 100644
--- a/g10/options.h
+++ b/g10/options.h
@@ -101,6 +101,7 @@ struct
int max_cert_depth;
const char *homedir;
const char *agent_program;
+ const char *dirmngr_program;
/* Options to be passed to the gpg-agent */
session_env_t session_env;
diff --git a/tools/gpgconf-comp.c b/tools/gpgconf-comp.c
index 6d366af70..356b25126 100644
--- a/tools/gpgconf-comp.c
+++ b/tools/gpgconf-comp.c
@@ -357,11 +357,6 @@ static struct
several times. A comma separated list of arguments is used as the
argument value. */
#define GC_OPT_FLAG_LIST (1UL << 2)
-/* The NO_CHANGE flag for an option indicates that the user should not
- be allowed to change this option using the standard gpgconf method.
- Frontends using gpgconf should grey out such options, so that only
- the current value is displayed. */
-#define GC_OPT_FLAG_NO_CHANGE (1UL <<7)
/* A human-readable description for each flag. */