diff options
Diffstat (limited to 'sm/verify.c')
-rw-r--r-- | sm/verify.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sm/verify.c b/sm/verify.c index 201fc7b55..e6e08c06c 100644 --- a/sm/verify.c +++ b/sm/verify.c @@ -286,11 +286,16 @@ gpgsm_verify (CTRL ctrl, int in_fd, int data_fd, FILE *out_fp) &msgdigest, &msgdigestlen); if (!err) { + size_t is_enabled; + algoid = ksba_cms_get_digest_algo (cms, signer); algo = gcry_md_map_name (algoid); if (DBG_X509) log_debug ("signer %d - digest algo: %d\n", signer, algo); - if ( !gcry_md_info (data_md, GCRYCTL_IS_ALGO_ENABLED, &algo, NULL) ) + is_enabled = sizeof algo; + if ( gcry_md_info (data_md, GCRYCTL_IS_ALGO_ENABLED, + &algo, &is_enabled) + || !is_enabled) { log_error ("digest algo %d has not been enabled\n", algo); goto next_signer; |