aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
Diffstat (limited to 'g10')
-rw-r--r--g10/gpg.c4
-rw-r--r--g10/options.h1
-rw-r--r--g10/sign.c13
3 files changed, 11 insertions, 7 deletions
diff --git a/g10/gpg.c b/g10/gpg.c
index 060495e25..3fb598c62 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -331,7 +331,6 @@ enum cmd_and_opt_values
oNoExpensiveTrustChecks,
oFixedListMode,
oNoSigCache,
- oNoSigCreateCheck,
oAutoCheckTrustDB,
oNoAutoCheckTrustDB,
oPreservePermissions,
@@ -697,7 +696,6 @@ static ARGPARSE_OPTS opts[] = {
ARGPARSE_s_n (oAutoKeyRetrieve, "auto-key-retrieve", "@"),
ARGPARSE_s_n (oNoAutoKeyRetrieve, "no-auto-key-retrieve", "@"),
ARGPARSE_s_n (oNoSigCache, "no-sig-cache", "@"),
- ARGPARSE_s_n (oNoSigCreateCheck, "no-sig-create-check", "@"),
ARGPARSE_s_n (oAutoCheckTrustDB, "auto-check-trustdb", "@"),
ARGPARSE_s_n (oNoAutoCheckTrustDB, "no-auto-check-trustdb", "@"),
ARGPARSE_s_n (oMergeOnly, "merge-only", "@" ),
@@ -776,6 +774,7 @@ static ARGPARSE_OPTS opts[] = {
/* Dummy options. */
ARGPARSE_s_n (oNoop, "sk-comments", "@"),
ARGPARSE_s_n (oNoop, "no-sk-comments", "@"),
+ ARGPARSE_s_n (oNoop, "no-sig-create-check", "@"),
ARGPARSE_end ()
};
@@ -2816,7 +2815,6 @@ main (int argc, char **argv)
}
break;
case oNoSigCache: opt.no_sig_cache = 1; break;
- case oNoSigCreateCheck: opt.no_sig_create_check = 1; break;
case oAllowNonSelfsignedUID: opt.allow_non_selfsigned_uid = 1; break;
case oNoAllowNonSelfsignedUID: opt.allow_non_selfsigned_uid=0; break;
case oAllowFreeformUID: opt.allow_freeform_uid = 1; break;
diff --git a/g10/options.h b/g10/options.h
index 9b12b7769..cc8718eee 100644
--- a/g10/options.h
+++ b/g10/options.h
@@ -194,7 +194,6 @@ struct
int try_all_secrets;
int no_expensive_trust_checks;
int no_sig_cache;
- int no_sig_create_check;
int no_auto_check_trustdb;
int preserve_permissions;
int no_homedir_creation;
diff --git a/g10/sign.c b/g10/sign.c
index e7e79cc21..58bc98132 100644
--- a/g10/sign.c
+++ b/g10/sign.c
@@ -291,10 +291,16 @@ do_sign( PKT_secret_key *sk, PKT_signature *sig,
gcry_mpi_release (frame);
}
- if (!rc && !opt.no_sig_create_check) {
+ if (!rc
+#if GCRYPT_VERSION_NUMBER >= 0x010700 /* Libgcrypt >= 1.7 */
+ && is_DSA (sk->pubkey_algo)
+#endif /* Libgcrypt >= 1.7 */
+ )
+ {
/* Check that the signature verification worked and nothing is
- * fooling us e.g. by a bug in the signature create
- * code or by deliberately introduced faults. */
+ * fooling us e.g. by a bug in the signature creation code or by
+ * deliberately introduced faults. Libgcrypt 1.7 includes
+ * this check for RSA and thus we don't need it in that case. */
PKT_public_key *pk = xmalloc_clear (sizeof *pk);
if( get_pubkey( pk, sig->keyid ) )
@@ -312,6 +318,7 @@ do_sign( PKT_secret_key *sk, PKT_signature *sig,
g10_errstr (rc));
free_public_key (pk);
}
+
if( rc )
log_error(_("signing failed: %s\n"), g10_errstr(rc) );
else {