Commit b008274a authored by Werner Koch's avatar Werner Koch

Nuked almost all trailing white space.

We better do this once and for all instead of cluttering all future
commits with diffs of trailing white spaces.  In the majority of cases
blank or single lines are affected and thus this change won't disturb
a git blame too much.  For future commits the pre-commit scripts
checks that this won't happen again.
parent ffd099eb
......@@ -28,7 +28,7 @@ Daiki Ueno <ueno@unixuser.org> Assigns Past and Future Changes.
David Shaw <dshaw@jabberwocky.com> Assigns past and future changes.
(all in keyserver/,
a lot of changes in g10/ see the ChangeLog,
bug fixes here and there)
bug fixes here and there)
Dokianakis Theofanis <madf@hellug.gr> Translations [el]
......@@ -76,7 +76,7 @@ Marcus Brinkmann <marcus@g10code.de>
Matthew Skala <mskala@ansuz.sooke.bc.ca> Disclaimer
(wrote cipher/twofish.c)
Moritz Schulte <moritz@g10code.com>
Moritz Schulte <moritz@g10code.com>
(ssh support gpg-agent)
Niklas Hernaeus <nh@df.lth.se> Disclaimer
......@@ -84,11 +84,11 @@ Niklas Hernaeus <nh@df.lth.se> Disclaimer
Nilgun Belma Buguner <nilgun@technologist.com> Translations [tr]
Nils Ellmenreich <nils 'at' infosun.fmi.uni-passau.de>
Nils Ellmenreich <nils 'at' infosun.fmi.uni-passau.de>
Assigns past and future changes
(configure.in, cipher/rndlinux.c, FAQ)
Paul Eggert <eggert@twinsun.com>
Paul Eggert <eggert@twinsun.com>
(configuration macros for LFS)
Pavel I. Shajdo <pshajdo@gmail.com> Translations [ru]
......
# Makefile.am - main makefile for GnuPG
# Copyright (C) 2001, 2004, 2010 Free Software Foundation, Inc.
#
#
# This file is part of GnuPG.
#
#
# GnuPG is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
#
# GnuPG is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
......@@ -23,7 +23,7 @@ AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip
DISTCHECK_CONFIGURE_FLAGS = --enable-symcryptrun --enable-mailto
EXTRA_DIST = scripts/config.rpath scripts/potomo autogen.sh README.GIT
DISTCLEANFILES = g10defs.h
DISTCLEANFILES = g10defs.h
if BUILD_GPGSM
kbx = kbx
......@@ -35,11 +35,11 @@ endif
if BUILD_GPG
gpg = g10
if !HAVE_W32CE_SYSTEM
keyserver =
keyserver =
endif
else
gpg =
keyserver =
keyserver =
endif
if BUILD_GPGSM
sm = sm
......@@ -106,6 +106,5 @@ install-data-hook:
done
endif
stowinstall:
stowinstall:
$(MAKE) $(AM_MAKEFLAGS) install prefix=/usr/local/stow/gnupg
......@@ -16,7 +16,7 @@ tools, or the tools are not installed, you may use environment
variables to override the default tool names:
AUTOMAKE_SUFFIX is used as a suffix for all tools from the automake
package. For example
package. For example
AUTOMAKE_SUFFIX="-1.7" ./autogen.sh
uses "automake-1.7" and "aclocal-1.7.
AUTOMAKE_PREFIX is used as a prefix for all tools from the automake
......@@ -47,5 +47,3 @@ if the maintainer decides that newer versions are required. The
maintainer should also make sure that the required version of automake
et al. are properly indicated at the top of configure.ac and take care
to copy the files and not merely use symlinks.
......@@ -19,7 +19,7 @@ Release process:
================
* Make sure that all new PO files are checked in.
* Decide whether you want to update the automake standard files
* Decide whether you want to update the automake standard files
(Mainly config.guess and config.sub).
* [1.4 only] Update gpg.texi and gpgv.texi from the trunk:
make -C doc update-source-from-gnupg-2
......@@ -38,14 +38,14 @@ Release process:
* Build and test the W32 version.
* [2.x only] Using the final test build run a "make -C doc online".
* Sign the tarball
* Get the previous tarball and run "mkdiff gnupg".
* Get the previous tarball and run "mkdiff gnupg".
You might need to set a different signature key than mine. mkdiff
has an option for this.
* If you are satisfied with the result commit a tag for the release.
* Copy the files to the FTP server
* Update the webpages - at least the file swdb.wml needs an update.
* Add a new headline to NEWS.
* Bump "my_version" up and set "my_issvn" back to "yes" in configure.ac
* Bump "my_version" up and set "my_issvn" back to "yes" in configure.ac
* Write an announcement. Update https://savannah.gnu.org/projects/gnupg .
......@@ -61,7 +61,3 @@ Gotchas
from running make) you end up with different comments in the po
files. Check out /usr/lib/gettext/project-id for that silliness.
As a hack we added this string into configure.ac.
......@@ -109,7 +109,7 @@ Ian McKellar imckellar at harvestroad.com.au
Ingo Klöcker kloecker at kde.org
Ivo Timmermans itimmermans at bigfoot.com
Jan Krueger max at physics.otago.ac.nz
Jan Niehusmann jan at gondor.com
Jan Niehusmann jan at gondor.com
Jan-0liver Wagner jan @ intevation.de
Janusz A. Urbanowicz alex at bofh.torun.pl
James Troup james at nocrew.org
......@@ -141,7 +141,7 @@ Karl Fogel kfogel at guanabana.onshore.com
Karsten Thygesen karthy at kom.auc.dk
Katsuhiro Kondou kondou at nec.co.jp
Kazu Yamamoto kazu at iij.ad.jp
Kazuyoshi Kakihara
Kazuyoshi Kakihara
Keith Clayton keith at claytons.org
Ken Takusagawa ken.takusagawa.2 at gmail.com
Kevin Ryde user42 at zip.com.au
......@@ -151,11 +151,11 @@ Klaus Singvogel ks at caldera.de
Kurt Garloff garloff at suse.de
Lars Kellogg-Stedman lars at bu.edu
L. Sassaman rabbi at quickie.net
M Taylor mctaylor at privacy.nb.ca
M Taylor mctaylor at privacy.nb.ca
Marcel Waldvogel mwa at arl.wustl.edu
Marco d'Itri md at linux.it
Marco Parrone marc0 at autistici.org
Marcus Brinkmann Marcus.Brinkmann at ruhr-uni-bochum.de
Marcus Brinkmann Marcus.Brinkmann at ruhr-uni-bochum.de
Mark Adler madler at alumni.caltech.edu
Mark Elbrecht snowball3 at bigfoot.com
Mark Pettit pettit at yahoo-inc.com
......
......@@ -6,12 +6,12 @@
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
#
# GnuPG is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
......@@ -53,7 +53,7 @@ gpg_agent_SOURCES = \
common_libs = $(libcommon) ../gl/libgnu.a
commonpth_libs = $(libcommonpth) ../gl/libgnu.a
if HAVE_W32CE_SYSTEM
pwquery_libs =
pwquery_libs =
else
pwquery_libs = ../common/libsimple-pwquery.a
endif
......@@ -109,9 +109,5 @@ TESTS = t-protect
t_common_ldadd = $(common_libs) $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) \
$(LIBINTL) $(LIBICONV) $(NETLIBS)
t_protect_SOURCES = t-protect.c protect.c
t_protect_SOURCES = t-protect.c protect.c
t_protect_LDADD = $(t_common_ldadd)
......@@ -118,7 +118,7 @@ struct
#define DBG_CACHE_VALUE 64 /* debug the caching */
#define DBG_MEMSTAT_VALUE 128 /* show memory statistics */
#define DBG_HASHING_VALUE 512 /* debug hashing operations */
#define DBG_ASSUAN_VALUE 1024
#define DBG_ASSUAN_VALUE 1024
#define DBG_COMMAND (opt.debug & DBG_COMMAND_VALUE)
#define DBG_CRYPTO (opt.debug & DBG_CRYPTO_VALUE)
......@@ -131,14 +131,14 @@ struct server_local_s;
struct scd_local_s;
/* Collection of data per session (aka connection). */
struct server_control_s
struct server_control_s
{
/* Private data used to fire up the connection thread. We use this
structure do avoid an extra allocation for just a few bytes. */
struct {
gnupg_fd_t fd;
} thread_startup;
/* Private data of the server (command.c). */
struct server_local_s *server_local;
......@@ -165,7 +165,7 @@ struct server_control_s
};
struct pin_entry_info_s
struct pin_entry_info_s
{
int min_digits; /* min. number of digits required or 0 for freeform entry */
int max_digits; /* max. number of allowed digits allowed*/
......@@ -180,7 +180,7 @@ struct pin_entry_info_s
};
enum
enum
{
PRIVATE_KEY_UNKNOWN = 0,
PRIVATE_KEY_CLEAR = 1,
......@@ -191,7 +191,7 @@ enum
/* Values for the cache_mode arguments. */
typedef enum
typedef enum
{
CACHE_MODE_IGNORE = 0, /* Special mode to bypass the cache. */
CACHE_MODE_ANY, /* Any mode except ignore matches. */
......@@ -231,7 +231,7 @@ void start_command_handler_ssh (ctrl_t, gnupg_fd_t);
/*-- findkey.c --*/
int agent_write_private_key (const unsigned char *grip,
const void *buffer, size_t length, int force);
gpg_error_t agent_key_from_file (ctrl_t ctrl,
gpg_error_t agent_key_from_file (ctrl_t ctrl,
const char *cache_nonce,
const char *desc_text,
const unsigned char *grip,
......@@ -240,7 +240,7 @@ gpg_error_t agent_key_from_file (ctrl_t ctrl,
lookup_ttl_t lookup_ttl,
gcry_sexp_t *result,
char **r_passphrase);
gpg_error_t agent_public_key_from_file (ctrl_t ctrl,
gpg_error_t agent_public_key_from_file (ctrl_t ctrl,
const unsigned char *grip,
gcry_sexp_t *result);
int agent_is_dsa_key (gcry_sexp_t s_key);
......@@ -307,7 +307,7 @@ unsigned long get_standard_s2k_count (void);
int agent_protect (const unsigned char *plainkey, const char *passphrase,
unsigned char **result, size_t *resultlen);
int agent_unprotect (const unsigned char *protectedkey, const char *passphrase,
gnupg_isotime_t protected_at,
gnupg_isotime_t protected_at,
unsigned char **result, size_t *resultlen);
int agent_private_key_type (const unsigned char *privatekey);
unsigned char *make_shadow_info (const char *serialno, const char *idstring);
......@@ -316,7 +316,7 @@ int agent_shadow_key (const unsigned char *pubkey,
unsigned char **result);
int agent_get_shadow_info (const unsigned char *shadowkey,
unsigned char const **shadow_info);
gpg_error_t parse_shadow_info (const unsigned char *shadow_info,
gpg_error_t parse_shadow_info (const unsigned char *shadow_info,
char **r_hexsn, char **r_idstr);
gpg_error_t s2k_hash_passphrase (const char *passphrase, int hashalgo,
int s2kmode,
......@@ -335,7 +335,7 @@ void agent_reload_trustlist (void);
/*-- divert-scd.c --*/
int divert_pksign (ctrl_t ctrl,
int divert_pksign (ctrl_t ctrl,
const unsigned char *digest, size_t digestlen, int algo,
const unsigned char *shadow_info, unsigned char **r_sig);
int divert_pkdecrypt (ctrl_t ctrl,
......
......@@ -126,7 +126,7 @@ init_encryption (void)
if (err)
log_error ("error initializing cache encryption context: %s\n",
gpg_strerror (err));
if (!pth_mutex_release (&encryption_lock))
log_fatal ("failed to release cache encryption mutex\n");
......@@ -148,7 +148,7 @@ new_data (const char *string, struct secret_data_s **r_data)
struct secret_data_s *d, *d_enc;
size_t length;
int total;
*r_data = NULL;
err = init_encryption ();
......@@ -222,7 +222,7 @@ housekeeping (void)
for (r=thecache; r; r = r->next)
{
unsigned long maxttl;
switch (r->cache_mode)
{
case CACHE_MODE_SSH: maxttl = opt.max_cache_ttl_ssh; break;
......@@ -334,7 +334,7 @@ agent_put_cache (const char *key, cache_mode_t cache_mode,
}
if (data)
{
r->created = r->accessed = gnupg_get_time ();
r->created = r->accessed = gnupg_get_time ();
r->ttl = ttl;
r->cache_mode = cache_mode;
err = new_data (data, &r->pw);
......@@ -350,7 +350,7 @@ agent_put_cache (const char *key, cache_mode_t cache_mode,
else
{
strcpy (r->key, key);
r->created = r->accessed = gnupg_get_time ();
r->created = r->accessed = gnupg_get_time ();
r->ttl = ttl;
r->cache_mode = cache_mode;
err = new_data (data, &r->pw);
......@@ -428,4 +428,3 @@ agent_get_cache (const char *key, cache_mode_t cache_mode)
return NULL;
}
......@@ -147,7 +147,7 @@ agent_reset_query (ctrl_t ctrl)
disconnect that pinentry - we do this after the unlock so that a
stalled pinentry does not block other threads. Fixme: We should
have a timeout in Assuan for the disconnect operation. */
static int
static int
unlock_pinentry (int rc)
{
assuan_context_t ctx = entry_ctx;
......@@ -175,7 +175,7 @@ atfork_cb (void *opaque, int where)
{
int iterator = 0;
const char *name, *assname, *value;
gcry_control (GCRYCTL_TERM_SECMEM);
while ((name = session_env_list_stdenvnames (&iterator, &assname)))
......@@ -184,7 +184,7 @@ atfork_cb (void *opaque, int where)
ones which do have an assuan name but are conveyed using
environment variables, update the environment of the
forked process. */
if (!assname
if (!assname
|| !strcmp (name, "XAUTHORITY")
|| !strcmp (name, "PINENTRY_USER_DATA"))
{
......@@ -250,12 +250,12 @@ start_pinentry (ctrl_t ctrl)
entry_owner = ctrl;
if (entry_ctx)
return 0;
return 0;
if (opt.verbose)
log_info ("starting a new PIN Entry\n");
#ifdef HAVE_W32_SYSTEM
#ifdef HAVE_W32_SYSTEM
fflush (stdout);
fflush (stderr);
#endif
......@@ -300,7 +300,7 @@ start_pinentry (ctrl_t ctrl)
}
else
argv[1] = NULL;
i=0;
if (!opt.running_detached)
{
......@@ -342,7 +342,7 @@ start_pinentry (ctrl_t ctrl)
if (DBG_ASSUAN)
log_debug ("connection to PIN entry established\n");
rc = assuan_transact (entry_ctx,
rc = assuan_transact (entry_ctx,
opt.no_grab? "OPTION no-grab":"OPTION grab",
NULL, NULL, NULL, NULL, NULL, NULL);
if (rc)
......@@ -426,7 +426,7 @@ start_pinentry (ctrl_t ctrl)
}
}
/* Tell the pinentry the name of a file it shall touch after having
messed with the tty. This is optional and only supported by
newer pinentries and thus we do no error checking. */
......@@ -438,7 +438,7 @@ start_pinentry (ctrl_t ctrl)
if (tmpstr)
{
char *optstr;
if (asprintf (&optstr, "OPTION touch-file=%s", tmpstr ) < 0 )
;
else
......@@ -454,7 +454,7 @@ start_pinentry (ctrl_t ctrl)
it will send the pid back and we will use an inquire to notify
our client. The client may answer the inquiry either with END or
with CAN to cancel the pinentry. */
rc = assuan_transact (entry_ctx, "GETINFO pid",
rc = assuan_transact (entry_ctx, "GETINFO pid",
getinfo_pid_cb, &pinentry_pid,
NULL, NULL, NULL, NULL);
if (rc)
......@@ -542,7 +542,7 @@ all_digitsp( const char *s)
for (; *s && *s >= '0' && *s <= '9'; s++)
;
return !*s;
}
}
/* Return a new malloced string by unescaping the string S. Escaping
......@@ -561,7 +561,7 @@ unescape_passphrase_string (const unsigned char *s)
while (*s && !spacep (s))
{
if (*s == '%' && s[1] && s[2])
{
{
s++;
*d = xtoi_2 (s);
if (!*d)
......@@ -577,7 +577,7 @@ unescape_passphrase_string (const unsigned char *s)
else
*d++ = *s++;
}
*d = 0;
*d = 0;
return buffer;
}
......@@ -619,7 +619,7 @@ inq_quality (void *opaque, const char *line)
line += 7;
while (*line == ' ')
line++;
pin = unescape_passphrase_string (line);
if (!pin)
rc = gpg_error_from_syserror ();
......@@ -651,7 +651,7 @@ setup_qualitybar (void)
char line[ASSUAN_LINELENGTH];
char *tmpstr, *tmpstr2;
const char *tooltip;
/* TRANSLATORS: This string is displayed by Pinentry as the label
for the quality bar. */
tmpstr = try_percent_escape (_("Quality:"), "\t\r\n\f\v");
......@@ -664,7 +664,7 @@ setup_qualitybar (void)
; /* Ignore Unknown Command from old Pinentry versions. */
else if (rc)
return rc;
tmpstr2 = gnupg_get_help_string ("pinentry.qualitybar.tooltip", 0);
if (tmpstr2)
tooltip = tmpstr2;
......@@ -715,7 +715,7 @@ close_button_status_cb (void *opaque, const char *line)
if ( !strcmp (line, "close") )
*flag = 1;
}
return 0;
}
......@@ -738,7 +738,7 @@ agent_askpin (ctrl_t ctrl,
int is_pin = 0;
int saveflag;
int close_button;
if (opt.batch)
return 0; /* fixme: we should return BAD PIN */
......@@ -784,7 +784,7 @@ agent_askpin (ctrl_t ctrl,
}
if (initial_errtext)
{
{
snprintf (line, DIM(line)-1, "SETERROR %s", initial_errtext);
line[DIM(line)-1] = 0;
rc = assuan_transact (entry_ctx, line,
......@@ -801,7 +801,7 @@ agent_askpin (ctrl_t ctrl,
parm.buffer = (unsigned char*)pininfo->pin;
if (errtext)
{
{
/* TRANLATORS: The string is appended to an error message in
the pinentry. The %s is the actual error message, the
two %d give the current and maximum number of tries. */
......@@ -814,7 +814,7 @@ agent_askpin (ctrl_t ctrl,
return unlock_pinentry (rc);
errtext = NULL;
}
saveflag = assuan_get_flag (entry_ctx, ASSUAN_CONFIDENTIAL);
assuan_begin_confidential (entry_ctx);
close_button = 0;
......@@ -879,7 +879,7 @@ agent_askpin (ctrl_t ctrl,
/* Ask for the passphrase using the supplied arguments. The returned
passphrase needs to be freed by the caller. */
int
int
agent_get_passphrase (ctrl_t ctrl,
char **retpass, const char *desc, const char *prompt,
const char *errtext, int with_qualitybar)
......@@ -893,7 +893,7 @@ agent_get_passphrase (ctrl_t ctrl,
*retpass = NULL;
if (opt.batch)
return gpg_error (GPG_ERR_BAD_PASSPHRASE);
return gpg_error (GPG_ERR_BAD_PASSPHRASE);
rc = start_pinentry (ctrl);
if (rc)
......@@ -973,9 +973,9 @@ agent_get_passphrase (ctrl_t ctrl,
displayed to allow the user to easily return a GPG_ERR_CANCELED.
if the Pinentry does not support this, the user can still cancel by
closing the Pinentry window. */
int
int
agent_get_confirmation (ctrl_t ctrl,
const char *desc, const char *ok,
const char *desc, const char *ok,
const char *notok, int with_cancel)
{
int rc;
......@@ -1049,7 +1049,7 @@ agent_get_confirmation (ctrl_t ctrl,
text OK_BTN (which may be NULL to use the default of "OK") and waut
for the user to hit this button. The return value is not
relevant. */
int
int
agent_show_message (ctrl_t ctrl, const char *desc, const char *ok_btn)
{
int rc;
......@@ -1083,7 +1083,7 @@ agent_show_message (ctrl_t ctrl, const char *desc, const char *ok_btn)
if (rc)
return unlock_pinentry (rc);
}
rc = assuan_transact (entry_ctx, "CONFIRM --one-button", NULL, NULL, NULL,
NULL, NULL, NULL);
if (rc && gpg_err_source (rc) && gpg_err_code (rc) == GPG_ERR_ASS_CANCELED)
......@@ -1103,7 +1103,7 @@ popup_message_thread (void *arg)
allow the use of old Pinentries. Those old Pinentries will then
show an additional Cancel button but that is mostly a visual
annoyance. */
assuan_transact (entry_ctx, "CONFIRM --one-button",
assuan_transact (entry_ctx, "CONFIRM --one-button",
NULL, NULL, NULL, NULL, NULL, NULL);
popup_finished = 1;
return NULL;
......@@ -1116,7 +1116,7 @@ popup_message_thread (void *arg)
as the message is not anymore required because the message is
system modal and all other attempts to use the pinentry will fail
(after a timeout). */
int
int
agent_popup_message_start (ctrl_t ctrl, const char *desc, const char *ok_btn)
{
int rc;
......@@ -1177,7 +1177,7 @@ agent_popup_message_stop (ctrl_t ctrl)
if (!popup_tid || !entry_ctx)
{
log_debug ("agent_popup_message_stop called with no active popup\n");
return;
return;
}
pid = assuan_get_pid (entry_ctx);
......@@ -1192,7 +1192,7 @@ agent_popup_message_stop (ctrl_t ctrl)
&& pid != 0)
{
HANDLE process = (HANDLE) pid;
/* Arbitrary error code. */
TerminateProcess (process, 1);
}
......@@ -1221,5 +1221,3 @@ agent_popup_message_stop (ctrl_t ctrl)
/* Now we can close the connection. */
unlock_pinentry (0);
}
......@@ -85,7 +85,7 @@ struct learn_parm_s
void *sinfo_cb_arg;
};
struct inq_needpin_s
struct inq_needpin_s
{
assuan_context_t ctx;
int (*getpin_cb)(void *, const char *, char*, size_t);
......@@ -169,7 +169,7 @@ agent_scd_dump_state (void)
dump_mutex_state (&start_scd_lock);
log_printf ("\n");
log_info ("agent_scd_dump_state: primary_scd_ctx=%p pid=%ld reusable=%d\n",
primary_scd_ctx,
primary_scd_ctx,
(long)assuan_get_pid (primary_scd_ctx),
primary_scd_ctx_reusable);
if (socket_name)
......@@ -184,7 +184,7 @@ agent_scd_dump_state (void)
called and error checked before any SCD operation. CTRL is the
usual connection context and RC the error code to be passed trhough
the function. */
static int
static int
unlock_scd (ctrl_t ctrl, int rc)
{
if (ctrl->scd_local->locked != 1)
......@@ -313,7 +313,7 @@ start_scd (ctrl_t ctrl)
/* Nope, it has not been started. Fire it up now. */
if (opt.verbose)
log_info ("no running SCdaemon - starting it\n");
if (fflush (NULL))
{
#ifndef HAVE_W32_SYSTEM
......@@ -402,9 +402,9 @@ start_scd (ctrl_t ctrl)
if (opt.sigusr2_enabled)
{
char buf[100];
#ifdef HAVE_W32_SYSTEM
snprintf (buf, sizeof buf, "OPTION event-signal=%lx",
snprintf (buf, sizeof buf, "OPTION event-signal=%lx",
(unsigned long)get_agent_scd_notify_event ());
#else