1. 05 Nov, 2016 1 commit
  2. 04 Nov, 2016 5 commits
  3. 03 Nov, 2016 4 commits
    • Werner Koch's avatar
      agent: Extend the PINENTRY_LAUNCHED inquiry and status. · c1ea0b57
      Werner Koch authored
      * agent/call-pinentry.c (start_pinentry): Get flavor and version and
      pass it to agent_inq_pinentry_launched.
      * agent/command.c (agent_inq_pinentry_launched): Add arg EXTRA.
      * g10/server.c (gpg_proxy_pinentry_notify): Print a new diagnostic.
      Signed-off-by: default avatarWerner Koch <wk@gnupg.org>
      c1ea0b57
    • Justus Winter's avatar
      g10: Improve and unify key selection for -r and --locate-keys. · ab89164b
      Justus Winter authored
      * g10/getkey.c (struct pubkey_cmp_cookie): New type.
      (key_is_ok, uid_is_ok, subkey_is_ok): New functions.
      (pubkey_cmp): Likewise.
      (get_best_pubkey_byname): Likewise.
      * g10/keydb.h (get_best_pubkey_byname): New prototype.
      * g10/keylist.c (locate_one): Use the new function.
      * g10/pkclist.c (find_and_check_key): Likewise.
      * tests/openpgp/Makefile.am (XTESTS): Add new test.
      (TEST_FILES): Add new files.
      * tests/openpgp/key-selection.scm: New file.
      * tests/openpgp/key-selection/0.asc: Likewise.
      * tests/openpgp/key-selection/1.asc: Likewise.
      * tests/openpgp/key-selection/2.asc: Likewise.
      * tests/openpgp/key-selection/3.asc: Likewise.
      * tests/openpgp/key-selection/4.asc: Likewise.
      --
      
      When a name resembling a mail address is given to either --locate-keys
      or --recipient, rank the search results and use only the most relevant
      key.
      
      This also lets us query which key will be used for encryption using
      --locate-keys.  However, note that --locate-keys may also return keys
      incapable of encryption, though it will prefer keys that have an
      encryption subkey.
      
      GnuPG-bug-id: 2359
      Signed-off-by: default avatarJustus Winter <justus@g10code.com>
      ab89164b
    • Justus Winter's avatar
      gpgscm,tests: Add new functions to the test environment. · 1ec07cbc
      Justus Winter authored
      * tests/gpgscm/lib.scm (first, last, powerset): New functions.
      * tests/gpgscm/tests.scm (interactive-shell): New function.
      * tests/openpgp/Makefile.am (EXTRA_DIST): Add new file.
      * tests/openpgp/README: Document 'interactive-shell'.
      * tests/openpgp/shell.scm: New file.
      Signed-off-by: default avatarJustus Winter <justus@g10code.com>
      1ec07cbc
    • Werner Koch's avatar
      gpgconf: Add a new field to the --query-swdb output. · d10b67b9
      Werner Koch authored
      * tools/gpgconf.c (query_swdb): Insert new field with the installed
      version.  Check that the supplied version does not contain a colon.
      Signed-off-by: default avatarWerner Koch <wk@gnupg.org>
      d10b67b9
  4. 02 Nov, 2016 6 commits
  5. 31 Oct, 2016 3 commits
    • Werner Koch's avatar
      common: New function gnupg_usleep. · ad491cee
      Werner Koch authored
      * configure.ac (HAVE_NANOSLEEP): Test for nanosleep.
      * common/sysutils.c: Always include time.h.
      (gnupg_usleep): New.
      --
      
      This function has been compiled from nPth and Libassuan.
      Signed-off-by: default avatarWerner Koch <wk@gnupg.org>
      ad491cee
    • Andre Heinecke's avatar
      w32: Fix PKG_CONFIG_LIBDIR in --build-w32 · 3b6b8fe3
      Andre Heinecke authored
      * autogen.sh: Point pkg-config to the right location.
      
      --
      PKG_CONFIG_LIBDIR is located to usually be /usr/lib/pkgconfig so
      in our case it should also point directly to the pkgconfig location
      and not the prefix. This fixes gnutls and sqlite detection.
      Signed-off-by: default avatarAndre Heinecke <aheinecke@intevation.de>
      3b6b8fe3
    • Neal H. Walfield's avatar
      g10: Avoid gratuitious SQLite aborts and starving writers. · 7a634e48
      Neal H. Walfield authored
      * g10/tofu.c: Include <time.h>, <utime.h>, <fcntl.h> and <unistd.h>.
      (tofu_dbs_s): Add fields want_lock_file and want_lock_file_ctime.
      (begin_transaction): Only yield if DBS->WANT_LOCK_FILE_CTIME has
      changed since we took the lock.  Don't use gpgrt_yield to yield, but
      sleep for 100ms.  After taking the batch lock, update
      DBS->WANT_LOCK_FILE_CTIME.  Also take the batch lock the first time we
      take the real lock.  When taking the real lock, use immediate not
      deferred mode to avoid gratuitious aborts.
      (end_transaction): When dropping the outermost real lock, drop the
      batch lock.
      (busy_handler): New function.
      (opendbs): Set the busy handler to it when opening the DB.  Initialize
      CTRL->TOFU.DBS->WANT_LOCK_FILE.
      (tofu_closedbs): Free DBS->WANT_LOCK_FILE.
      
      --
      Signed-off-by: default avatarNeal H. Walfield <neal@g10code.com>
      
      By default, SQLite defers transactions until they are actually needed.
      A consequence of this is that if we have two readers and both decide
      to do a write, then one has to abort.  To avoid this problem, we can
      make the outermost transaction an immediate transaction.  This has the
      disadvantage that we only allow a single reader at a time, but at
      least we don't have gratuitous aborts anymore.
      
      A second problem is that SQLite apparently doesn't actually create a
      queue of waiters.  The result is that doing a sched_yield between
      dropping and retaking the batch transaction is not enough to allow the
      other process to make progress.  Instead, we need to wait a
      while (emperically: 100ms seems reasonable).  To avoid waiting when
      there is no contention, we use a new file's timestamp to signal that
      there is a waiter.
      7a634e48
  6. 30 Oct, 2016 2 commits
  7. 28 Oct, 2016 1 commit
  8. 27 Oct, 2016 18 commits