[git] Scute - branch, master, updated. scute-1.3.0-55-g2d8d4f0
by Werner Koch
cvs at cvs.gnupg.org
Wed Mar 23 12:41:02 CET 2016
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PKCS#11 token on top of gpg-agent".
The branch, master has been updated
via 2d8d4f0f7415f368690ecc4164a62598a125d5d9 (commit)
via fd7c84b61f535deef5235f503a51dc523d1d0e23 (commit)
via e1b15651be68db1d33f68d5393ce737e02c1e823 (commit)
from dd7cf6c77904395ea32052ae213465d4794cef03 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 2d8d4f0f7415f368690ecc4164a62598a125d5d9
Author: Werner Koch <wk at gnupg.org>
Date: Wed Mar 23 12:40:21 2016 +0100
Remove unused variable.
* src/slots.c (session_sign): Remove uses var "session".
Signed-off-by: Werner Koch <wk at gnupg.org>
diff --git a/src/slots.c b/src/slots.c
index 70d230c..136d64e 100644
--- a/src/slots.c
+++ b/src/slots.c
@@ -1007,7 +1007,6 @@ session_sign (slot_iterator_t id, session_iterator_t sid,
CK_BYTE_PTR pSignature, CK_ULONG_PTR pulSignatureLen)
{
struct slot *slot = scute_table_data (slots, id);
- struct session *session = scute_table_data (slot->sessions, sid);
gpg_error_t err;
unsigned int sig_len;
commit fd7c84b61f535deef5235f503a51dc523d1d0e23
Author: Werner Koch <wk at gnupg.org>
Date: Wed Mar 23 12:36:45 2016 +0100
Strip trailing spaces from two files.
--
diff --git a/src/agent.c b/src/agent.c
index b49bd2f..b51dc7e 100644
--- a/src/agent.c
+++ b/src/agent.c
@@ -2,7 +2,7 @@
Copyright (C) 2006, 2007, 2008, 2015 g10 Code GmbH
This file is part of Scute.
-
+
Scute 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 2 of the License, or
@@ -66,7 +66,7 @@ static int agent_version_minor;
/* Hack required for Windows. */
-void
+void
gnupg_allow_set_foregound_window (pid_t pid)
{
if (!pid || pid == (pid_t)(-1))
@@ -112,7 +112,7 @@ build_w32_commandline_copy (char *buffer, const char *string)
/* Build a command line for use with W32's CreateProcess. On success
CMDLINE gets the address of a newly allocated string. */
static gpg_error_t
-build_w32_commandline (const char *pgmname, const char * const *argv,
+build_w32_commandline (const char *pgmname, const char * const *argv,
char **cmdline)
{
int i, n;
@@ -140,7 +140,7 @@ build_w32_commandline (const char *pgmname, const char * const *argv,
return gpg_error_from_syserror ();
p = build_w32_commandline_copy (p, pgmname);
- for (i=0; argv[i]; i++)
+ for (i=0; argv[i]; i++)
{
*p++ = ' ';
p = build_w32_commandline_copy (p, argv[i]);
@@ -162,7 +162,7 @@ spawn_process_detached (const char *pgmname, const char *argv[])
{
gpg_error_t err;
SECURITY_ATTRIBUTES sec_attr;
- PROCESS_INFORMATION pi =
+ PROCESS_INFORMATION pi =
{
NULL, /* Returns process handle. */
0, /* Returns primary thread handle. */
@@ -180,11 +180,11 @@ spawn_process_detached (const char *pgmname, const char *argv[])
memset (&sec_attr, 0, sizeof sec_attr );
sec_attr.nLength = sizeof sec_attr;
sec_attr.bInheritHandle = FALSE;
-
+
/* Build the command line. */
err = build_w32_commandline (pgmname, argv, &cmdline);
if (err)
- return err;
+ return err;
/* Start the process. */
memset (&si, 0, sizeof si);
@@ -195,7 +195,7 @@ spawn_process_detached (const char *pgmname, const char *argv[])
cr_flags = (CREATE_DEFAULT_ERROR_MODE
| GetPriorityClass (GetCurrentProcess ())
| CREATE_NEW_PROCESS_GROUP
- | DETACHED_PROCESS);
+ | DETACHED_PROCESS);
DEBUG (DBG_INFO, "CreateProcess(detached), path=`%s' cmdline=`%s'\n",
pgmname, cmdline);
if (!CreateProcess (pgmname, /* Program to start. */
@@ -222,7 +222,7 @@ spawn_process_detached (const char *pgmname, const char *argv[])
" dwProcessID=%d dwThreadId=%d\n", pi.hProcess, pi.hThread,
(int) pi.dwProcessId, (int) pi.dwThreadId);
- CloseHandle (pi.hThread);
+ CloseHandle (pi.hThread);
return 0;
}
@@ -281,8 +281,8 @@ agent_connect (assuan_context_t *ctx_r)
const char *argv[3];
argv[0] = "--daemon";
- argv[1] = "--use-standard-socket";
- argv[2] = NULL;
+ argv[1] = "--use-standard-socket";
+ argv[2] = NULL;
err = spawn_process_detached (agent_program, argv);
if (err)
@@ -307,15 +307,15 @@ agent_connect (assuan_context_t *ctx_r)
pgmname = agent_program;
else
pgmname++;
-
+
argv[0] = pgmname;
argv[1] = "--server";
argv[2] = NULL;
-
+
i=0;
no_close_list[i++] = assuan_fd_from_posix_fd (fileno (stderr));
no_close_list[i] = -1;
-
+
/* Connect to the agent and perform initial handshaking. */
err = assuan_pipe_connect (ctx, agent_program, argv,
no_close_list, NULL, NULL, 0);
@@ -354,7 +354,7 @@ agent_connect (assuan_context_t *ctx_r)
force_pipe_server = 1;
goto restart;
}
-
+
err = assuan_socket_connect (ctx, infostr, pid, 0);
free (infostr);
if (err)
@@ -401,7 +401,7 @@ default_inq_cb (void *opaque, const char *line)
/* Send a simple command to the agent. */
-static gpg_error_t
+static gpg_error_t
agent_simple_cmd (assuan_context_t ctx, const char *fmt, ...)
{
gpg_error_t err;
@@ -422,7 +422,7 @@ agent_simple_cmd (assuan_context_t ctx, const char *fmt, ...)
DEBUG (DBG_CRIT, "gpg-agent command '%s' failed: %s", optstr,
gpg_strerror (err));
free (optstr);
-
+
return err;
}
@@ -447,7 +447,7 @@ read_version_cb (void *opaque, const void *buffer, size_t length)
return 0;
}
-
+
/* Configure the GPG agent at connection CTX. */
static gpg_error_t
@@ -614,7 +614,7 @@ unescape_status_string (const unsigned char *src)
while (*src)
{
if (*src == '%' && src[1] && src[2])
- {
+ {
src++;
*dst = xtoi_2 (src);
if (*dst == '\0')
@@ -630,7 +630,7 @@ unescape_status_string (const unsigned char *src)
else
*(dst++) = *(src++);
}
- *dst = 0;
+ *dst = 0;
return buffer;
}
@@ -892,7 +892,7 @@ geteventcounter_status_cb (void *opaque, const char *line)
last_count = count;
}
}
-
+
return 0;
}
diff --git a/src/slots.c b/src/slots.c
index b1712aa..70d230c 100644
--- a/src/slots.c
+++ b/src/slots.c
@@ -2,7 +2,7 @@
Copyright (C) 2006 g10 Code GmbH
This file is part of Scute.
-
+
Scute 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 2 of the License, or
@@ -464,7 +464,7 @@ slots_update (void)
err = slots_update_slot (id);
if (err)
- return err;
+ return err;
id = scute_table_next (slots, id);
}
@@ -1029,6 +1029,6 @@ session_sign (slot_iterator_t id, session_iterator_t sid,
/* FIXME: Oh well. */
if (gpg_err_code (err) == GPG_ERR_INV_ARG)
return CKR_BUFFER_TOO_SMALL;
-
+
return scute_gpg_err_to_ck (err);
}
commit e1b15651be68db1d33f68d5393ce737e02c1e823
Author: Werner Koch <wk at gnupg.org>
Date: Wed Mar 23 12:35:38 2016 +0100
Minor cleanup for commit dd7cf6c.
* src/agent.c (pksign_parse_result): Remove leading Nul byte only if
it is a suffix.
--
Signed-off-by: Werner Koch <wk at gnupg.org>
diff --git a/src/agent.c b/src/agent.c
index ac5a30f..b49bd2f 100644
--- a/src/agent.c
+++ b/src/agent.c
@@ -1026,7 +1026,7 @@ pksign_parse_result (const struct signature *sig,
return gpg_error (GPG_ERR_INV_SEXP);
/* Remove nul byte prepended by gpg-agent. */
- if (*s == 0)
+ if (!*s && n > 1)
{
n -= 1;
s += 1;
-----------------------------------------------------------------------
Summary of changes:
src/agent.c | 44 ++++++++++++++++++++++----------------------
src/slots.c | 7 +++----
2 files changed, 25 insertions(+), 26 deletions(-)
hooks/post-receive
--
PKCS#11 token on top of gpg-agent
http://git.gnupg.org
More information about the Gnupg-commits
mailing list