[git] Scute - branch, master, updated. scute-1.3.0-52-gdd7cf6c
by Damien Goutte-Gattat
cvs at cvs.gnupg.org
Wed Mar 23 11:25:34 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 dd7cf6c77904395ea32052ae213465d4794cef03 (commit)
from 086b72ab07016778fea1ffeb8e5cc340d2116f6a (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 dd7cf6c77904395ea32052ae213465d4794cef03
Author: Damien Goutte-Gattat <dgouttegattat at incenp.org>
Date: Wed Mar 23 09:35:46 2016 +0100
scute: Remove prepended nul byte in signature data
* src/agent.c (pksign_parse_result): Check for nul byte prepended
by the agent to the signature value.
--
GPG Agent may prepend a nul byte in the signature value if the
first byte of the signature has its most significant bit set, to
prevent it from being interpreted as a sign bit (see the function
agent_pksign_do, in GnuPG's agent/pksign.c file).
The current sexp parser in Scute does not expect this extra nul
byte, and will reject any signature containing it with a
GPG_ERR_INV_LENGTH error.
This patch checks for an initial nul byte in the signature
data, and removes it.
Signed-off-by: Damien Goutte-Gattat <dgouttegattat at incenp.org>
diff --git a/src/agent.c b/src/agent.c
index 7e968c0..ac5a30f 100644
--- a/src/agent.c
+++ b/src/agent.c
@@ -1025,6 +1025,13 @@ pksign_parse_result (const struct signature *sig,
if (! n)
return gpg_error (GPG_ERR_INV_SEXP);
+ /* Remove nul byte prepended by gpg-agent. */
+ if (*s == 0)
+ {
+ n -= 1;
+ s += 1;
+ }
+
if (*len < (unsigned int) n)
return gpg_error (GPG_ERR_INV_LENGTH);
-----------------------------------------------------------------------
Summary of changes:
src/agent.c | 7 +++++++
1 file changed, 7 insertions(+)
hooks/post-receive
--
PKCS#11 token on top of gpg-agent
http://git.gnupg.org
More information about the Gnupg-commits
mailing list