gnupg.git
4 years agopo: Remove extra LF from ja.po
Werner Koch [Tue, 12 Aug 2014 08:36:30 +0000 (10:36 +0200)]
po: Remove extra LF from ja.po

--

4 years agogpg: Make --with-colons work again for --search-keys.
Werner Koch [Tue, 12 Aug 2014 08:36:30 +0000 (10:36 +0200)]
gpg: Make --with-colons work again for --search-keys.

* g10/keyserver.c (search_line_handler): Replace log_debug by
es_printf.

4 years agospeedo: Comment typo fix
Werner Koch [Tue, 12 Aug 2014 08:36:30 +0000 (10:36 +0200)]
speedo: Comment typo fix

--

4 years agocommon: Fix typo in header inclusion protection macro.
Werner Koch [Mon, 11 Aug 2014 15:21:07 +0000 (17:21 +0200)]
common: Fix typo in header inclusion protection macro.

--
GnuPG-bug-id: 1669

4 years agopo: Update Japanese translation.
NIIBE Yutaka [Fri, 8 Aug 2014 01:00:46 +0000 (10:00 +0900)]
po: Update Japanese translation.

4 years agoscd: Minor and editorial changes to app-sc-hsm.c
Werner Koch [Thu, 24 Jul 2014 14:16:53 +0000 (16:16 +0200)]
scd: Minor and editorial changes to app-sc-hsm.c

* scd/app-sc-hsm.c (select_and_read_binary): Use SW_ macro.
(parse_certid): Remove useless test.
(send_certinfo, send_keypairinfo): Shrink malloc to the needed size.
(do_getattr): Ditto.
(verify_pin): Use SW_ macro.
(do_decipher): Replace OFS variable and extend comment.
--

Code parts which have not been audited are marked with a warning
pragma.

4 years agoscd: Add a new status word code.
Werner Koch [Thu, 24 Jul 2014 14:16:53 +0000 (16:16 +0200)]
scd: Add a new status word code.

* scd/apdu.h (SW_REF_DATA_INV): New.
* scd/apdu.c (apdu_strerror): Add string.

4 years agoscd: Comment typo fixes.
Werner Koch [Thu, 24 Jul 2014 14:16:53 +0000 (16:16 +0200)]
scd: Comment typo fixes.

--

4 years agoscd: Support for SmartCard-HSM
Andreas Schwier [Fri, 18 Jul 2014 14:20:59 +0000 (16:20 +0200)]
scd: Support for SmartCard-HSM

* scd/app-sc-hsm.c: New.
* scd/app.c (select_application, get_supported_applications): Register
new app.

--
Add a read/only driver for scdaemon that provides access to keys and
certificates on a SmartCard-HSM (www.smartcard-hsm.com).

The driver supports RSA and ECC keys on SmartCard-HSM cards and
USB-Sticks.

The driver does not yet support the MicroSD edition.

--
ChangeLog and FSF copyright year fix by wk.

4 years agogpg: Switch to an EdDSA format with prefix byte.
Werner Koch [Thu, 24 Jul 2014 14:16:53 +0000 (16:16 +0200)]
gpg: Switch to an EdDSA format with prefix byte.

* g10/keygen.c (gen_ecc): USe "comp" for EdDSA.

4 years agopo: Update the German (de) translation
Werner Koch [Wed, 23 Jul 2014 19:12:10 +0000 (21:12 +0200)]
po: Update the German (de) translation

--

4 years agoagent: Show just one warning with all failed passphrase constraints.
Werner Koch [Wed, 23 Jul 2014 17:51:52 +0000 (19:51 +0200)]
agent: Show just one warning with all failed passphrase constraints.

* agent/genkey.c (check_passphrase_constraints): Build a final warning
after all checks.

4 years agoagent: Only one confirmation prompt for an empty passphrase.
Werner Koch [Wed, 23 Jul 2014 17:16:51 +0000 (19:16 +0200)]
agent: Only one confirmation prompt for an empty passphrase.

* agent/genkey.c (check_passphrase_constraints): Moev empty passphrase
check to the front.

4 years agogpg: Add command --quick-gen-key
Werner Koch [Wed, 23 Jul 2014 13:12:43 +0000 (15:12 +0200)]
gpg: Add command --quick-gen-key

* g10/gpg.c (aQuickKeygen): New.
* g10/misc.c (is_valid_user_id): New stub.
* g10/keygen.c (quickgen_set_para): New.
(quick_generate_keypair): New.
--

Note that the validation of the specified user id has not yet been
implemented.

4 years agocommon: Add cpr_get_answer_is_yes_def()
Werner Koch [Wed, 23 Jul 2014 12:35:22 +0000 (14:35 +0200)]
common: Add cpr_get_answer_is_yes_def()

* g10/cpr.c (cpr_get_answer_is_yes): Factor code out to ....
(cpr_get_answer_is_yes_def): ...new.

4 years agogpg: Make --quick-sign-key promote local key signatures.
Werner Koch [Wed, 23 Jul 2014 10:18:19 +0000 (12:18 +0200)]
gpg: Make --quick-sign-key promote local key signatures.

* g10/keyedit.c (sign_uids): Promote local sigs in quick mode.

4 years agoRegister DCO for Andreas Schwier
Werner Koch [Wed, 23 Jul 2014 06:52:10 +0000 (08:52 +0200)]
Register DCO for Andreas Schwier

--

4 years agoscd: Do not use the pcsc-wrapper.
Werner Koch [Tue, 22 Jul 2014 14:16:33 +0000 (16:16 +0200)]
scd: Do not use the pcsc-wrapper.

* scd/apdu.c (NEED_PCSC_WRAPPER): Do not define.
* scd/Makefile.am (libexec_PROGRAMS): Remove gnupg-pcsc-wrapper
(gnupg_pcsc_wrapper_SOURCES): Remove.
(gnupg_pcsc_wrapper_LDADD): Remove.
(gnupg_pcsc_wrapper_CFLAGS): Remove.

4 years agogpg: Improve --list-packets output for faulty packets.
Werner Koch [Mon, 21 Jul 2014 12:37:13 +0000 (14:37 +0200)]
gpg: Improve --list-packets output for faulty packets.

* g10/parse-packet.c: Add list_mode output for certain failures.

4 years agogpg: Cap size of attribute packets at 16MB.
Werner Koch [Mon, 21 Jul 2014 11:50:36 +0000 (13:50 +0200)]
gpg: Cap size of attribute packets at 16MB.

* g10/parse-packet.c (parse_attribute): Avoid xmalloc failure and cap
size of packet.
--

Tavis Ormandy reported a fatal error for attribute packets with a zero
length payload.  This is due to a check in Libgcrypt's xmalloc which
rejects a malloc(0) instead of silently allocating 1 byte.  The fix is
obvious.

In addition we cap the size of attribute packets similar to what we do
with user id packets.  OpenPGP keys are not the proper way to store
movies.

4 years agoPost beta release update
Werner Koch [Wed, 25 Jun 2014 12:33:34 +0000 (14:33 +0200)]
Post beta release update

--

4 years agoRelease 2.1.0-beta751 gnupg-2.1.0-beta751
Werner Koch [Wed, 25 Jun 2014 12:33:34 +0000 (14:33 +0200)]
Release 2.1.0-beta751

4 years agopo: Auto-update
Werner Koch [Wed, 25 Jun 2014 12:33:34 +0000 (14:33 +0200)]
po: Auto-update

--

4 years agogpg: Make show-uid-validity the default.
Werner Koch [Tue, 24 Jun 2014 07:53:46 +0000 (09:53 +0200)]
gpg: Make show-uid-validity the default.

4 years agotests: Fix end-of-all-ticks test for Western locales.
Werner Koch [Wed, 25 Jun 2014 12:33:34 +0000 (14:33 +0200)]
tests: Fix end-of-all-ticks test for Western locales.

* common/t-timestuff.c (test_timegm): Use timegm if available.
(main): Set TX to UTC if timegm is not available.
--

On OpenBSD 5.3 i386 that test failed due to the use of mktime.

Reported-by: Claus Assmann
4 years agogpg: Spelling error
Kristian Fiskerstrand [Wed, 2 Jul 2014 11:32:23 +0000 (13:32 +0200)]
gpg: Spelling error

4 years agospeedo: Update w32 installer
Werner Koch [Wed, 25 Jun 2014 12:33:34 +0000 (14:33 +0200)]
speedo: Update w32 installer

--

4 years agodoc: Add gnupg-logo.pdf
Werner Koch [Wed, 25 Jun 2014 12:33:34 +0000 (14:33 +0200)]
doc: Add gnupg-logo.pdf

--

4 years agogpg: Auto-create revocation certificates.
Werner Koch [Wed, 25 Jun 2014 18:25:28 +0000 (20:25 +0200)]
gpg: Auto-create revocation certificates.

* configure.ac (GNUPG_OPENPGP_REVOC_DIR): New config define.
* g10/revoke.c (create_revocation): Add arg "leadin".
(gen_standard_revoke): New.
* g10/openfile.c (get_openpgp_revocdir): New.
(open_outfile): Add MODE value 3.
* g10/keyid.c (hexfingerprint): New.
* g10/keygen.c (do_generate_keypair): Call gen_standard_revoke.
--

GnuPG-bug-id: 1042

4 years agoestream: Fix minor glitch in "%.*s" format.
Werner Koch [Wed, 25 Jun 2014 18:25:28 +0000 (20:25 +0200)]
estream: Fix minor glitch in "%.*s" format.

* common/estream-printf.c (pr_string): Take care of non-nul terminated
strings.

4 years agogpg: Rearrange code in gen_revoke.
Werner Koch [Wed, 25 Jun 2014 18:25:28 +0000 (20:25 +0200)]
gpg: Rearrange code in gen_revoke.

* g10/revoke.c (gen_revoke): Factor some code out to ...
(create_revocation): new.

4 years agogpg: Create exported secret files and revocs with mode 700.
Werner Koch [Wed, 25 Jun 2014 18:25:28 +0000 (20:25 +0200)]
gpg: Create exported secret files and revocs with mode 700.

* common/iobuf.c (direct_open): Add arg MODE700.
(iobuf_create): Ditto.
* g10/openfile.c (open_outfile): Add arg RESTRICTEDPERM.  Change call
callers to pass 0 for it.
* g10/revoke.c (gen_desig_revoke, gen_revoke): Here pass true for new
arg.
* g10/export.c (do_export): Pass true for new arg if SECRET is true.
--

GnuPG-bug-id: 1653.

Note that this works only if --output has been used.

4 years agocommon: Minor code cleanup for a legacy OS.
Werner Koch [Wed, 25 Jun 2014 18:25:28 +0000 (20:25 +0200)]
common: Minor code cleanup for a legacy OS.

* common/iobuf.c (direct_open) [__riscos__]: Simply cpp conditionals.

4 years agospeedo: Fix the w32 installer name
Werner Koch [Wed, 25 Jun 2014 18:25:28 +0000 (20:25 +0200)]
speedo: Fix the w32 installer name

4 years agopo: Auto-update
Werner Koch [Wed, 25 Jun 2014 18:25:28 +0000 (20:25 +0200)]
po: Auto-update

--

4 years agopo: Update some strings of the French (fr) translation.
Werner Koch [Wed, 25 Jun 2014 18:25:28 +0000 (20:25 +0200)]
po: Update some strings of the French (fr) translation.

4 years agopo: Update the German (de) translation
Werner Koch [Wed, 25 Jun 2014 18:25:28 +0000 (20:25 +0200)]
po: Update the German (de) translation

4 years agoagent: Adjust for changed npth_eselect under W32.
Werner Koch [Wed, 25 Jun 2014 18:25:28 +0000 (20:25 +0200)]
agent: Adjust for changed npth_eselect under W32.

* agent/gpg-agent.c (handle_connections) [W32]: Make events_set an
unsigned int to match the changed prototype.

4 years agodirmngr: Use the homedir based socket also under W32.
Werner Koch [Wed, 25 Jun 2014 18:25:28 +0000 (20:25 +0200)]
dirmngr: Use the homedir based socket also under W32.

* common/homedir.c (dirmngr_user_socket_name): Use same code for all
platforms.

4 years agopo: Update and enable Ukrainian (uk) translation.
Yuri Chornoivan [Fri, 27 Jun 2014 13:42:27 +0000 (15:42 +0200)]
po: Update and enable Ukrainian (uk) translation.

4 years agoFix typos in messages
Yuri Chornoivan [Sun, 22 Jun 2014 14:33:04 +0000 (17:33 +0300)]
Fix typos in messages

4 years agobuild: Remove unused options.
Werner Koch [Wed, 25 Jun 2014 18:25:28 +0000 (20:25 +0200)]
build: Remove unused options.

* configure.ac: Remove option --build-agent-only.
(FAKE_CURL, GPGKEYS_CURL): Remove check for cURL
(GPGKEYS_MAILTO): Remove ac_subst but keep the currently unused
SENDMAIL check.
(GPGKEYS_KDNS): Remove ac_subst.
* autogen.rc (final_info): Remove suggestion to use the removed option
--enable-mailto.

4 years agoscd: Add pinpad support for REINER SCT cyberJack go
NIIBE Yutaka [Tue, 23 Apr 2013 23:36:31 +0000 (08:36 +0900)]
scd: Add pinpad support for REINER SCT cyberJack go

* scd/ccid-driver.h (VENDOR_REINER, CYBERJACK_GO): New.
* scd/ccid-driver.c (ccid_transceive_secure): Handle the case for
VENDOR_REINER. Original work was by Alina Friedrichsen (tiny change).

--
This is revised version which adapts changes of ccid-driver and was
later ported from branch-2.0 to master (2.1)

4 years agoscd: Support reader Gemalto IDBridge CT30
Werner Koch [Wed, 25 Jun 2014 18:25:28 +0000 (20:25 +0200)]
scd: Support reader Gemalto IDBridge CT30

* scd/ccid-driver.h (GEMPC_CT30): New product id.
* scd/ccid-driver.c (parse_ccid_descriptor): Add quirk for that
reader.
--

GnuPG-bug-id: 1638

4 years agogpg: Limit keysize for unattended key generation to useful values.
Werner Koch [Wed, 25 Jun 2014 18:25:28 +0000 (20:25 +0200)]
gpg: Limit keysize for unattended key generation to useful values.

* g10/keygen.c (gen_elg): Enforce keysize 1024 to 4096.
(gen_rsa): Enforce keysize 1024 to 4096.
(gen_dsa): Enforce keysize 768 to 3072.
--

It was possible to create 16k RSA keys in batch mode. In addition to the
silliness of such keys, they have the major drawback that under GnuPG
and Libgcrypt, with their limited amount of specially secured memory
areas, the use of such keys may lead to an "out of secure memory"
condition.

4 years agoEnable DNS SRV records again.
Werner Koch [Wed, 25 Jun 2014 18:25:28 +0000 (20:25 +0200)]
Enable DNS SRV records again.

* configure.ac (GPGKEYS_HKP, GPGKEYS_FINGER): Remove ac_subst.
(use_dns_srv): Make test work.

4 years agoagent: Fix export of RSA keys to OpenPGP.
Werner Koch [Wed, 25 Jun 2014 18:25:28 +0000 (20:25 +0200)]
agent: Fix export of RSA keys to OpenPGP.

* agent/cvt-openpgp.c (convert_transfer_key): Fix sexp build format
string.

4 years agogpg,gpgsm: Simplify wrong_args function.
Werner Koch [Wed, 25 Jun 2014 18:25:28 +0000 (20:25 +0200)]
gpg,gpgsm: Simplify wrong_args function.

4 years agospeedo: "make clean-gnupg" may not remove the source.
Werner Koch [Wed, 25 Jun 2014 17:44:28 +0000 (19:44 +0200)]
speedo: "make clean-gnupg" may not remove the source.

* build-aux/speedo.mk (clean-$(1)): Take care of gnupg.
--

I learned it the hard way and lost a bunch of stashed changes.

4 years agogpgsm: Fix default config name.
Werner Koch [Wed, 25 Jun 2014 17:26:33 +0000 (19:26 +0200)]
gpgsm: Fix default config name.

5 years agodoc: Improve the rendering of the manual
Werner Koch [Wed, 25 Jun 2014 09:15:45 +0000 (11:15 +0200)]
doc: Improve the rendering of the manual

5 years agodoc: Update for modern makeinfo.
Werner Koch [Tue, 3 Jun 2014 11:34:24 +0000 (13:34 +0200)]
doc: Update for modern makeinfo.

* doc/texi.css: Remove.
* doc/Makefile.am (AM_MAKEINFOFLAGS): Use --css-ref.

5 years agogpg: Allow key-to-card upload for cert-only keys
Werner Koch [Tue, 24 Jun 2014 07:13:38 +0000 (09:13 +0200)]
gpg: Allow key-to-card upload for cert-only keys

* g10/card-util.c (card_store_subkey): Allo CERT usage for key 0.
--

Suggested-by: Dominik Heidler <dominik@heidler.eu>
5 years agodoc: Add note regarding gpg-preset-passphrase and --max-cache-ttl.
Werner Koch [Tue, 24 Jun 2014 11:46:52 +0000 (13:46 +0200)]
doc: Add note regarding gpg-preset-passphrase and --max-cache-ttl.

--
GnuPG-bug-id: 1615

5 years agodoc: Improve the description of gpg's --export commands.
Werner Koch [Tue, 24 Jun 2014 10:21:54 +0000 (12:21 +0200)]
doc: Improve the description of gpg's --export commands.

--
GnuPG-bug-id: 1655

5 years agoRegister DCO for Stefan Tomanek.
Werner Koch [Tue, 24 Jun 2014 09:47:51 +0000 (11:47 +0200)]
Register DCO for Stefan Tomanek.

--

5 years agodoc: Add conditionals for GnuPG-1
Werner Koch [Mon, 23 Jun 2014 14:09:34 +0000 (16:09 +0200)]
doc: Add conditionals for GnuPG-1

5 years agogpg: Make export of ECC keys work again.
Werner Koch [Fri, 20 Jun 2014 12:54:01 +0000 (14:54 +0200)]
gpg: Make export of ECC keys work again.

* agent/cvt-openpgp.c (convert_to_openpgp): Use the curve name instead
of the curve parameters.
* g10/export.c (canon_pubkey_algo): Rename to ...
(canon_pk_algo): this.  Support ECC.
(transfer_format_to_openpgp): Expect curve name.

5 years agogpg: Avoid infinite loop in uncompressing garbled packets.
Werner Koch [Fri, 20 Jun 2014 08:39:26 +0000 (10:39 +0200)]
gpg: Avoid infinite loop in uncompressing garbled packets.

* g10/compress.c (do_uncompress): Limit the number of extra FF bytes.
--

A packet like (a3 01 5b ff) leads to an infinite loop.  Using
--max-output won't help if it is a partial packet.  This patch
actually fixes a regression introduced on 1999-05-31 (c34c6769).
Actually it would be sufficient to stuff just one extra 0xff byte.
Given that this problem popped up only after 15 years, I feel safer to
allow for a very few FF bytes.

Thanks to Olivier Levillain and Florian Maury for their detailed
report.

5 years agogpg: Fix a couple of spelling errors
Kristian Fiskerstrand [Thu, 12 Jun 2014 14:12:28 +0000 (16:12 +0200)]
gpg: Fix a couple of spelling errors

5 years agospeedo: Support building from dist-source generated tarball.
Werner Koch [Mon, 16 Jun 2014 21:25:44 +0000 (23:25 +0200)]
speedo: Support building from dist-source generated tarball.

5 years agohttp: Print human readable GNUTLS status.
Werner Koch [Fri, 13 Jun 2014 17:39:48 +0000 (19:39 +0200)]
http: Print human readable GNUTLS status.

* common/http.c (send_gnutls_bye): Take care of EAGAIN et al.
(http_verify_server_credentials): Print a human readable status.

5 years agogpg: Improve the output of --list-packets
Werner Koch [Thu, 12 Jun 2014 12:41:40 +0000 (14:41 +0200)]
gpg: Improve the output of --list-packets

* g10/parse-packet.c (parse): Print packet meta info in list mode.
--

In particular having the file offset of the packets is often useful.

5 years agospeedo: Improve building of the w32 installer.
Werner Koch [Wed, 11 Jun 2014 13:45:29 +0000 (15:45 +0200)]
speedo: Improve building of the w32 installer.

* build-aux/speedo.mk: Change name of build directory to PLAY.
Improve the dist-source target.
* build-aux/speedo/w32/gdk-pixbuf-loaders.cache: Add a blank
line (plus comment).
* build-aux/speedo/w32/inst.nsi: Change name of file to gnupg-w32-*.
Install more tools.
--

gdk-pixbuf-loaders.cache needs to end with an extra LF or the
gdk-pixbuf is not able to read the last entry.  The final comment is
to make our git sanity checks happy.

Running

 make -f build-aux/speedo.mk \
      TARGETOS=w32 TARBALLS=~/tarballs installer

does now create a working installer.  After removing dirmngr from the
installation GPA kind of works.  There are remaining problems with
dirmngr and scdaemon which will be fixed soon.

Running

 make -f build-aux/speedo.mk \
      TARGETOS=w32 TARBALLS=~/tarballs dist-source

creates an xz compressed tarball with all the sources used to build
the installer.  Distributing this tarball along with the installer is
sufficient to comply with the GPL.  Well, some more instructions
should be given in the readme files.

5 years agospeedo: Revamped speedo and include a w32 installer.
Werner Koch [Tue, 10 Jun 2014 17:42:34 +0000 (19:42 +0200)]
speedo: Revamped speedo and include a w32 installer.

* build-aux/speedo/: New.
* build-aux/speedo/w32/: New.
--

The new installer uses some code from Gpg4win but is much smaller and
easier to maintain.  To build an installer, unpack GnuPG and then run

  make -f build-aux/speedo.mk  TARBALLS=~/mytarballs installer

~/mytarballs is a directory with tarballs of external libraries.  See
speedo.mk for a list of them.

WARNING: The installed W32 version does not correctly work right now.

5 years agobuild: Add more options to autogen.sh.
Werner Koch [Tue, 10 Jun 2014 14:21:00 +0000 (16:21 +0200)]
build: Add more options to autogen.sh.

* autogen.sh: Add options --print-host and --print-build.
--

Being able to know the build system and the host as used by GnuPG is
useful to build other packages.

5 years agow32: Fix build problem with dirmngr.
Werner Koch [Tue, 10 Jun 2014 13:11:32 +0000 (15:11 +0200)]
w32: Fix build problem with dirmngr.

* dirmngr/ks-engine-hkp.c (EAI_SYSTEM) [W32]: Add replacement
constant.

5 years agogpg: Use more specific reason codes for INV_RECP.
Werner Koch [Tue, 10 Jun 2014 12:54:55 +0000 (14:54 +0200)]
gpg: Use more specific reason codes for INV_RECP.

* g10/pkclist.c (find_and_check_key, build_pk_list): Use more specific
reasons codes for INV_RECP.
--

GnuPG-bug-id: 1650

5 years agoImprove the beta number generation.
Werner Koch [Fri, 6 Jun 2014 14:29:41 +0000 (16:29 +0200)]
Improve the beta number generation.

* autogen.sh: Add option --find-version
* configure.ac: Rework the setting of the mym4_ variables.
--

The old system was not too well defined if no release for a series has
yet been done.  We now introduce a "PACKAGE-N.M-base" tag to solve
this problem.  To keep the M4 code readable the GIT parsing has been
moved to ./autogen.sh.

5 years agoPost beta release update.
Werner Koch [Thu, 5 Jun 2014 15:05:33 +0000 (17:05 +0200)]
Post beta release update.

--

656fef6454972cb91741c37a0fd19cd9ade9db9c  gnupg-2.1.0-beta442.tar.bz2

5 years agoRelease 2.1.0-beta442. gnupg-2.1.0-beta442
Werner Koch [Thu, 5 Jun 2014 14:23:10 +0000 (16:23 +0200)]
Release 2.1.0-beta442.

--

This beta is small contribution for today's Reset The Net campaign.

  It is a crying shame that the government of my country is not
  willing to offer Edward Snowden asylum and protect him from the evil
  institutions of those allies who once thankfully kicked out the most
  evil German powers.  Back in these dark years, many people had to
  ask for asylum over there and it was granted.  Now we have to fear
  their Blockwarts who are listening to the entire world.  It would be
  more than justified for us to help that brave guy.

5 years agopo: Auto-update po files.
Werner Koch [Thu, 5 Jun 2014 14:22:18 +0000 (16:22 +0200)]
po: Auto-update po files.

--

5 years agoUpdate README file.
Werner Koch [Thu, 5 Jun 2014 14:20:44 +0000 (16:20 +0200)]
Update README file.

--

The copyright list in AUTHORS as been compiled from a distribution
tarball.

5 years agoRemove keyserver helper code.
Werner Koch [Thu, 5 Jun 2014 11:44:40 +0000 (13:44 +0200)]
Remove keyserver helper code.

* configure.ac: Remove keyserver helper related stuff.
* Makefile.am (SUBDIRS): Remove keyserver.
* keyserver/Makefile.am: Remove.
--

The dirmngr is used instead of the keyserver helpers.  Thus there is
more need to distribute the old code.  We keep it in the repo for
references, though.

5 years agogpg: Require confirmation for --gen-key with experimental curves.
Werner Koch [Thu, 5 Jun 2014 10:03:27 +0000 (12:03 +0200)]
gpg: Require confirmation for --gen-key with experimental curves.

* g10/keygen.c (ask_curve): Add arg both.  Require confirmation for
Curve25519.

5 years agogpg: Auto-migrate existing secring.gpg.
Werner Koch [Thu, 5 Jun 2014 09:19:59 +0000 (11:19 +0200)]
gpg: Auto-migrate existing secring.gpg.

* g10/migrate.c: New.
* g10/import.c (import_old_secring): New.
(import_one): Add arg silent.
(transfer_secret_keys): Add arg batch.
(import_secret_one): Add args batch and for_migration.
* g10/gpg.c (main): Call migration function.

5 years agogpgsm: Fix commit be07ed65.
Werner Koch [Wed, 4 Jun 2014 06:50:10 +0000 (08:50 +0200)]
gpgsm: Fix commit be07ed65.

* sm/server.c (option_handler): Use "with-secret".

5 years agoAdd new option --with-secret.
Werner Koch [Tue, 3 Jun 2014 19:35:59 +0000 (21:35 +0200)]
Add new option --with-secret.

* g10/gpg.c: Add option --with-secret.
* g10/options.h (struct opt): Add field with_secret.
* g10/keylist.c (public_key_list): Pass opt.with_secret to list_all
and list_one.
(list_all, list_one): Add arg mark_secret.
(list_keyblock_colon): Add arg has_secret.
* sm/gpgsm.c: Add option --with-secret.
* sm/server.c (option_handler): Add option "with-secret".
* sm/gpgsm.h (server_control_s): Add field with_secret.
* sm/keylist.c (list_cert_colon): Take care of with_secret.  Also move
the token string from the wrong field 14 to 15.
--

This option is useful for key managers which need to know whether a
key has a secret key.  This change allows to collect this information
in one pass.

5 years agoartwork: Add 128x128 variant of the logo.
Werner Koch [Tue, 3 Jun 2014 16:58:35 +0000 (18:58 +0200)]
artwork: Add 128x128 variant of the logo.

--

5 years agogpgsm: New commands --export-secret-key-{p8,raw}
Werner Koch [Tue, 3 Jun 2014 16:57:33 +0000 (18:57 +0200)]
gpgsm: New commands --export-secret-key-{p8,raw}

* sm/gpgsm.c: Add new commands.
* sm/minip12.c (build_key_sequence): Add arg mode.
(p12_raw_build): New.
* sm/export.c (export_p12): Add arg rawmode.  Call p12_raw_build.
(gpgsm_p12_export): Ditto.
(print_short_info): Print the keygrip.

5 years agodoc: Minor texi updates.
Werner Koch [Tue, 3 Jun 2014 06:58:20 +0000 (08:58 +0200)]
doc: Minor texi updates.

--

5 years agogpg: Avoid NULL-deref in default key listing.
Werner Koch [Mon, 2 Jun 2014 17:51:23 +0000 (19:51 +0200)]
gpg: Avoid NULL-deref in default key listing.

* g10/keyid.c (hash_public_key): Take care of NULL keys.
* g10/misc.c (pubkey_nbits): Ditto.
--

This problem was mainly due to our ECC code while checking for opaque
MPIs with the curve name.

5 years agogpg: Simplify default key listing.
Werner Koch [Mon, 2 Jun 2014 17:50:18 +0000 (19:50 +0200)]
gpg: Simplify default key listing.

* g10/mainproc.c (list_node): Rework.
--

GnuPG-bug-id: 1640

5 years agogpg: Graceful skip reading of corrupt MPIs.
Werner Koch [Mon, 2 Jun 2014 16:38:04 +0000 (18:38 +0200)]
gpg: Graceful skip reading of corrupt MPIs.

* g10/parse-packet.c (mpi_read): Change error message on overflow.
--

This gets gpg 2.x in sync to what gpg 1.4 does.  No need to die for a
broken MPI.

GnuPG-bug-id: 1593

Resolved conflicts:
g10/parse-packet.c - whitespaces fixes.

5 years agogpgsm: Handle re-issued CA certificates in a better way.
Werner Koch [Mon, 2 Jun 2014 14:02:30 +0000 (16:02 +0200)]
gpgsm: Handle re-issued CA certificates in a better way.

* sm/certchain.c (find_up_search_by_keyid): Consider all matching
certificates.
(find_up): Add some debug messages.
--

The DFN-Verein recently re-issued its CA certificates without
generating new keys.  Thus looking up the chain using the authority
keyids works but may use still existing old certificates.  This may
break the CRL lookup in the Dirmngr.  The hack to fix this is by using
the latest issued certificate with the same subject key identifier.

As usual Peter Gutman's X.509 style guide has some comments on that
re-issuing.

GnuPG-bug-id: 1644

5 years agogpgsm: Add a way to save a found state.
Werner Koch [Mon, 2 Jun 2014 13:55:00 +0000 (15:55 +0200)]
gpgsm: Add a way to save a found state.

* kbx/keybox-defs.h (keybox_found_s): New.
(keybox_handle): Factor FOUND out to above.  Add saved_found.
* kbx/keybox-init.c (keybox_release): Release saved_found.
(keybox_push_found_state, keybox_pop_found_state): New.

* sm/keydb.c (keydb_handle): Add field saved_found.
(keydb_new): Init it.
(keydb_push_found_state, keydb_pop_found_state): New.

5 years agogpg: Fix bug parsing a zero length user id.
Werner Koch [Mon, 2 Jun 2014 09:47:25 +0000 (11:47 +0200)]
gpg: Fix bug parsing a zero length user id.

* g10/getkey.c (get_user_id): Do not call xmalloc with 0.

* common/xmalloc.c (xmalloc, xcalloc): Take extra precaution not to
pass 0 to the arguments.
--

The problem did not occur in 1.x because over there the xmalloc makes
sure to allocate at least one byte.  With 2.x for most calls the
xmalloc of Libgcrypt is used and Libgcrypt returns an error insteead
of silent allocating a byte.  Thus gpg 2.x bailed out with an
"Fatal: out of core while allocating 0 bytes".

The extra code in xmalloc.c is for more robustness for the other
xmalloc calls.

5 years agodirmngr: Print certificates on failed TLS verification.
Werner Koch [Mon, 19 May 2014 07:48:42 +0000 (09:48 +0200)]
dirmngr: Print certificates on failed TLS verification.

* dirmngr/ks-engine-hkp.c (cert_log_cb): New.
(send_request): Set callback.
--

We use the KSBA functions here because we have them anyway in Dirmngr.

5 years agohttp: Add callback to help logging of server certificates.
Werner Koch [Mon, 19 May 2014 07:47:18 +0000 (09:47 +0200)]
http: Add callback to help logging of server certificates.

* common/http.c (http_session_s): Add field cert_log_cb.
(http_session_set_log_cb): New.
(http_verify_server_credentials): Call callback.

5 years agokeyserver: Improve support for hkps pools.
Werner Koch [Fri, 16 May 2014 19:14:03 +0000 (21:14 +0200)]
keyserver: Improve support for hkps pools.

* dirmngr/ks-engine-hkp.c (hostinfo_s): Add fields cname, v4addr, and
v6addr.
(create_new_hostinfo): Clear them.
(my_getnameinfo): Add args numeric and r_isnumeric.
(is_ip_address): New.
(map_host): Add arg r_host.  Rewrite the code to handle pools in a
special way.
(ks_hkp_print_hosttable): Change format of help info output.
(make_host_part): Add arg optional r_httphost.
(send_request): Add arg httphost.
(ks_hkp_search, ks_hkp_get, ks_hkp_put): Get httphost and pass it to
send_request.
--

This changes quite some things on how the hostinfo is maintained.
However, it might be better to rework the data structures and have one
entry per IP address instead of this clumsy patch.

5 years agohttp: Allow overriding of the Host header.
Werner Koch [Fri, 16 May 2014 18:58:58 +0000 (20:58 +0200)]
http: Allow overriding of the Host header.

* common/http.c (http_open): Add arg httphost.
(http_open_document): Pass NULL for httphost.
(send_request): Add arg httphost.  If given, use HTTPHOST instead of
SERVER.  Use https with a proxy if requested.
(http_verify_server_credentials): Do not stop at the first error
message.
* dirmngr/ocsp.c (do_ocsp_request): Adjust call to http_open.
* keyserver/curl-shim.c (curl_easy_perform): Ditto.
* dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
* dirmngr/ks-engine-hkp.c (ks_hkp_help): Ditto.

5 years agogpg: Fix uninitialized access to search descindex with gpg keyboxes.
Werner Koch [Wed, 14 May 2014 14:32:49 +0000 (16:32 +0200)]
gpg: Fix uninitialized access to search descindex with gpg keyboxes.

* kbx/keybox-search.c (keybox_search): Add arg  R_DESCINDEX.  Chnage
both callers.
* g10/keydb.c (keydb_search): Always set DESCINDEX.
--

This only affects the new keybox for OpenPGP keys in 2.1.  The bug
exhibited itself by running GPA's backup command on Windows.

5 years agow32: Make make_absfilename work with drive letters.
Werner Koch [Wed, 14 May 2014 08:26:30 +0000 (10:26 +0200)]
w32: Make make_absfilename work with drive letters.

* common/stringhelp.c (do_make_filename) [HAVE_DRIVE_LETTERS]: Fix.

5 years agogpg: Remove useless diagnostic in MDC verification.
Werner Koch [Wed, 14 May 2014 06:55:58 +0000 (08:55 +0200)]
gpg: Remove useless diagnostic in MDC verification.

* g10/decrypt-data.c (decrypt_data): Do not distinguish between a bad
MDC packer header and a bad MDC.
--

The separate diagnostic was introduced for debugging a problems.  For
explaining an MDC error a single error message is easier to
understand.

5 years agogpg: Fix glitch entering a full expiration time.
Werner Koch [Wed, 14 May 2014 06:49:37 +0000 (08:49 +0200)]
gpg: Fix glitch entering a full expiration time.

* g10/keygen.c (ask_expire_interval): Get the current time after the
prompt.
--

This almost avoid that an entered full ISO timestamp is not used as
given but off by the time the user required to enter the timestamp.

GnuPG-bug-id: 1639

5 years agoagent: Fix import of non-protected gpg keys.
Werner Koch [Thu, 8 May 2014 08:24:36 +0000 (10:24 +0200)]
agent: Fix import of non-protected gpg keys.

* agent/cvt-openpgp.c (do_unprotect): Return an s-exp also for
non-protected keys.
(convert_from_openpgp_main): Do not call agent_askpin for a
non-protected key.

5 years agoMake more use of *_NAME macros.
Werner Koch [Wed, 7 May 2014 16:18:27 +0000 (18:18 +0200)]
Make more use of *_NAME macros.

* configure.ac (GPG_DISP_NAME, GPGSM_DISP_NAME): New.
(GPG_AGENT_DISP_NAME, SCDAEMON_DISP_NAME): New.
(DIRMNGR_DISP_NAME, G13_DISP_NAME): New.
(GPGCONF_DISP_NAME): New.
(SCDAEMON_SOCK_NAME): New.
* common/argparse.c (show_help): Map description string.

5 years agoagent: Fix auth key comment handling.
NIIBE Yutaka [Thu, 8 May 2014 02:46:38 +0000 (11:46 +0900)]
agent: Fix auth key comment handling.

* agent/command-ssh.c (ssh_send_key_public): Handle the case with no
comment.

5 years agoMake -jN work again.
Werner Koch [Wed, 7 May 2014 14:37:15 +0000 (16:37 +0200)]
Make -jN work again.

* common/Makefile.am ($(PROGRAMS)): New rule
(t_http_LDADD): Use libcommontls.a without directory prefix.
* dirmngr/Makefile.am ($(PROGRAMS)): New rule.

5 years agogpg: Print the key algorithm/curve with signature info.
Werner Koch [Wed, 7 May 2014 13:05:34 +0000 (15:05 +0200)]
gpg: Print the key algorithm/curve with signature info.

* g10/mainproc.c (check_sig_and_print): Print the name and curve.