mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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.
This commit is contained in:
parent
ffd099eb19
commit
b008274afd
305 changed files with 5385 additions and 5592 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue