aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
Diffstat (limited to 'g10')
-rw-r--r--g10/ChangeLog6
-rw-r--r--g10/Makefile.am9
-rw-r--r--g10/gpg.c8
3 files changed, 21 insertions, 2 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 293e2973a..2ab1d0f80 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,9 @@
+2006-10-23 Werner Koch <[email protected]>
+
+ * gpg.c (main): New command --gpgconf-test.
+
+ * Makefile.am (bzip2_source): New.
+
2006-10-20 Werner Koch <[email protected]>
* getkey.c (classify_user_id): Reserve '&' for search by keygrip.
diff --git a/g10/Makefile.am b/g10/Makefile.am
index cc0192c1b..0c91105fc 100644
--- a/g10/Makefile.am
+++ b/g10/Makefile.am
@@ -33,11 +33,18 @@ needed_libs = ../gl/libgnu.a ../common/libcommon.a ../jnlib/libjnlib.a
bin_PROGRAMS = gpg2 gpgv2
+if ENABLE_BZIP2_SUPPORT
+bzip2_source = compress-bz2.c
+else
+bzip2_source =
+endif
+
+
common_source = \
gpg.h \
build-packet.c \
compress.c \
- compress-bz2.c \
+ $(bzip2_source) \
filter.h \
free-packet.c \
getkey.c \
diff --git a/g10/gpg.c b/g10/gpg.c
index 8d2f2bf27..624816cde 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -110,6 +110,7 @@ enum cmd_and_opt_values
aLSignKey,
aListConfig,
aGPGConfList,
+ aGPGConfTest,
aListPackets,
aEditKey,
aDeleteKeys,
@@ -408,6 +409,7 @@ static ARGPARSE_OPTS opts[] = {
#endif
{ aListConfig, "list-config", 256, "@"},
{ aGPGConfList, "gpgconf-list", 256, "@" },
+ { aGPGConfTest, "gpgconf-test", 256, "@" },
{ aListPackets, "list-packets",256, "@"},
{ aExportOwnerTrust, "export-ownertrust", 256, "@"},
{ aImportOwnerTrust, "import-ownertrust", 256, "@"},
@@ -2026,6 +2028,7 @@ main (int argc, char **argv )
case aCheckKeys:
case aListConfig:
case aGPGConfList:
+ case aGPGConfTest:
case aListPackets:
case aImport:
case aFastImport:
@@ -3183,7 +3186,7 @@ main (int argc, char **argv )
SELinux, this is so that the rings are added to the list of
secured files. */
if( ALWAYS_ADD_KEYRINGS
- || (cmd != aDeArmor && cmd != aEnArmor) )
+ || (cmd != aDeArmor && cmd != aEnArmor && cmd != aGPGConfTest) )
{
if (ALWAYS_ADD_KEYRINGS
|| (cmd != aCheckKeys && cmd != aListSigs && cmd != aListKeys
@@ -3202,6 +3205,9 @@ main (int argc, char **argv )
FREE_STRLIST(nrings);
FREE_STRLIST(sec_nrings);
+ if (cmd == aGPGConfTest)
+ g10_exit(0);
+
if( pwfd != -1 ) /* Read the passphrase now. */
read_passphrase_from_fd( pwfd );