[git] GCRYPT - branch, master, updated. libgcrypt-1.5.0-355-g6d169b6

by Werner Koch cvs at cvs.gnupg.org
Wed Nov 6 08:57:33 CET 2013


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 crypto library".

The branch, master has been updated
       via  6d169b654c7ff04c10f73afe80b2c70cefa410c1 (commit)
      from  b9fd3988b54b50109f4e7179e7fe0739bb1d97c5 (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 6d169b654c7ff04c10f73afe80b2c70cefa410c1
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Nov 6 08:56:02 2013 +0100

    pubkey: Add forward compatibility feature.
    
    * cipher/pubkey-util.c (_gcry_pk_util_parse_flaglist): Add
    "igninvflag".
    --
    
    If future versions of Libgcrypt want to add optional flags to a pubkey
    s-expression, they may use the "igninvflag" flag to make the flag
    parser ignore flags it does not know about.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/cipher/pubkey-util.c b/cipher/pubkey-util.c
index a91e66f..a591c0d 100644
--- a/cipher/pubkey-util.c
+++ b/cipher/pubkey-util.c
@@ -60,6 +60,7 @@ _gcry_pk_util_parse_flaglist (gcry_sexp_t list,
   int i;
   int encoding = PUBKEY_ENC_UNKNOWN;
   int flags = 0;
+  int igninvflag = 0;
 
   for (i=list?gcry_sexp_length (list)-1:0; i > 0; i--)
     {
@@ -80,7 +81,7 @@ _gcry_pk_util_parse_flaglist (gcry_sexp_t list,
               encoding = PUBKEY_ENC_RAW;
               flags |= PUBKEY_FLAG_RAW_FLAG; /* Explicitly given.  */
             }
-          else
+          else if (!igninvflag)
             rc = GPG_ERR_INV_FLAG;
           break;
 
@@ -97,7 +98,7 @@ _gcry_pk_util_parse_flaglist (gcry_sexp_t list,
               encoding = PUBKEY_ENC_RAW;
               flags |= PUBKEY_FLAG_GOST;
             }
-          else
+          else if (!igninvflag)
             rc = GPG_ERR_INV_FLAG;
           break;
 
@@ -112,7 +113,7 @@ _gcry_pk_util_parse_flaglist (gcry_sexp_t list,
               encoding = PUBKEY_ENC_PKCS1;
               flags |= PUBKEY_FLAG_FIXEDLEN;
             }
-          else
+          else if (!igninvflag)
             rc = GPG_ERR_INV_FLAG;
           break;
 
@@ -121,23 +122,28 @@ _gcry_pk_util_parse_flaglist (gcry_sexp_t list,
             flags |= PUBKEY_FLAG_RFC6979;
           else if (!memcmp (s, "noparam", 7))
             flags |= PUBKEY_FLAG_NOPARAM;
-          else
+          else if (!igninvflag)
             rc = GPG_ERR_INV_FLAG;
           break;
 
         case 8:
           if (!memcmp (s, "use-x931", 8))
             flags |= PUBKEY_FLAG_USE_X931;
-          else
+          else if (!igninvflag)
             rc = GPG_ERR_INV_FLAG;
           break;
 
+        case 10:
+          if (!memcmp (s, "igninvflag", 10))
+            igninvflag = 1;
+          break;
+
         case 11:
           if (!memcmp (s, "no-blinding", 11))
             flags |= PUBKEY_FLAG_NO_BLINDING;
           else if (!memcmp (s, "use-fips186", 11))
             flags |= PUBKEY_FLAG_USE_FIPS186;
-          else
+          else if (!igninvflag)
             rc = GPG_ERR_INV_FLAG;
           break;
 
@@ -146,12 +152,13 @@ _gcry_pk_util_parse_flaglist (gcry_sexp_t list,
             flags |= PUBKEY_FLAG_USE_FIPS186_2;
           else if (!memcmp (s, "transient-key", 13))
             flags |= PUBKEY_FLAG_TRANSIENT_KEY;
-          else
+          else if (!igninvflag)
             rc = GPG_ERR_INV_FLAG;
           break;
 
         default:
-          rc = GPG_ERR_INV_FLAG;
+          if (!igninvflag)
+            rc = GPG_ERR_INV_FLAG;
           break;
         }
     }

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

Summary of changes:
 cipher/pubkey-util.c |   23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
The GNU crypto library
http://git.gnupg.org




More information about the Gnupg-commits mailing list