aboutsummaryrefslogtreecommitdiffstats
path: root/sm/decrypt.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2002-03-06 09:01:12 +0000
committerWerner Koch <[email protected]>2002-03-06 09:01:12 +0000
commit303b4bd6361a817227aa72a63b3a32d9c063b1d9 (patch)
tree36bd7306649f626b8b34a4c983efff801efe533b /sm/decrypt.c
parentWe got more error codes than actual code ;-) (diff)
downloadgnupg-303b4bd6361a817227aa72a63b3a32d9c063b1d9.tar.gz
gnupg-303b4bd6361a817227aa72a63b3a32d9c063b1d9.zip
Decryption using a Cryptoflex card does now work.
Diffstat (limited to 'sm/decrypt.c')
-rw-r--r--sm/decrypt.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sm/decrypt.c b/sm/decrypt.c
index d16bb59e4..382ec0975 100644
--- a/sm/decrypt.c
+++ b/sm/decrypt.c
@@ -79,6 +79,14 @@ prepare_decryption (const char *hexkeygrip, KsbaConstSexp enc_val,
goto leave;
}
+ /* FIXME: Actually the leading zero is required but due to the way
+ we encode the output in libgcrypt as an MPI we are not able to
+ encode that leading zero. However, when using a Smartcard we are
+ doing it the rightway and therefore we have skip the zero. This
+ should be fixed in gpg-agent of course. */
+ if (!seskey[n])
+ n++;
+
if (seskey[n] != 2 ) /* wrong block type version */
{
rc = seterr (Invalid_Session_Key);