mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* configure.ac: Require libksba 0.9.7.
* certreqgen.c (get_parameter_uint, create_request): Create an extension for key usage when requested. * gpgsm.c (main): Install emergency_cleanup also as an atexit handler. * verify.c (gpgsm_verify): Removed the separate error code handling for KSBA. We use shared error codes anyway. * export.c (export_p12): Removed debugging code. * encrypt.c (gpgsm_encrypt): Put the session key in to secure memory.
This commit is contained in:
parent
438ece068b
commit
f289f433b6
13 changed files with 118 additions and 69 deletions
|
@ -77,7 +77,7 @@ prepare_decryption (ctrl_t ctrl, const char *hexkeygrip, const char *desc,
|
|||
if (seskeylen == 24)
|
||||
{
|
||||
/* Smells like a 3-des key. This might happen because a SC has
|
||||
already done the unpacking. fixme! */
|
||||
already done the unpacking. */
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -90,18 +90,18 @@ prepare_decryption (ctrl_t ctrl, const char *hexkeygrip, const char *desc,
|
|||
/* 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 to skip the zero. This
|
||||
doing it the right way and therefore we have to skip the zero. This
|
||||
should be fixed in gpg-agent of course. */
|
||||
if (!seskey[n])
|
||||
n++;
|
||||
|
||||
if (seskey[n] != 2 ) /* wrong block type version */
|
||||
if (seskey[n] != 2 ) /* Wrong block type version. */
|
||||
{
|
||||
rc = gpg_error (GPG_ERR_INV_SESSION_KEY);
|
||||
goto leave;
|
||||
}
|
||||
|
||||
for (n++; n < seskeylen && seskey[n]; n++) /* skip the random bytes */
|
||||
for (n++; n < seskeylen && seskey[n]; n++) /* Skip the random bytes. */
|
||||
;
|
||||
n++; /* and the zero byte */
|
||||
if (n >= seskeylen )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue