1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

gpg: Fix recent commit for weak digest algos and smartcards.

* g10/sign.c (sign_file): Fix condition.
--

Fixes-commit: 4c181d51a6f1fd05b7f190a18769ba5e9f892f6a
Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2020-11-09 12:21:27 +01:00
parent 549dc8cfe9
commit 21d5323f5d
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -1095,7 +1095,7 @@ sign_file (ctrl_t ctrl, strlist_t filenames, int detached, strlist_t locusr,
single hash for all signatures. All this may well have single hash for all signatures. All this may well have
to change as the cards add algorithms. */ to change as the cards add algorithms. */
if (!smartcard || (smartcard && hint.digest_length==20) if ((!smartcard || (smartcard && hint.digest_length==20))
&& (algo = select_algo_from_prefs(pk_list,PREFTYPE_HASH, && (algo = select_algo_from_prefs(pk_list,PREFTYPE_HASH,
-1,&hint)) > 0) -1,&hint)) > 0)
{ {