mirror of
git://git.gnupg.org/gnupg.git
synced 2024-11-10 21:38:50 +01:00
gpgsm: Allow decryption with a card returning a PKCS#1 stripped key.
* sm/decrypt.c (prepare_decryption): Handle a 16 byte session key. -- GnuPG-bug-id: 2230 Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
81d6e98cdf
commit
8489b12211
@ -74,10 +74,12 @@ prepare_decryption (ctrl_t ctrl, const char *hexkeygrip, const char *desc,
|
||||
log_printhex ("pkcs1 encoded session key:", seskey, seskeylen);
|
||||
|
||||
n=0;
|
||||
if (seskeylen == 24)
|
||||
if (seskeylen == 24 || seskeylen == 16)
|
||||
{
|
||||
/* Smells like a 3-des key. This might happen because a SC has
|
||||
already done the unpacking. */
|
||||
/* Smells like a 3-DES or AES-128 key. This might happen
|
||||
* because a SC has already done the unpacking. A better
|
||||
* solution would be to test for this only after we triggered
|
||||
* the GPG_ERR_INV_SESSION_KEY. */
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user