aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2026-10-12 14:20:27 +0200
committerWerner Koch <[email protected]>2026-10-12 14:20:51 +0200
commit2a5004bc60f42214a86777333132bf2d28d290c1 (patch)
treeb0dbb8e35d3cdf88b15c60843222174267902edb
parentgpgconf: Make gpg option --throw-keyids available. (diff)
downloadgnupg-2a5004bc60f42214a86777333132bf2d28d290c1.tar.gz
gnupg-2a5004bc60f42214a86777333132bf2d28d290c1.zip
gpgsm: Change signing fallback hash from SHA1 to SHA256.
* sm/sign.c (gpgsm_sign): Change fallback algorithm
-rw-r--r--sm/sign.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sm/sign.c b/sm/sign.c
index f4415d169..4a15f91ea 100644
--- a/sm/sign.c
+++ b/sm/sign.c
@@ -889,9 +889,9 @@ gpgsm_sign (ctrl_t ctrl, certlist_t signerlist,
log_info (_("hash algorithm %d (%s) for signer %d not supported;"
" using %s\n"),
cl->hash_algo, oid? oid: "?", i,
- gcry_md_algo_name (GCRY_MD_SHA1));
- cl->hash_algo = GCRY_MD_SHA1;
- oid = "1.3.14.3.2.26";
+ gcry_md_algo_name (GCRY_MD_SHA256));
+ cl->hash_algo = GCRY_MD_SHA256;
+ oid = "2.16.840.1.101.3.4.2.1"; /* sha256 */
break;
}
cl->hash_algo_oid = oid;