[git] GnuPG - branch, master, updated. gnupg-2.1.19-53-g61785b6

by NIIBE Yutaka cvs at cvs.gnupg.org
Wed Mar 15 08:52:12 CET 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  61785b679c542bbd789395fa632eb8b5133b01ad (commit)
       via  ed3248219e921ee24f6f1b2985abb7e0945d70e9 (commit)
       via  a672ddec03f96475866d712b28be18b3fab43aef (commit)
      from  d82abbb1b6e80d5980e6259ddcfc770e65a6b1b3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 61785b679c542bbd789395fa632eb8b5133b01ad
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Wed Mar 15 16:50:48 2017 +0900

    g10: Fix check of serialno.
    
    * g10/card-util.c (card_status): Fix.
    
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/g10/card-util.c b/g10/card-util.c
index 9bc3e25..d643724 100644
--- a/g10/card-util.c
+++ b/g10/card-util.c
@@ -435,7 +435,7 @@ card_status (estream_t fp, char *serialno, size_t serialnobuflen)
 
   if (!serialno)
     ;
-  else if (strlen (serialno)+1 > serialnobuflen)
+  else if (strlen (info.serialno)+1 > serialnobuflen)
     log_error ("serial number longer than expected\n");
   else
     strcpy (serialno, info.serialno);

commit ed3248219e921ee24f6f1b2985abb7e0945d70e9
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Wed Mar 15 16:48:01 2017 +0900

    g10: Remove unused function.
    
    * g10/call-agent.c (select_openpgp): Remove.
    
    --
    
    By this change, the function get_serialno_cb will be also unused.  But
    please don't remove the function, because it will be soon used.
    
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/g10/call-agent.c b/g10/call-agent.c
index 7d627bb..1606797 100644
--- a/g10/call-agent.c
+++ b/g10/call-agent.c
@@ -1028,98 +1028,6 @@ agent_scd_genkey (int keyno, int force, u32 *createtime)
 
 
 

-/* Issue an SCD SERIALNO openpgp command and if SERIALNO is not NULL
-   ask the user to insert the requested card.  */
-gpg_error_t
-select_openpgp (const char *serialno)
-{
-  gpg_error_t err;
-
-  /* Send the serialno command to initialize the connection.  Without
-     a given S/N we don't care about the data returned.  If the card
-     has already been initialized, this is a very fast command.  We
-     request the openpgp card because that is what we expect.
-
-     Note that an opt.limit_card_insert_tries of 1 means: No tries at
-     all whereas 0 means do not limit the number of tries.  Due to the
-     sue of a pinentry prompt with a cancel option we use it here in a
-     boolean sense.  */
-  if (!serialno || opt.limit_card_insert_tries == 1)
-    err = assuan_transact (agent_ctx, "SCD SERIALNO openpgp",
-                           NULL, NULL, NULL, NULL, NULL, NULL);
-  else
-    {
-      char *this_sn = NULL;
-      char *desc;
-      int ask;
-      char *want_sn;
-      char *p;
-
-      want_sn = xtrystrdup (serialno);
-      if (!want_sn)
-        return gpg_error_from_syserror ();
-      p = strchr (want_sn, '/');
-      if (p)
-        *p = 0;
-
-      do
-        {
-          ask = 0;
-          err = assuan_transact (agent_ctx, "SCD SERIALNO openpgp",
-                                 NULL, NULL, NULL, NULL,
-                                 get_serialno_cb, &this_sn);
-          if (gpg_err_code (err) == GPG_ERR_CARD_NOT_PRESENT)
-            ask = 1;
-          else if (gpg_err_code (err) == GPG_ERR_NOT_SUPPORTED)
-            ask = 2;
-          else if (err)
-            ;
-          else if (this_sn)
-            {
-              if (strcmp (want_sn, this_sn))
-                ask = 2;
-            }
-
-          xfree (this_sn);
-          this_sn = NULL;
-
-          if (ask)
-            {
-              char *formatted = NULL;
-              char *ocodeset = i18n_switchto_utf8 ();
-
-              if (!strncmp (want_sn, "D27600012401", 12)
-                  && strlen (want_sn) == 32 )
-                formatted = xtryasprintf ("(%.4s) %.8s",
-                                          want_sn + 16, want_sn + 20);
-
-              err = 0;
-              desc = xtryasprintf
-                ("%s:\n\n"
-                 "  \"%s\"",
-                 ask == 1
-                 ? _("Please insert the card with serial number")
-                 : _("Please remove the current card and "
-                     "insert the one with serial number"),
-                 formatted? formatted : want_sn);
-              if (!desc)
-                err = gpg_error_from_syserror ();
-              xfree (formatted);
-              i18n_switchback (ocodeset);
-              if (!err)
-                err = gpg_agent_get_confirmation (desc);
-              xfree (desc);
-            }
-        }
-      while (ask && !err);
-      xfree (want_sn);
-    }
-
-  return err;
-}
-
-
-

 /* Send a READCERT command to the SCdaemon. */
 int
 agent_scd_readcert (const char *certidstr,

commit a672ddec03f96475866d712b28be18b3fab43aef
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Wed Mar 15 16:45:18 2017 +0900

    tests: Fix running python condition.
    
    * tests/gpgme/gpgme-defs.scm (run-python-tests?): We need Python.
    
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/tests/gpgme/gpgme-defs.scm b/tests/gpgme/gpgme-defs.scm
index 2b104f2..0583774 100644
--- a/tests/gpgme/gpgme-defs.scm
+++ b/tests/gpgme/gpgme-defs.scm
@@ -175,9 +175,10 @@
 (define python (catch #f
 		      (path-expand "python" (string-split (getenv "PATH") *pathsep*))))
 (define (run-python-tests?)
-  (let* ((python-version
-	  (string-trim char-whitespace?
-		       (call-popen `(,python -c "import sys; print('{0}.{1}'.format(sys.version_info[0], sys.version_info[1]))") "")))
-	 (build-path (path-join gpgme-builddir "lang" "python"
-				(string-append "python" python-version "-gpg"))))
-    (trace (file-exists? (trace build-path)))))
+  (and python
+       (let* ((python-version
+	       (string-trim char-whitespace?
+			    (call-popen `(,python -c "import sys; print('{0}.{1}'.format(sys.version_info[0], sys.version_info[1]))") "")))
+	      (build-path (path-join gpgme-builddir "lang" "python"
+				     (string-append "python" python-version "-gpg"))))
+	 (trace (file-exists? (trace build-path))))))

-----------------------------------------------------------------------

Summary of changes:
 g10/call-agent.c           | 92 ----------------------------------------------
 g10/card-util.c            |  2 +-
 tests/gpgme/gpgme-defs.scm | 13 ++++---
 3 files changed, 8 insertions(+), 99 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list