mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
(main): Implemented --gpgconf-list.
This commit is contained in:
parent
f8d44bc637
commit
050b96f790
@ -1,3 +1,7 @@
|
||||
2004-03-16 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* gpgsm.c (main): Implemented --gpgconf-list.
|
||||
|
||||
2004-03-15 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* keylist.c (list_cert_colon): Hack to set the expired flag.
|
||||
|
@ -40,6 +40,7 @@ static const char oid_kp_clientAuth[] = "1.3.6.1.5.5.7.3.2";
|
||||
static const char oid_kp_codeSigning[] = "1.3.6.1.5.5.7.3.3";
|
||||
static const char oid_kp_emailProtection[]= "1.3.6.1.5.5.7.3.4";
|
||||
static const char oid_kp_timeStamping[] = "1.3.6.1.5.5.7.3.8";
|
||||
static const char oid_kp_ocspSigning[] = "1.3.6.1.5.6.7.3.9";
|
||||
|
||||
/* Return 0 if the cert is usable for encryption. A MODE of 0 checks
|
||||
for signing a MODE of 1 checks for encryption, a MODE of 2 checks
|
||||
|
56
sm/gpgsm.c
56
sm/gpgsm.c
@ -690,6 +690,7 @@ main ( int argc, char **argv)
|
||||
CERTLIST recplist = NULL;
|
||||
CERTLIST signerlist = NULL;
|
||||
int do_not_setup_keys = 0;
|
||||
char *config_filename = NULL;
|
||||
|
||||
/* trap_unaligned ();*/
|
||||
set_strusage (my_strusage);
|
||||
@ -1116,7 +1117,8 @@ main ( int argc, char **argv)
|
||||
{
|
||||
fclose (configfp);
|
||||
configfp = NULL;
|
||||
xfree (configname);
|
||||
/* Keep a copy of the config filename. */
|
||||
config_filename = configname;
|
||||
configname = NULL;
|
||||
goto next_pass;
|
||||
}
|
||||
@ -1259,21 +1261,47 @@ main ( int argc, char **argv)
|
||||
{
|
||||
case aGPGConfList:
|
||||
{ /* List options and default values in the GPG Conf format. */
|
||||
char *filename;
|
||||
|
||||
/* First the default configuration file. This is not an
|
||||
option, but it is vital information for GPG Conf. */
|
||||
filename = make_filename (opt.homedir, "gpgsm.conf", NULL);
|
||||
printf ("gpgconf-gpgsm.conf:\"%s\n", filename);
|
||||
xfree (filename);
|
||||
/* 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 RUNTIME flag for an option indicates that the option can be
|
||||
changed at runtime. */
|
||||
#define GC_OPT_FLAG_RUNTIME (1UL << 3)
|
||||
/* 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)
|
||||
|
||||
printf ("gpgconf-gpgsm.conf:%lu:\"%s\"\n",
|
||||
GC_OPT_FLAG_DEFAULT,
|
||||
config_filename?config_filename:"/dev/null");
|
||||
|
||||
printf ("verbose:%lu:\n"
|
||||
"quiet:%lu:\n"
|
||||
"debug-level:%lu:\"none\":\n"
|
||||
"log-file:%lu:\n",
|
||||
GC_OPT_FLAG_NONE,
|
||||
GC_OPT_FLAG_NONE,
|
||||
GC_OPT_FLAG_DEFAULT,
|
||||
GC_OPT_FLAG_NONE );
|
||||
printf ("disable-crl-checks:%lu:\n",
|
||||
GC_OPT_FLAG_NONE );
|
||||
printf ("enable-ocsp:%lu:\n",
|
||||
GC_OPT_FLAG_NONE );
|
||||
printf ("include-certs:%lu:1:\n",
|
||||
GC_OPT_FLAG_DEFAULT );
|
||||
printf ("disable-policy-checks:%lu:\n",
|
||||
GC_OPT_FLAG_NONE );
|
||||
printf ("auto-issuer-key-retrieve:%lu:\n",
|
||||
GC_OPT_FLAG_NONE );
|
||||
|
||||
printf ("verbose:\n"
|
||||
"quiet:\n"
|
||||
"debug-level:none\n"
|
||||
"log-file:\n"
|
||||
"force:\n"
|
||||
"faked-system-time:\n"
|
||||
"no-greeting:\n");
|
||||
}
|
||||
break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user