aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <[email protected]>2018-01-03 17:34:26 +0000
committerDaniel Kahn Gillmor <[email protected]>2019-07-20 18:16:20 +0000
commit7576681260e643bf63aca874c7d866ab472f8659 (patch)
treefa898003c98aeda859f595556963bf44d36cdd3b
parentgpg: Default to SHA-512 for all signature types on RSA keys. (diff)
downloadgnupg-7576681260e643bf63aca874c7d866ab472f8659.tar.gz
gnupg-7576681260e643bf63aca874c7d866ab472f8659.zip
gpg: Prefer SHA-512 and SHA-384 in personal-digest-preferences.
* g10/keygen.c (keygen_set_std_prefs): prefer SHA-512 and SHA-384 by default. -- In 8ede3ae29a39641a2f98ad9a4cf61ea99085a892, upstream changed the defaults for --default-preference-list to advertise a preference for SHA-512, without touching --personal-digest-preferences. This makes the same change for --personal-digest-preferences, since every modern OpenPGP library supports them all. Signed-off-by: Daniel Kahn Gillmor <[email protected]> Gbp-Pq: Topic update-defaults Gbp-Pq: Name gpg-Prefer-SHA-512-and-SHA-384-in-personal-digest.patch
Diffstat (limited to '')
-rw-r--r--g10/keygen.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/g10/keygen.c b/g10/keygen.c
index aa45ff385..28ef8980b 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -390,16 +390,16 @@ keygen_set_std_prefs (const char *string,int personal)
if (personal)
{
/* The default internal hash algo order is:
- * SHA-256, SHA-384, SHA-512, SHA-224, SHA-1.
+ * SHA-512, SHA-384, SHA-256, SHA-224, SHA-1.
*/
- if (!openpgp_md_test_algo (DIGEST_ALGO_SHA256))
- strcat (dummy_string, "H8 ");
+ if (!openpgp_md_test_algo (DIGEST_ALGO_SHA512))
+ strcat (dummy_string, "H10 ");
if (!openpgp_md_test_algo (DIGEST_ALGO_SHA384))
strcat (dummy_string, "H9 ");
- if (!openpgp_md_test_algo (DIGEST_ALGO_SHA512))
- strcat (dummy_string, "H10 ");
+ if (!openpgp_md_test_algo (DIGEST_ALGO_SHA256))
+ strcat (dummy_string, "H8 ");
}
else
{