[git] GnuPG - branch, wk/test-master, updated. gnupg-2.1.0-beta864-21-gbf91c4c

by Werner Koch cvs at cvs.gnupg.org
Mon Oct 13 15:16:46 CEST 2014


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, wk/test-master has been updated
       via  bf91c4c8d50ba6fc9ab06f79b02c01389e337c5e (commit)
       via  fab89f159bcb36ea7285af661d5756eefa981822 (commit)
       via  21c0ea6bafafbcc4a2e07f0ac76275cc0229e9a0 (commit)
       via  c60814a5ce13932d933b363abc0c60c12783ae2f (commit)
       via  a2567225373a7e4e4a6eb0cba1d9ab6ff2d1330a (commit)
       via  2543f0ab9c7b4247347688863f898667bae31984 (commit)
      from  bb961e062bbf1011ef3430afdf2075561ba400ab (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 bf91c4c8d50ba6fc9ab06f79b02c01389e337c5e
Merge: bb961e0 fab89f1
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Oct 13 15:13:44 2014 +0200

    Merge branch 'master' into wk/test-master

diff --cc g10/keyid.c
index f1fbec2,8b4eeb1..662806b
--- a/g10/keyid.c
+++ b/g10/keyid.c
@@@ -680,22 -706,69 +680,23 @@@ colon_expirestr_from_sig (PKT_signatur
  byte *
  fingerprint_from_pk (PKT_public_key *pk, byte *array, size_t *ret_len)
  {
 -  byte *buf;
    const byte *dp;
 -  size_t len, nbytes;
 -  int i;
 -
 -  if ( pk->version < 4 )
 -    {
 -      if ( is_RSA(pk->pubkey_algo) )
 -        {
 -          /* RSA in version 3 packets is special. */
 -          gcry_md_hd_t md;
 -
 -          if (gcry_md_open (&md, DIGEST_ALGO_MD5, 0))
 -            BUG ();
 -          if ( pubkey_get_npkey (pk->pubkey_algo) > 1 )
 -            {
 -              for (i=0; i < 2; i++)
 -                {
 -                  if (gcry_mpi_print (GCRYMPI_FMT_USG, NULL, 0,
 -                                      &nbytes, pk->pkey[i]))
 -                    BUG ();
 -                  /* fixme: Better allocate BUF on the stack */
 -                  buf = xmalloc (nbytes);
 -                  if (gcry_mpi_print (GCRYMPI_FMT_USG, buf, nbytes,
 -                                      NULL, pk->pkey[i]))
 -                    BUG ();
 -                  gcry_md_write (md, buf, nbytes);
 -                  xfree (buf);
 -                }
 -            }
 -          gcry_md_final (md);
 -          if (!array)
 -            array = xmalloc (16);
 -          len = 16;
 -          memcpy (array, gcry_md_read (md, DIGEST_ALGO_MD5), 16);
 -          gcry_md_close(md);
 -        }
 -      else
 -        {
 -          if (!array)
 -            array = xmalloc(16);
 -          len = 16;
 -          memset (array,0,16);
 -        }
 -    }
 -  else
 -    {
 -      gcry_md_hd_t md;
 +  size_t len;
 +  gcry_md_hd_t md;
  
 -      md = do_fingerprint_md(pk);
 -      dp = gcry_md_read( md, 0 );
 -      len = gcry_md_get_algo_dlen (gcry_md_get_algo (md));
 -      assert( len <= MAX_FINGERPRINT_LEN );
 -      if (!array)
 -        array = xmalloc ( len );
 -      memcpy (array, dp, len );
 -      pk->keyid[0] = dp[12] << 24 | dp[13] << 16 | dp[14] << 8 | dp[15] ;
 -      pk->keyid[1] = dp[16] << 24 | dp[17] << 16 | dp[18] << 8 | dp[19] ;
 -      gcry_md_close( md);
 -    }
 +  md = do_fingerprint_md(pk);
 +  dp = gcry_md_read( md, 0 );
 +  len = gcry_md_get_algo_dlen (gcry_md_get_algo (md));
 +  assert( len <= MAX_FINGERPRINT_LEN );
 +  if (!array)
 +    array = xmalloc ( len );
 +  memcpy (array, dp, len );
 +  pk->keyid[0] = dp[12] << 24 | dp[13] << 16 | dp[14] << 8 | dp[15] ;
 +  pk->keyid[1] = dp[16] << 24 | dp[17] << 16 | dp[18] << 8 | dp[19] ;
 +  gcry_md_close( md);
  
-   *ret_len = len;
+   if (ret_len)
+     *ret_len = len;
    return array;
  }
  

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

Summary of changes:
 doc/DETAILS                                     |    2 +-
 g10/getkey.c                                    |  111 +++++++++++++++++++----
 g10/gpg.h                                       |    3 +-
 g10/import.c                                    |   44 ++++-----
 g10/keydb.c                                     |   33 +++++--
 g10/keydb.h                                     |    5 +-
 g10/keyid.c                                     |    3 +-
 tests/openpgp/Makefile.am                       |    4 +-
 tests/openpgp/conventional-mdc.test             |    8 +-
 tests/openpgp/conventional.test                 |   12 ++-
 tests/openpgp/import.test                       |   15 +++
 tests/openpgp/samplekeys/README                 |    2 +
 tests/openpgp/samplekeys/dda252ebb8ebe1af-1.asc |   29 ++++++
 tests/openpgp/samplekeys/dda252ebb8ebe1af-2.asc |   29 ++++++
 14 files changed, 236 insertions(+), 64 deletions(-)
 create mode 100644 tests/openpgp/samplekeys/dda252ebb8ebe1af-1.asc
 create mode 100644 tests/openpgp/samplekeys/dda252ebb8ebe1af-2.asc


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




More information about the Gnupg-commits mailing list