6 years agoMitigate a flush+reload cache attack on RSA secret exponents.
Werner Koch [Fri, 19 Jul 2013 11:49:23 +0000 (13:49 +0200)]
Mitigate a flush+reload cache attack on RSA secret exponents.

* mpi/mpi-pow.c (mpi_powm): Always perform the mpi_mul for exponents
hold in secure memory.

The attack is described in a paper to be pusblished at

Flush+Reload: a High Resolution, Low Noise, L3 Cache Side-Channel
Attack by Yuval Yarom and Katrina Falkner. 18 July 2013.

  Flush+Reload is a cache side-channel attack that monitors access to
  data in shared pages. In this paper we demonstrate how to use the
  attack to extract private encryption keys from GnuPG.  The high
  resolution and low noise of the Flush+Reload attack enables a spy
  program to recover over 98% of the bits of the private key in a
  single decryption or signing round. Unlike previous attacks, the
  attack targets the last level L3 cache. Consequently, the spy
  program and the victim do not need to share the execution core of
  the CPU. The attack is not limited to a traditional OS and can be
  used in a virtualised environment, where it can attack programs
  executing in a different VM.

Signed-off-by: Werner Koch <>
6 years agoFix git revision parsing.
Werner Koch [Fri, 19 Jul 2013 11:56:24 +0000 (13:56 +0200)]
Fix git revision parsing.

* Use git rev-parse to retrieve the revision.

Signed-off-by: Werner Koch <>
6 years agogpg: fix previous change
NIIBE Yutaka [Tue, 16 Jul 2013 00:21:54 +0000 (09:21 +0900)]
gpg: fix previous change

* g10/gpgv.c: Fix void dotlock_remove_lockfiles.

6 years agogpg: signal handling fix
NIIBE Yutaka [Fri, 12 Jul 2013 08:26:55 +0000 (17:26 +0900)]
gpg: signal handling fix

* include/dotlock.h (dotlock_remove_lockfiles_reclaim): New.
  (dotlock_destroy, dotlock_remove_lockfiles): Add a flag to reclaim
  memory or not.
* util/dotlock.c (dotlock_create): Use
  dotlock_remove_lockfiles_reclaim for atexit.
  (dotlock_destroy_unix, dotlock_destroy)
  (dotlock_remove_lockfiles): Add a reclaim flag.
  (dotlock_remove_lockfiles_reclaim): New.
* g10/signal.c (got_fatal_signal): Disable flag of reclaim memory to
  avoid non-async-face call.
* g10/keydb.c (maybe_create_keyring): Follow the API change.
* g10/gpgv.c: Follow the API change.


signal handler got_fatal_signal should not call non-async-signal-safe
functions.  When malloc is interrupted by a signal, it screws up.

This issue is reported:

6 years agoDifferentiate between success (full or partial), not-found, and failure.
David Shaw [Sun, 3 Mar 2013 01:39:48 +0000 (20:39 -0500)]
Differentiate between success (full or partial), not-found, and failure.

* keyserver/gpgkeys_hkp.c (get_key): Use curl_easy_setinfo to get the
  HTTP status code so we can tell the difference between a successful
  retrieval, a partial retrieval, a not-found, or a server failed.

6 years agoEmulate curl_easy_getinfo and CURLINFO_RESPONSE_CODE in curl-shim.
David Shaw [Sun, 3 Mar 2013 01:07:27 +0000 (20:07 -0500)]
Emulate curl_easy_getinfo and CURLINFO_RESPONSE_CODE in curl-shim.

* keyserver/curl-shim.h, keyserver/curl-shim.c (curl_easy_getinfo):
  New. Return the HTTP status code for the last transfer.

6 years agoFix DNS check for recent OS X releases
David Shaw [Wed, 30 Jan 2013 01:31:01 +0000 (20:31 -0500)]
Fix DNS check for recent OS X releases

* OS X now needs BIND_8_COMPAT and -lresolv

6 years agoAutomake 1.13 compatibility fix.
Werner Koch [Fri, 11 Jan 2013 14:42:32 +0000 (15:42 +0100)]
Automake 1.13 compatibility fix.

GnuPG-bug-id: 1459

6 years agoFix idea.c for big endian CPUs.
Werner Koch [Fri, 11 Jan 2013 14:10:38 +0000 (15:10 +0100)]
Fix idea.c for big endian CPUs.

* cipher/idea.c: Replace use of WORDS_BIGENDIAN by BIG_ENDIAN_HOST.
GnuPG-bug-id: 1461

6 years agoFix honoring --cert-digest-algo when recreating a cert
Christian Aistleitner [Sun, 14 Oct 2012 18:33:00 +0000 (20:33 +0200)]
Fix honoring --cert-digest-algo when recreating a cert

* g10/sign.c (update_keysig_packet): Override original signature's
digest algo in hashed data.

6 years agoPost release updates
Werner Koch [Thu, 20 Dec 2012 20:25:07 +0000 (21:25 +0100)]
Post release updates


6 years agoRelease 1.4.13. gnupg-1.4.13
Werner Koch [Thu, 20 Dec 2012 19:30:15 +0000 (20:30 +0100)]
Release 1.4.13.

6 years agoLast fix for the SRV record patches.
Werner Koch [Thu, 20 Dec 2012 19:28:21 +0000 (20:28 +0100)]
Last fix for the SRV record patches.

* keyserver/gpgkeys_hkp.c (srv_replace): Make sure SRVCOUNT is
always initialized.

See commit 5c557a51.

6 years agoUpdate manuals from master
Werner Koch [Thu, 20 Dec 2012 19:12:50 +0000 (20:12 +0100)]
Update manuals from master

* doc/ (update-source): Copy from Git master.
(update-source-from-gnupg-2): Remove.
* doc/gpg.texi: Fix minor typos and grammar bugs.
* doc/yat2m.c: Change diagnostics to updated coding standards.

6 years agoUpdate config.{guess,sub} to version 2012-07-31.
Werner Koch [Thu, 20 Dec 2012 18:53:58 +0000 (19:53 +0100)]
Update config.{guess,sub} to version 2012-07-31.

* scripts/config.guess, scripts/config.sub: Update.

6 years agopo: Update Danish translation.
Joe Hansen [Thu, 1 Nov 2012 15:44:29 +0000 (11:44 -0400)]
po: Update Danish translation.

* po/da.po: Update.

6 years agopo: Update zh_TW.po.
Werner Koch [Thu, 20 Dec 2012 17:36:27 +0000 (18:36 +0100)]
po: Update zh_TW.po.


Applied changes from Jedi Lin as received in May and fixed fuzzies due
to English typo corrections.

6 years agogpg: Suppress "public key already present" in quiet mode.
Werner Koch [Wed, 19 Dec 2012 10:21:26 +0000 (11:21 +0100)]
gpg: Suppress "public key already present" in quiet mode.

* g10/pkclist.c (build_pk_list): Print two diagnostics only in
non-quiet mode.

(back-ported from commit 8325d616593187ff227853de0295e3269b96edcb)

6 years agoImport only packets which are allowed in a keyblock.
Werner Koch [Thu, 20 Dec 2012 08:43:41 +0000 (09:43 +0100)]
Import only packets which are allowed in a keyblock.

* g10/import.c (valid_keyblock_packet): New.
(read_block): Store only valid packets.

A corrupted key, which for example included a mangled public key
encrypted packet, used to corrupt the keyring.  This change skips all
packets which are not allowed in a keyblock.

GnuPG-bug-id: 1455

6 years agoIssue 1447: Pass proper Host header and SNI when SRV is used with curl.
David Shaw [Wed, 19 Dec 2012 18:54:27 +0000 (13:54 -0500)]
Issue 1447: Pass proper Host header and SNI when SRV is used with curl.

* Check for inet_ntop.

* m4/libcurl.m4: Provide a #define for the version of the curl

* keyserver/gpgkeys_hkp.c (main, srv_replace): Call getaddrinfo() on
  each target.  Once we find one that resolves to an address (whether
  IPv4 or IPv6), pass it into libcurl via CURLOPT_RESOLVE using the
  SRV name as the "host".  Force the HTTP Host header to be the same.

Backported from 6b1f71055ebab36989e2089cfde319d2ba40ada7

* keyserver/gpgkeys_hkp.c (main): Only default try-dns-srv to on if we
  have SRV support in the first place.

Backported from 732f3d1d4786239db5f31f82cc04ec79326cc13c

6 years agoPart of issue 1447: Pass proper Host header when SRV is used.
David Shaw [Wed, 19 Dec 2012 16:43:28 +0000 (11:43 -0500)]
Part of issue 1447: Pass proper Host header when SRV is used.

* common/http.c (send_request, connect_server): Set proper Host header
  (no :port, host is that of the SRV) when SRV is used in the

Backported from cbe98b2cb1e40ba253300e604996681ae191e363

6 years agoRemove trailing white space from some files
Werner Koch [Wed, 19 Dec 2012 13:05:56 +0000 (14:05 +0100)]
Remove trailing white space from some files


6 years agoAdjust to GNU coding standards
Werner Koch [Wed, 19 Dec 2012 13:03:25 +0000 (14:03 +0100)]
Adjust to GNU coding standards


A variable definition with initialization shall have only one variable
per type.

6 years agoFix last commit
Werner Koch [Wed, 19 Dec 2012 12:57:29 +0000 (13:57 +0100)]
Fix last commit

* util/http.c (connect_server): Bump SRVINDEX and not SRV.

6 years agoFix issue 1446: honor ports given in SRV responses.
David Shaw [Wed, 19 Dec 2012 02:58:53 +0000 (21:58 -0500)]
Fix issue 1446: honor ports given in SRV responses.

* common/http.c (send_request, connect_server, http_open): Use a
  struct srv instead of a single srvtag so we can pass the chosen host
  and port back to the caller.
  (connect_server): Use the proper port in the HAVE_GETADDRINFO case.

* keyserver/curl-shim.c (curl_easy_perform): Use struct srv and log
  chosen host and port.

* keyserver/gpgkeys_hkp.c (main): Properly take the port given by SRV.

Backported from ba9e974f1fd85b3dbbfb5e26d7a14f71d07c7cf2

6 years ago.gitignore: Add cruft from other branches.
Werner Koch [Tue, 18 Dec 2012 19:03:21 +0000 (20:03 +0100)]
.gitignore: Add cruft from other branches.


6 years agoState that disclaimers are not anymore needed for translations.
Werner Koch [Tue, 18 Dec 2012 18:54:23 +0000 (19:54 +0100)]
State that disclaimers are not anymore needed for translations.


6 years agoAdd meta option ignore-invalid-option.
Werner Koch [Tue, 18 Dec 2012 17:26:56 +0000 (18:26 +0100)]
Add meta option ignore-invalid-option.

* util/argparse.c (iio_item_def_s, IIO_ITEM_DEF): New.
(initialize): Init field IIO_LIST.
(ignore_invalid_option_p): New.
(ignore_invalid_option_add): New.
(ignore_invalid_option_clear): New.
(optfile_parse): Implement meta option.

This option is currently of no use.  However, as soon as it has been
deployed in all stable versions of GnuPG, it will allow the use of the
same configuration file with an old and a new version of GnuPG.  For
example: If a new version implements the option "foobar", and a user
uses it in gpg.conf, an old version of gpg would bail out with the
error "invalid option".  To avoid that the following line can be put
above that option in gpg.conf

  ignore-invalid-option foobar

This meta option may be given several times or several option names
may be given as arguments (space delimited).  Note that this option is
not available on the command line.

(backported from commit 41d564333d35c923f473aa90625d91f8fe18cd0b)

6 years agoFix potential heap corruption in "gpg -v --version"
Werner Koch [Sat, 15 Dec 2012 10:28:00 +0000 (11:28 +0100)]
Fix potential heap corruption in "gpg -v --version"

* g10/gpg.c (build_list): Rewrite to cope with buffer overflow in
certain locales.
* util/membuf.c (put_membuf_str): New.
(get_membuf): Make LEN optional.

This fixes an obvious bug in locales where the translated string is
longer than the original.  The bug could be exhibited by using
LANG=ru_RU.utf8 gpg -v --version.

En passant we also removed the trailing white space on continued

Reported-by: Dmitry V. Levin" <ldv at>
6 years agoUpdate README and po files for a release
Werner Koch [Fri, 14 Dec 2012 17:24:02 +0000 (18:24 +0100)]
Update README and po files for a release


6 years agoWorkaround for a gettext problem during "make distcheck".
Werner Koch [Fri, 14 Dec 2012 17:22:34 +0000 (18:22 +0100)]
Workaround for a gettext problem during "make distcheck".

* Add comment string "GNU gnupg".

We already use this kludge in 2.x.

6 years agogettext: Upgrade to version 0.18
Werner Koch [Fri, 14 Dec 2012 15:08:23 +0000 (16:08 +0100)]
gettext: Upgrade to version 0.18

* (AM_GNU_GETTEXT_VERSION): Bump to 0.18.
* po/ Upgrade to gettext-0.18.  Keep option --previous
of msgmerge.
* intl/: Upgrade to gettext-0.18.
* m4/gettext.m4: Upgrade to gettext-0.18.1.
* m4/iconv.m4: Upgrade to gettext-0.18.1.
* m4/lib-ld.m4: Upgrade to gettext-0.18.1.
* m4/lib-link.m4: Upgrade to gettext-0.18.1.
* m4/lib-prefix.m4: Upgrade to gettext-0.18.1.
* m4/nls.m4: Upgrade to gettext-0.18.1.
* m4/po.m4: Upgrade to gettext-0.18.1.
* m4/progtest.m4: Upgrade to gettext-0.18.1.
* m4/codeset.m4: Upgrade to gettext-0.18.1.
* m4/fcntl-o.m4: New file, from gettext-0.18.1.
* m4/glibc2.m4: Upgrade to gettext-0.18.1.
* m4/glibc21.m4: Upgrade to gettext-0.18.1.
* m4/intdiv0.m4: Upgrade to gettext-0.18.1.
* m4/intl.m4: Upgrade to gettext-0.18.1.
* m4/intldir.m4: Upgrade to gettext-0.18.1.
* m4/intlmacosx.m4: Upgrade to gettext-0.18.1.
* m4/intmax.m4: Upgrade to gettext-0.18.1.
* m4/inttypes_h.m4: Upgrade to gettext-0.18.1.
* m4/inttypes-pri.m4: Upgrade to gettext-0.18.1.
* m4/lcmessage.m4: Upgrade to gettext-0.18.1.
* m4/lock.m4: Upgrade to gettext-0.18.1.
* m4/longlong.m4: Upgrade to gettext-0.18.1.
* m4/printf-posix.m4: Upgrade to gettext-0.18.1.
* m4/size_max.m4: Upgrade to gettext-0.18.1.
* m4/stdint_h.m4: Upgrade to gettext-0.18.1.
* m4/threadlib.m4: New file, from gettext-0.18.1.
* m4/uintmax_t.m4: Upgrade to gettext-0.18.1.
* m4/visibility.m4: Upgrade to gettext-0.18.1.
* m4/wchar_t.m4: Upgrade to gettext-0.18.1.
* m4/wint_t.m4: Upgrade to gettext-0.18.1.
* m4/xsize.m4: Upgrade to gettext-0.18.1.
* m4/ (EXTRA_DIST): Add the new files.

6 years agoSupport NetBSD m68K ELF targets
Werner Koch [Thu, 13 Dec 2012 17:15:38 +0000 (18:15 +0100)]
Support NetBSD m68K ELF targets

* mpi/config.links (m68k*-*-netbsdelf): New.


The original patch from NetBSD had this additional code:

if ! test x$M68060 = xYES; then
    path="m68k/mc68020 m68k"

However, this bypasses the config system.  It would be better to add
proper support for this CPU to config.sub.

6 years agoCard: Fix the process of writing key or generating key.
NIIBE Yutaka [Thu, 13 Dec 2012 04:36:23 +0000 (13:36 +0900)]
Card: Fix the process of writing key or generating key.

* g10/app-openpgp.c (store_fpr): Flush KEY-FPR and KEY-TIME.

(cherry picked from commit e7dca3e83ebd6df0a7ea55e97c3cd6e91be90af5)

6 years agoFix mksamplekeys awk to not leave out the whitespace altogether
David Shaw [Fri, 30 Nov 2012 17:39:05 +0000 (12:39 -0500)]
Fix mksamplekeys awk to not leave out the whitespace altogether

6 years agoRefresh sample keys
David Shaw [Fri, 30 Nov 2012 17:21:45 +0000 (12:21 -0500)]
Refresh sample keys

* mksamplekeys: Tweak awk script to not add trailing whitespace to
  blank lines (makes git pre-commit hook unhappy).

* samplekeys.asc: Refresh.

6 years agoThe keyserver search menu should honor --keyid-format
David Shaw [Thu, 29 Nov 2012 17:00:46 +0000 (12:00 -0500)]
The keyserver search menu should honor --keyid-format

* keyserver.c (print_keyrec): Honor --keyid-format when getting back
  full fingerprints from the keyserver (the comment in the code was
  correct, the code was not).

6 years agotests: Skip secret key import check in SELinux mode
Werner Koch [Thu, 8 Nov 2012 16:16:40 +0000 (17:16 +0100)]
tests: Skip secret key import check in SELinux mode

* (ENABLE_SELINUX_HACKS): New am_conditional.
* checks/ (prepared.stamp): Replace by
( Create and set enable_selinux_hacks variable.
* checks/ Include

* checks/armor.test: Do not run the last test in selinux mode.

GnuPG-bug-id: 1390

6 years agode.po: Grammar fix
Werner Koch [Thu, 8 Nov 2012 15:31:22 +0000 (16:31 +0100)]
de.po: Grammar fix

* po/de.po: Grammar fix by Daniel Leidert

GnuPG-bug-id: 1276

6 years agoCreate off-line card encryption key with the right size.
Werner Koch [Thu, 8 Nov 2012 14:59:47 +0000 (15:59 +0100)]
Create off-line card encryption key with the right size.

* g10/keygen.c (gen_card_key_with_backup): Get the size of the key
from the card.

Formerly the off-line encryption key was created with a fixed length
of 1024 bit.  With this change the key is created as expected.

GnuPG-bug-id: 1230

6 years agoSupport the not anymore patented IDEA cipher algorithm.
Werner Koch [Thu, 8 Nov 2012 12:25:02 +0000 (13:25 +0100)]
Support the not anymore patented IDEA cipher algorithm.

* cipher/idea.c: New.  Take from Libgcrypt master and adjust for
direct use in GnuPG.
* cipher/idea-stub.c: Remove.
* cipher/ Add idea.c and remove idea-stub.c rules.
* Remove idea-stub code.
* g10/gpg.c (check_permissions): Remove code path for ITEM==2.
(main): Make --load-extension a dummy option.
* g10/keygen.c (keygen_set_std_prefs): Include IDEA only in PGP2
compatibility mode.
* g10/misc.c (idea_cipher_warn): Remove.  Also remove all callers.
* g10/seckey-cert.c (do_check): Remove emitting of STATUS_RSA_OR_IDEA.
* g10/status.c (get_status_string): Remove STATUS_RSA_OR_IDEA.
* g10/status.h (STATUS_RSA_OR_IDEA): Remove.


To keep the number of actually used algorithms low, we support IDEA
only in a basically read-only way (unless --pgp2 is used during key
generation).  It does not make sense to suggest the use of this old 64
bit blocksize algorithm.  However, there is old data available where
it might be helpful to have IDEA available.

6 years agoFix usage of dlerror to conform to POSIX.
Werner Koch [Wed, 7 Nov 2012 20:38:27 +0000 (21:38 +0100)]
Fix usage of dlerror to conform to POSIX.

* cipher/idea-stub.c: Clear last error before dlsym.

This is required for NetBSD.

Reported-by: Thomas Klausner
6 years agoImprove handling of random_seed read errors.
Werner Koch [Wed, 7 Nov 2012 17:06:27 +0000 (18:06 +0100)]
Improve handling of random_seed read errors.

* cipher/random.c (read_seed_file): Distinguish between errors and
short reads.

This should help to avoid program aborts due to races.  Nevertheless a
better and cross-platform locking would be a more solid solution.

GnuPG-bug-id: 1439

6 years agoRemove trailing white space from one file
Werner Koch [Wed, 7 Nov 2012 17:00:45 +0000 (18:00 +0100)]
Remove trailing white space from one file


6 years agoHandle systems which have uint64_t but not the UINT64_C macro.
Thomas Klausner [Sat, 27 Oct 2012 17:56:11 +0000 (19:56 +0200)]
Handle systems which have uint64_t but not the UINT64_C macro.

* include/types.h (U64_C) [!UINT64_C]: Add simple replacement.

This could happen with UNIX98-type systems, such as the code on
the netbsd-1-5 branch, and would prevent this package from building
on such systems.

6 years agoIndent nested cpp directives for better readability.
Werner Koch [Tue, 6 Nov 2012 16:44:11 +0000 (17:44 +0100)]
Indent nested cpp directives for better readability.


6 years agoFix extern inline use for gcc > 4.3 in c99 mode
Werner Koch [Tue, 6 Nov 2012 16:14:04 +0000 (17:14 +0100)]
Fix extern inline use for gcc > 4.3 in c99 mode

* mpi/mpi-inline.h [!G10_MPI_INLINE_DECL]: Take care of changed extern
inline semantics in gcc.

I am not use how this will work out with non-gcc. However, we had no
problems in the past and thus this change is the least invasive for
non-gcc compilers.

6 years Do not use -c with chmod.
Werner Koch [Tue, 6 Nov 2012 15:21:52 +0000 (16:21 +0100)] Do not use -c with chmod.


7 years agoUpdate translations to adjust for typo fixes
Werner Koch [Fri, 24 Aug 2012 15:29:28 +0000 (17:29 +0200)]
Update translations to adjust for typo fixes

7 years agoUpdate French translation.
David Prévot [Sun, 5 Aug 2012 22:43:02 +0000 (18:43 -0400)]
Update French translation.

* po/fr.po: Update.

7 years agoFix typos spotted during translations
Werner Koch [Fri, 24 Aug 2012 14:37:44 +0000 (16:37 +0200)]
Fix typos spotted during translations

* g10/gpg.c: uppercase after Syntax
* util/secmem.c (print_warn): Update URL.

7 years agoActually show translators comments in PO files
David Prévot [Sun, 5 Aug 2012 22:22:46 +0000 (18:22 -0400)]
Actually show translators comments in PO files


Note that strings marked for gettext need to immediately follow a
TRANSLATOR comment block.

7 years agoKeep previous msgids of translated messages
David Prévot [Tue, 31 Jul 2012 23:27:44 +0000 (19:27 -0400)]
Keep previous msgids of translated messages

* po/ Use option --previous with msgmerge.

7 years agoWith --quiet do not print reading passphrase from fd message.
Werner Koch [Sun, 29 Apr 2012 09:54:28 +0000 (11:54 +0200)]
With --quiet do not print reading passphrase from fd message.

Fix for bug#1403.
* g10/passphrase.c (read_passphrase_from_fd): Act on --quiet.

7 years agoHonor --cert-digest-algo when recreating a cert.
David Shaw [Wed, 1 Feb 2012 02:30:05 +0000 (21:30 -0500)]
Honor --cert-digest-algo when recreating a cert.

* g10/sign.c (update_keysig_packet): Honor --cert-digest-algo when
  recreating a cert.

This is used by various things in --edit-key like setpref, primary,
etc.  Suggested by Christian Aistleitner.

7 years agoRelease 1.4.12 gnupg-1.4.12
Werner Koch [Mon, 30 Jan 2012 12:42:13 +0000 (13:42 +0100)]
Release 1.4.12

7 years agoFix ChangeLog creation rule.
Werner Koch [Mon, 30 Jan 2012 14:11:54 +0000 (15:11 +0100)]
Fix ChangeLog creation rule.

* (gen-ChangeLog): Use set -e.  Fixes commit b99e77d5.

7 years agoAuto update of uk.po
Werner Koch [Mon, 30 Jan 2012 14:12:31 +0000 (15:12 +0100)]
Auto update of uk.po


7 years agoAdd Ukrainian translation.
Werner Koch [Mon, 30 Jan 2012 12:39:31 +0000 (13:39 +0100)]
Add Ukrainian translation.

* po/uk.po: New.
* po/LINGUAS: Add uk.po.

7 years agoUpdate GNU helper files.
Werner Koch [Mon, 30 Jan 2012 09:47:23 +0000 (10:47 +0100)]
Update GNU helper files.

* scripts/config.guess, scripts/config.rpath: Update to version
* scripts/config.rpath, scripts/compile, scripts/depcomp: Update to
modern version.
* scripts/texinfo.tex: Update from current gnulib.

7 years agoUpdate sample keys.
Werner Koch [Mon, 30 Jan 2012 09:42:34 +0000 (10:42 +0100)]
Update sample keys.


7 years agoUpdate documentation.
Werner Koch [Mon, 30 Jan 2012 09:40:31 +0000 (10:40 +0100)]
Update documentation.

* doc/gpg.texi, doc/specify-user-id.texi, doc/yat2m.c: Update from
current GnuPG master (commit bdde44a).

7 years agoRequire gitlog-to-changelog to be installed.
Werner Koch [Mon, 30 Jan 2012 09:25:06 +0000 (10:25 +0100)]
Require gitlog-to-changelog to be installed.

(gen-ChangeLog): Use installed version of gitlog-to-changelog.

7 years agoFix typos in comments.
Werner Koch [Tue, 24 Jan 2012 08:48:17 +0000 (09:48 +0100)]
Fix typos in comments.

Fixes provided by Gilles Espinasse.

7 years agoDo not copy default merge commit log entries into the ChangeLog.
Werner Koch [Fri, 20 Jan 2012 10:08:06 +0000 (11:08 +0100)]
Do not copy default merge commit log entries into the ChangeLog.

* scripts/gitlog-to-changelog: Skip merge commits.

7 years agoMerge branch 'STABLE-BRANCH-1-4' of git+ssh:// into STABL...
David Shaw [Fri, 20 Jan 2012 03:34:45 +0000 (22:34 -0500)]
Merge branch 'STABLE-BRANCH-1-4' of git+ssh:// into STABLE-BRANCH-1-4

7 years agoChanges to --min-cert-level should cause a trustdb rebuild (issue 1366)
David Shaw [Fri, 20 Jan 2012 03:33:51 +0000 (22:33 -0500)]
Changes to --min-cert-level should cause a trustdb rebuild (issue 1366)

* g10/gpgv.c, g10/trustdb.c (read_trust_options): Add min_cert_level

* g10/trustdb.c (check_trustdb_stale): Request a rebuild if
  pending_check_trustdb is true (set when we detect a trustdb
  parameter has changed).

* g10/keylist.c (public_key_list): Use 'l' in the "tru" with-colons
  listing for min_cert_level not matching.

* g10/tdbio.c (tdbio_update_version_record, create_version_record,
  tdbio_db_matches_options, tdbio_dump_record, tdbio_read_record,
  tdbio_write_record): Add a byte for min_cert_level in the tdbio
  version record.

7 years agow32: Always build with -fno-omit-frame-pointer.
Werner Koch [Mon, 16 Jan 2012 17:45:09 +0000 (18:45 +0100)]
w32: Always build with -fno-omit-frame-pointer.

This is required due to a bug in the mingw32 runtime.
* (HAVE_W32_SYSTEM): Force use of -fno-omit-frame-pointer.

7 years agow32: Allow passing a relative name for the tarball
Werner Koch [Mon, 16 Jan 2012 17:43:51 +0000 (18:43 +0100)]
w32: Allow passing a relative name for the tarball

* scripts/mk-w32-dist: Prepend PWD to TARBALL.

7 years agoAutomate W32 installer building.
Werner Koch [Mon, 16 Jan 2012 15:12:24 +0000 (16:12 +0100)]
Automate W32 installer building.

* doc/README.W32: Document new installer build procedure.
* scripts/ Pass all args to the installer (regression fix).
* scripts/conf-w32/README: Remove from repo.
* scripts/conf-w32/bzip2-1.diff: Remove from repo.
* scripts/mk-w32-dist: Rewrite.
* scripts/w32installer.nsi [WITH_PATCHES]: Use constant patch file

7 years agoAdd a DECRYPTION_INFO status.
Werner Koch [Fri, 13 Jan 2012 15:20:53 +0000 (16:20 +0100)]

* g10/status.h (STATUS_DECRYPTION_INFO): New.
* g10/status.c (get_status_string): Add new status string.
* g10/encr-data.c: Include status.h.
(decrypt_data): Print STATUS_DECRYPTION_INFO.
This is  backport of commit  5667e33.

DECRYPTION_INFO <mdc_method> <sym_algo>
   Print information about the symmetric encryption algorithm and
   the MDC method.  This will be emitted even if the decryption

7 years agoInclude bzip2 code to ease building for W32.
Werner Koch [Fri, 13 Jan 2012 09:57:42 +0000 (10:57 +0100)]
Include bzip2 code to ease building for W32.

* bzlib/: Include bzip2 code.
* [W32]: Force use of included bzip2 code.
* scripts/ <--build-w32>: Do not pass --with-bzip option.
* (SUBDIRS): Add bzip.  Use it only under W32.

In the past it happened that we forgot to build against bzip2 which is
a standard feature these days.  Having the source included makes sure
that we will always build with bzip2 support.

7 years agoAllow building with the 32 bit mingw-w64 toolchain.
Werner Koch [Thu, 12 Jan 2012 17:10:30 +0000 (18:10 +0100)]
Allow building with the 32 bit mingw-w64 toolchain.

* scripts/ <--build-w32>: Support i686-w64-mingw32 and use
it by default if installed.
* keyserver/gpgkeys_ldap.c (my_ldap_start_tls_s): Define macro
depending on compiler version.
(main): Use new macro.
* util/miscutil.c [!HAVE_TIMEGM]: Add prototype for the timegm
autoconf replacement function.

It seems that the LDAP keyserver helper build with the old mingw32
toolchain never worked correctly for LDAPS.  The prototype there for
ldap_start_tls_s is plainly wrong for Windows.  Anyway I included
special support so not to break building with the old compiler.

7 years agogpg: Remove unused fields from a trust data structure.
Werner Koch [Thu, 12 Jan 2012 11:19:54 +0000 (12:19 +0100)]
gpg: Remove unused fields from a trust data structure.

The functions tdbio_read_record and tdbio_write_record control the
actual on-disk format.  Thus there is no need to keep reserved fields
in the internal data structure.

* g10/tdbio.h (struct trust_record): Remove reserved fields.

7 years agoTypo fixes and comment re-formatting.
Werner Koch [Thu, 12 Jan 2012 10:47:35 +0000 (11:47 +0100)]
Typo fixes and comment re-formatting.

7 years agoDistribute dotlock.h
David Shaw [Wed, 11 Jan 2012 06:23:59 +0000 (01:23 -0500)]
Distribute dotlock.h

7 years agoRefresh sample keys
David Shaw [Tue, 10 Jan 2012 15:32:03 +0000 (10:32 -0500)]
Refresh sample keys

7 years agoAllow use of a standard space separated fingerprint.
Werner Koch [Tue, 10 Jan 2012 14:32:45 +0000 (15:32 +0100)]
Allow use of a standard space separated fingerprint.

We allow a single or a double space in the middle of the fingerprint
to help with c+p fingerprints from an HTML pages which are not being
enclosed in a "pre" tag.
* g10/getkey.c (classify_user_id): Check for space separated GPG
This is a backport of commit 957fe72 and 372fb4f.

7 years agoReplace file locking by the new portable dotlock code.
Werner Koch [Tue, 10 Jan 2012 14:16:44 +0000 (15:16 +0100)]
Replace file locking by the new portable dotlock code.

* include/dotlock.h: New.  From current gnupg master.
* util/dotlock.c: Ditto.  Include util.h.  The major changes done in
master are: Factor Unix and W32 specific code out into specific
functions.  Define HAVE_POSIX_SYSTEM.  Rearrange some functions.
(disable_dotlock): Rename to dotlock_disable.
(create_dotlock): Rename to dotlock_create and add a dummy arg.
(destroy_dotlock): Rename to dotlock_destroy.
(make_dotlock): Rename to dotlock_take.
(release_dotlock): Rename to dotlock_release.
(remove_lockfiles): Rename to dotlock_remove_lockfiles.

7 years agoUpdate copyright years.
Werner Koch [Tue, 10 Jan 2012 10:51:19 +0000 (11:51 +0100)]
Update copyright years.

* util/argparse.c (default_strusage): Update printed copyright year.

7 years agoUse gcc pragmas to suppress some warnings.
Werner Koch [Tue, 10 Jan 2012 10:31:00 +0000 (11:31 +0100)]
Use gcc pragmas to suppress some warnings.

* util/estream-printf.c (pr_float): Use new gcc pragma to ignore a
warning about a non-literal format.
* util/miscutil.c (asctimestamp): Ditto.
* cipher/md.c (md_stop_debug): Use new gcc pragme to ignore a warning
* about a set but unused variable.

7 years agoUpdate gitlog-to-changelog.
Werner Koch [Tue, 10 Jan 2012 10:25:23 +0000 (11:25 +0100)]
Update gitlog-to-changelog.

* scripts/gitlog-to-changelog: Update from gnupg master.
* (gen-ChangeLog): Add new options.
* scripts/ Fix typo in URL.  Reported by Gilles Espinasse.

7 years agoUse the longest key ID available when talking to a HKP server.
David Shaw [Wed, 28 Dec 2011 21:41:31 +0000 (16:41 -0500)]
Use the longest key ID available when talking to a HKP server.

This is issue 1340.  Now that PKSD is dead, and SKS supports long key
IDs, this is safe to do.  Patch from Daniel Kahn Gillmor

7 years agoGenerate the ChangeLog from commit logs.
Werner Koch [Fri, 2 Dec 2011 19:41:40 +0000 (20:41 +0100)]
Generate the ChangeLog from commit logs.

* scripts/gitlog-to-changelog: New script.  Taken from gnulib.
* scripts/git-log-fix: New file.
* scripts/git-log-footer: New file.
* scripts/git-hooks/commit-msg: New script.
* Install commit-msg hook for git.
* doc/HACKING: Describe the ChangeLog policy.
* (EXTRA_DIST): Add new files.
(gen-ChangeLog): New.
(dist-hook): Run gen-ChangeLog.

7 years agoRename all ChangeLog files to ChangeLog-2011.
Werner Koch [Fri, 2 Dec 2011 18:42:56 +0000 (19:42 +0100)]
Rename all ChangeLog files to ChangeLog-2011.

* ChangeLog: New file.

8 years agoOn VMS use --batch by default if in batch mode.
Werner Koch [Mon, 12 Sep 2011 13:23:41 +0000 (15:23 +0200)]
On VMS use --batch by default if in batch mode.

This problem was identified and solved by Steven M. Schweda.
Note that the vms specific code is not part of this repository.
See for the VMS port.

8 years agoRemoved some set but unused vars.
Werner Koch [Tue, 9 Aug 2011 08:54:22 +0000 (10:54 +0200)]
Removed some set but unused vars.

8 years agoFix aliasing problem.
Werner Koch [Tue, 9 Aug 2011 08:54:02 +0000 (10:54 +0200)]
Fix aliasing problem.

8 years agoFixed some autoconf bit rot.
Werner Koch [Tue, 9 Aug 2011 08:32:21 +0000 (10:32 +0200)]
Fixed some autoconf bit rot.

Autoconf 2.68 is more picky about correct macro usage and thus I fixed
some wrong call conventions for AC_LANG_PROGRAM.  Also factored an m4
conditional construct out from AC_INIT to avoid the "not a literal"

8 years agoFix bug#1307
Werner Koch [Tue, 9 Aug 2011 08:12:36 +0000 (10:12 +0200)]
Fix bug#1307

This is a backport of the fixes for 2.0.  There is only one real bug,
the other changes are for clarity and for more picky compilers.

8 years agoPrint the decoded iteration count witn --list-packets.
Werner Koch [Fri, 22 Jul 2011 12:00:08 +0000 (14:00 +0200)]
Print the decoded iteration count witn --list-packets.

Fixes bug#1355.

8 years agoAllow building for ARM thumb. Fixes bug#1202.
Werner Koch [Mon, 4 Jul 2011 10:41:45 +0000 (12:41 +0200)]
Allow building for ARM thumb.  Fixes bug#1202.

8 years agoAdd pubkey letters e and E for ECC.
Werner Koch [Fri, 1 Jul 2011 08:21:08 +0000 (10:21 +0200)]
Add pubkey letters e and E for ECC.

This does not mean we have any kind of ECC support now.  It is merely
to avoid printing a question mark for the algorithm.

Trailing white space changes as usual.

8 years ago* photoid.c (generate_photo_id): Check for the JPEG magic numbers
David Shaw [Wed, 6 Apr 2011 03:47:58 +0000 (23:47 -0400)]
* photoid.c (generate_photo_id): Check for the JPEG magic numbers
instead of JFIF since some programs generate an EXIF header first.
This is issue 1331.

8 years agoDon't link gpgv with libreadline
Werner Koch [Wed, 23 Feb 2011 13:29:59 +0000 (14:29 +0100)]
Don't link gpgv with libreadline

Also add a useful .gitignore file.

8 years agoUpdate gpg-zip.1 (bug#1317)
Werner Koch [Wed, 23 Feb 2011 10:12:17 +0000 (11:12 +0100)]
Update gpg-zip.1 (bug#1317)

8 years agoSupport a git revision number
Werner Koch [Tue, 28 Dec 2010 18:50:05 +0000 (19:50 +0100)]
Support a git revision number

8 years agoRevert last two changes and replace by code from libgcrypt 1.4.6.
Werner Koch [Thu, 23 Dec 2010 19:05:31 +0000 (19:05 +0000)]
Revert last two changes and replace by code from libgcrypt 1.4.6.

8 years ago* gpg.c (main): Do not provide a default for
David Shaw [Fri, 29 Oct 2010 19:16:27 +0000 (19:16 +0000)]
* gpg.c (main): Do not provide a default for
--personal-digest-preferences.  This allows the usual digest selection
algorithm to pick a digest based on recipient keys.

8 years ago* pkclist.c (select_algo_from_prefs): Slightly improve the handling of
David Shaw [Fri, 29 Oct 2010 19:14:28 +0000 (19:14 +0000)]
* pkclist.c (select_algo_from_prefs): Slightly improve the handling of
MD5 in preference lists.  Instead of replacing MD5 with SHA-1, just
remove MD5 from the list altogether, and let the next-highest ranked
algorithm be chosen.