[git] GnuPG - branch, master, updated. gnupg-2.2.7-383-g3384ba6

by Werner Koch cvs at cvs.gnupg.org
Thu Feb 21 08:52:37 CET 2019


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  3384ba6c1c421cfa674dbd8294dc655d7320534e (commit)
       via  5ecc7a02609dde65096ddb12e0ff8f6bce3b774a (commit)
       via  d7a54ca461ad75e4fab77a2f1b25986c7637762a (commit)
      from  2013cb5ee667610de35f8b92c2f979f5caa09d4c (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 3384ba6c1c421cfa674dbd8294dc655d7320534e
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Feb 21 08:42:33 2019 +0100

    card: Print the keyref in the listing.
    
    * tools/gpg-card-tool.c (list_one_kinfo): Print the keyref.
    --
    
    The named keys are nice but knowing the actual keyref mapping to them
    is also useful.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/tools/card-tool-yubikey.c b/tools/card-tool-yubikey.c
index a03915a..996bbf0 100644
--- a/tools/card-tool-yubikey.c
+++ b/tools/card-tool-yubikey.c
@@ -169,7 +169,7 @@ set_ul_config_value (struct ykapps_s *yk,
    * application and thus its transport again.  */
   if (bitflag == YKAPP_USB_ENABLED && !(ul & (0x08|0x10|0x20)))
     {
-      log_info ("Enabling PIV so that at least one CCI transport is enabled\n");
+      log_info ("Enabling PIV to have at least one CCID transport\n");
       ul |= 0x10;
     }
 
diff --git a/tools/gpg-card-tool.c b/tools/gpg-card-tool.c
index 2bc2e5f..a13a6bd 100644
--- a/tools/gpg-card-tool.c
+++ b/tools/gpg-card-tool.c
@@ -631,6 +631,7 @@ list_one_kinfo (key_info_t firstkinfo, key_info_t kinfo, estream_t fp)
           goto leave;
         }
       print_keygrip (fp, kinfo->grip);
+      tty_fprintf (fp, "      keyref .....: %s\n", kinfo->keyref);
       if (!scd_readkey (kinfo->keyref, &s_pkey))
         {
           char *tmp = pubkey_algo_string (s_pkey);

commit 5ecc7a02609dde65096ddb12e0ff8f6bce3b774a
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Feb 21 08:40:59 2019 +0100

    scd: Don't let the "undefined" app cause a conflict error.
    
    * scd/app.c (check_conflict): Ignore "undefined".
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/scd/app.c b/scd/app.c
index 2e2729e..8d4d1c0 100644
--- a/scd/app.c
+++ b/scd/app.c
@@ -121,6 +121,9 @@ check_conflict (app_t app, const char *name)
   if (!app || !name || (app->apptype && !ascii_strcasecmp (app->apptype, name)))
     return 0;
 
+  if (app->apptype && !strcmp (app->apptype, "UNDEFINED"))
+    return 0;
+
   log_info ("application '%s' in use - can't switch\n",
             app->apptype? app->apptype : "<null>");
 

commit d7a54ca461ad75e4fab77a2f1b25986c7637762a
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Feb 21 08:51:27 2019 +0100

    sm: Prepare algo mapping to handle values > 255.
    
    * sm/misc.c (transform_sigval): Allow for larger values of MDALGO and
    PKALGO.
    --
    
    Libgcrypt already defines larger values for them, so we should be
    prepared in case we use them in the future.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/sm/misc.c b/sm/misc.c
index 4672f26..9545293 100644
--- a/sm/misc.c
+++ b/sm/misc.c
@@ -204,41 +204,44 @@ transform_sigval (const unsigned char *sigval, size_t sigvallen, int mdalgo,
     return err;
 
   /* Map the hash algorithm to an OID.  */
-  switch (mdalgo | (pkalgo << 8))
+  if (mdalgo < 0 || mdalgo > (1<<15) || pkalgo < 0 || pkalgo > (1<<15))
+    return gpg_error (GPG_ERR_DIGEST_ALGO);
+
+  switch (mdalgo | (pkalgo << 16))
     {
-    case GCRY_MD_SHA1 | (GCRY_PK_RSA << 8):
+    case GCRY_MD_SHA1 | (GCRY_PK_RSA << 16):
       oid = "1.2.840.113549.1.1.5";  /* sha1WithRSAEncryption */
       break;
 
-    case GCRY_MD_SHA256 | (GCRY_PK_RSA << 8):
+    case GCRY_MD_SHA256 | (GCRY_PK_RSA << 16):
       oid = "1.2.840.113549.1.1.11"; /* sha256WithRSAEncryption */
       break;
 
-    case GCRY_MD_SHA384 | (GCRY_PK_RSA << 8):
+    case GCRY_MD_SHA384 | (GCRY_PK_RSA << 16):
       oid = "1.2.840.113549.1.1.12"; /* sha384WithRSAEncryption */
       break;
 
-    case GCRY_MD_SHA512 | (GCRY_PK_RSA << 8):
+    case GCRY_MD_SHA512 | (GCRY_PK_RSA << 16):
       oid = "1.2.840.113549.1.1.13"; /* sha512WithRSAEncryption */
       break;
 
-    case GCRY_MD_SHA224 | (GCRY_PK_ECC << 8):
+    case GCRY_MD_SHA224 | (GCRY_PK_ECC << 16):
       oid = "1.2.840.10045.4.3.1"; /* ecdsa-with-sha224 */
       break;
 
-    case GCRY_MD_SHA256 | (GCRY_PK_ECC << 8):
+    case GCRY_MD_SHA256 | (GCRY_PK_ECC << 16):
       oid = "1.2.840.10045.4.3.2"; /* ecdsa-with-sha256 */
       break;
 
-    case GCRY_MD_SHA384 | (GCRY_PK_ECC << 8):
+    case GCRY_MD_SHA384 | (GCRY_PK_ECC << 16):
       oid = "1.2.840.10045.4.3.3"; /* ecdsa-with-sha384 */
       break;
 
-    case GCRY_MD_SHA512 | (GCRY_PK_ECC << 8):
+    case GCRY_MD_SHA512 | (GCRY_PK_ECC << 16):
       oid = "1.2.840.10045.4.3.4"; /* ecdsa-with-sha512 */
       break;
 
-    case GCRY_MD_SHA512 | (GCRY_PK_EDDSA << 8):
+    case GCRY_MD_SHA512 | (GCRY_PK_EDDSA << 16):
       oid = "1.3.101.112"; /* ed25519 */
       break;
 

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

Summary of changes:
 scd/app.c                 |  3 +++
 sm/misc.c                 | 23 +++++++++++++----------
 tools/card-tool-yubikey.c |  2 +-
 tools/gpg-card-tool.c     |  1 +
 4 files changed, 18 insertions(+), 11 deletions(-)


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




More information about the Gnupg-commits mailing list