tawasuyu

sergio/takana

> Una distribución Linux construida con un laboratorio funcional y hermético en el > sótano, y una terminal mutable, clásica y anárquica en el piso de arriba — diseñada > desde el suelo para que una IA programadora entienda, modifique y co…

⎇ a1cca429bf0af990613a36883fedc24a720bf994 recipes/incoming/0340-gpg-prefer-sha512-and-sha384-in-personal-digest.patch 48 líneas · 1.9 KB Historia crudo

Etapa G: abre la cola C — tmux (corpus 278→279), valida libs base a1cca429b · sergio ·

1From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2Date: Wed, 3 Jan 2018 12:34:26 -0500
3Subject: gpg: Prefer SHA-512 and SHA-384 in personal-digest-preferences.
4
5* g10/keygen.c (keygen_set_std_prefs): prefer SHA-512
6and SHA-384 by default.
7
8--
9
10In 8ede3ae29a39641a2f98ad9a4cf61ea99085a892, upstream changed the
11defaults for --default-preference-list to advertise a preference for
12SHA-512, without touching --personal-digest-preferences.  This makes
13the same change for --personal-digest-preferences, since every modern
14OpenPGP library supports them all.
15
16Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
17---
18 g10/keygen.c | 10 +++++-----
19 1 file changed, 5 insertions(+), 5 deletions(-)
20
21Patch-Source: https://sources.debian.org/data/main/g/gnupg2/2.2.27-2/debian/patches/update-defaults/gpg-Prefer-SHA-512-and-SHA-384-in-personal-digest.patch
22
23diff --git a/g10/keygen.c b/g10/keygen.c
24index 79d4579..cb92468 100644
25--- a/g10/keygen.c
26+++ b/g10/keygen.c
27@@ -391,16 +391,16 @@ keygen_set_std_prefs (const char *string,int personal)
28             if (personal)
29               {
30                 /* The default internal hash algo order is:
31-                 *  SHA-256, SHA-384, SHA-512, SHA-224, SHA-1.
32+                 *  SHA-512, SHA-384, SHA-256, SHA-224, SHA-1.
33                  */
34-                if (!openpgp_md_test_algo (DIGEST_ALGO_SHA256))
35-                  strcat (dummy_string, "H8 ");
36+                if (!openpgp_md_test_algo (DIGEST_ALGO_SHA512))
37+                  strcat (dummy_string, "H10 ");
38 
39                 if (!openpgp_md_test_algo (DIGEST_ALGO_SHA384))
40                   strcat (dummy_string, "H9 ");
41 
42-                if (!openpgp_md_test_algo (DIGEST_ALGO_SHA512))
43-                  strcat (dummy_string, "H10 ");
44+                if (!openpgp_md_test_algo (DIGEST_ALGO_SHA256))
45+                  strcat (dummy_string, "H8 ");
46               }
47             else
48               {