summaryrefslogtreecommitdiffstats
path: root/g10/main.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2014-09-27 15:21:02 +0200
committerWerner Koch <wk@gnupg.org>2014-09-27 15:28:17 +0200
commitd33246700578cddd1cb8ed8164cfbba50aba4ef3 (patch)
treedd821f0ef7465282b96eac5667276481788ad7dd /g10/main.h
parentgpg: Simplify command --gen-key and add --full-gen-key. (diff)
downloadgnupg2-d33246700578cddd1cb8ed8164cfbba50aba4ef3.tar.xz
gnupg2-d33246700578cddd1cb8ed8164cfbba50aba4ef3.zip
gpg: Default to SHA-256 for all signature types on RSA keys.
* g10/main.h (DEFAULT_DIGEST_ALGO): Use SHA256 in --gnupg and SHA1 in strict RFC or PGP modes. * g10/sign.c (make_keysig_packet): Use DEFAULT_DIGEST_ALGO also for RSA key signatures. * configure.ac: Do not allow to disable sha256.
Diffstat (limited to 'g10/main.h')
-rw-r--r--g10/main.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/g10/main.h b/g10/main.h
index 17a050d54..76541c771 100644
--- a/g10/main.h
+++ b/g10/main.h
@@ -38,7 +38,7 @@
# define DEFAULT_CIPHER_ALGO CIPHER_ALGO_3DES
#endif
-#define DEFAULT_DIGEST_ALGO DIGEST_ALGO_SHA1
+#define DEFAULT_DIGEST_ALGO ((GNUPG)? DIGEST_ALGO_SHA256:DIGEST_ALGO_SHA1)
#define DEFAULT_S2K_DIGEST_ALGO DIGEST_ALGO_SHA1
#ifdef HAVE_ZIP
# define DEFAULT_COMPRESS_ALGO COMPRESS_ALGO_ZIP