mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
sm: Simplify code.
* sm/verify.c (gpgsm_verify): Simplify by using a newer gcrypt interface. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
30c71a9476
commit
f9cb15b385
@ -341,16 +341,11 @@ gpgsm_verify (ctrl_t ctrl, int in_fd, int data_fd, estream_t out_fp)
|
||||
&msgdigest, &msgdigestlen);
|
||||
if (!rc)
|
||||
{
|
||||
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);
|
||||
is_enabled = sizeof algo;
|
||||
if ( gcry_md_info (data_md, GCRYCTL_IS_ALGO_ENABLED,
|
||||
&algo, &is_enabled)
|
||||
|| !is_enabled)
|
||||
if (! gcry_md_is_enabled (data_md, algo))
|
||||
{
|
||||
log_error ("digest algo %d (%s) has not been enabled\n",
|
||||
algo, algoid?algoid:"");
|
||||
|
Loading…
x
Reference in New Issue
Block a user