summaryrefslogtreecommitdiff
path: root/g10/gpg.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/gpg.c')
-rw-r--r--g10/gpg.c37
1 files changed, 29 insertions, 8 deletions
diff --git a/g10/gpg.c b/g10/gpg.c
index 6b44cfb..dbbe990 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -75,10 +75,6 @@
#define MY_O_BINARY 0
#endif
-#ifdef __MINGW32__
-int _dowildcard = -1;
-#endif
-
enum cmd_and_opt_values
{
aNull = 0,
@@ -430,6 +426,7 @@ enum cmd_and_opt_values
oUseOnlyOpenPGPCard,
oIncludeKeyBlock,
oNoIncludeKeyBlock,
+ oForceSignKey,
oNoop
};
@@ -838,6 +835,7 @@ static ARGPARSE_OPTS opts[] = {
ARGPARSE_s_s (oWeakDigest, "weak-digest","@"),
ARGPARSE_s_n (oUnwrap, "unwrap", "@"),
ARGPARSE_s_n (oOnlySignTextIDs, "only-sign-text-ids", "@"),
+ ARGPARSE_s_n (oForceSignKey, "force-sign-key", "@"),
/* Aliases. I constantly mistype these, and assume other people do
as well. */
@@ -972,7 +970,13 @@ static struct debug_flags_s debug_flags [] =
int g10_errors_seen = 0;
-static int utf8_strings = 0;
+static int utf8_strings =
+#ifdef HAVE_W32_SYSTEM
+ 1
+#else
+ 0
+#endif
+ ;
static int maybe_setuid = 1;
static char *build_list( const char *text, char letter,
@@ -1133,6 +1137,10 @@ my_strusage( int level )
p = zips;
break;
+ case 95:
+ p = "1"; /* <-- Enable globbing under Windows (see init.c) */
+ break;
+
default: p = NULL;
}
return p;
@@ -1848,7 +1856,7 @@ list_config(char *items)
es_printf ("cfg:curveoid:");
for (iter=0, first=1; (s = openpgp_enum_curves (&iter)); first = 0)
{
- s = openpgp_curve_to_oid (s, NULL);
+ s = openpgp_curve_to_oid (s, NULL, NULL);
es_printf ("%s%s", first?"":";", s? s:"[?]");
}
es_printf ("\n");
@@ -1904,6 +1912,11 @@ gpgconf_list (const char *configfile)
the top of keygen.c */
es_printf ("default_pubkey_algo:%lu:\"%s:\n", GC_OPT_FLAG_DEFAULT,
get_default_pubkey_algo ());
+ /* This info only mode tells whether the we are running in de-vs
+ * compliance mode. This does not test all parameters but the basic
+ * conditions like a proper RNG and Libgcrypt. */
+ es_printf ("compliance_de_vs:%lu:%d:\n", GC_OPT_FLAG_DEFAULT,
+ opt.compliance==CO_DE_VS && gnupg_rng_is_compliant (CO_DE_VS));
xfree (configfile_esc);
}
@@ -2674,6 +2687,9 @@ main (int argc, char **argv)
case oAnswerYes: opt.answer_yes = 1; break;
case oAnswerNo: opt.answer_no = 1; break;
+
+ case oForceSignKey: opt.flags.force_sign_key = 1; break;
+
case oKeyring: append_to_strlist( &nrings, pargs.r.ret_str); break;
case oPrimaryKeyring:
sl = append_to_strlist (&nrings, pargs.r.ret_str);
@@ -3298,7 +3314,11 @@ main (int argc, char **argv)
opt.verify_options&=~VERIFY_SHOW_NOTATIONS;
break;
case oUtf8Strings: utf8_strings = 1; break;
- case oNoUtf8Strings: utf8_strings = 0; break;
+ case oNoUtf8Strings:
+#ifdef HAVE_W32_SYSTEM
+ utf8_strings = 0;
+#endif
+ break;
case oDisableCipherAlgo:
{
int algo = string_to_cipher_algo (pargs.r.ret_str);
@@ -3788,7 +3808,8 @@ main (int argc, char **argv)
log_error(_("invalid min-cert-level; must be 1, 2, or 3\n"));
switch( opt.s2k_mode ) {
case 0:
- log_info(_("Note: simple S2K mode (0) is strongly discouraged\n"));
+ if (!opt.quiet)
+ log_info(_("Note: simple S2K mode (0) is strongly discouraged\n"));
break;
case 1: case 3: break;
default: