mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-01 16:33:02 +01:00
* decrypt.c (prepare_decryption): Hack to detected already
unpkcsedone keys.
This commit is contained in:
parent
beb0fef1ee
commit
dc8f3ee42c
@ -1,5 +1,8 @@
|
||||
2002-08-09 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* decrypt.c (prepare_decryption): Hack to detected already
|
||||
unpkcsedone keys.
|
||||
|
||||
* gpgsm.c (emergency_cleanup): New.
|
||||
(main): Initialize the signal handler.
|
||||
|
||||
|
@ -73,6 +73,13 @@ prepare_decryption (const char *hexkeygrip, KsbaConstSexp enc_val,
|
||||
log_printhex ("pkcs1 encoded session key:", seskey, seskeylen);
|
||||
|
||||
n=0;
|
||||
if (seskeylen == 24)
|
||||
{
|
||||
/* Smells like a 3-des key. This might happen because a SC has
|
||||
already done the unpacking. fixme! */
|
||||
}
|
||||
else
|
||||
{
|
||||
if (n + 7 > seskeylen )
|
||||
{
|
||||
rc = seterr (Invalid_Session_Key);
|
||||
@ -101,6 +108,7 @@ prepare_decryption (const char *hexkeygrip, KsbaConstSexp enc_val,
|
||||
rc = seterr (Invalid_Session_Key);
|
||||
goto leave;
|
||||
}
|
||||
}
|
||||
|
||||
if (DBG_CRYPTO)
|
||||
log_printhex ("session key:", seskey+n, seskeylen-n);
|
||||
|
Loading…
x
Reference in New Issue
Block a user