gpg: Fix regression removing SHA256.

* g10/misc.c (map_md_openpgp_to_gcry): Always use SHA256.
--

Regression due to commit d332467005

GnuPG-bug-id: 1733.
This commit is contained in:
Werner Koch 2014-10-02 19:17:34 +02:00
parent f2361e6d58
commit 688a903b4b
2 changed files with 1 additions and 5 deletions

View File

@ -259,7 +259,7 @@ GNUPG_GPG_DISABLE_ALGO([camellia192],[CAMELLIA192 cipher])
GNUPG_GPG_DISABLE_ALGO([camellia256],[CAMELLIA256 cipher])
GNUPG_GPG_DISABLE_ALGO([md5],[MD5 hash])
# SHA1 is a MUSt algorithm
# SHA1 is a MUST algorithm
GNUPG_GPG_DISABLE_ALGO([rmd160],[RIPE-MD160 hash])
GNUPG_GPG_DISABLE_ALGO([sha224],[SHA-224 hash])
# SHA256 is a MUST algorithm for GnuPG.

View File

@ -686,11 +686,7 @@ map_md_openpgp_to_gcry (digest_algo_t algo)
case DIGEST_ALGO_SHA224: return 0;
#endif
#ifdef GPG_USE_SHA256
case DIGEST_ALGO_SHA256: return GCRY_MD_SHA256;
#else
case DIGEST_ALGO_SHA256: return 0;
#endif
#ifdef GPG_USE_SHA384
case DIGEST_ALGO_SHA384: return GCRY_MD_SHA384;