[Pkg-gnupg-commit] [gnupg2] 26/185: sm: Simplify code.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Mon Aug 7 11:55:17 UTC 2017


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch experimental
in repository gnupg2.

commit f9cb15b385f64f7c9403670f03632f81a874f213
Author: Justus Winter <justus at g10code.com>
Date:   Wed May 31 12:51:56 2017 +0200

    sm: Simplify code.
    
    * sm/verify.c (gpgsm_verify): Simplify by using a newer gcrypt
    interface.
    
    Signed-off-by: Justus Winter <justus at g10code.com>
---
 sm/verify.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/sm/verify.c b/sm/verify.c
index 6c034e6..7bdc68b 100644
--- a/sm/verify.c
+++ b/sm/verify.c
@@ -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:"");

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list