mirror of
https://salsa.debian.org/gnuk-team/gnuk/gnuk.git
synced 2024-09-20 10:50:09 +00:00
return error sooner for decryption
This commit is contained in:
parent
29b68186bf
commit
51435e7dba
@ -1,5 +1,8 @@
|
||||
2012-07-09 Niibe Yutaka <gniibe@fsij.org>
|
||||
|
||||
* src/openpgp.c (cmd_pso): For decryption, return error sooner for
|
||||
invalid data.
|
||||
|
||||
* tool/stlinkv2.py (stlinkv2.setup_gpio): Fix GPIOB_CRL.
|
||||
|
||||
* test/rsa_keys.py (integer_to_bytes_256): Rename from
|
||||
|
@ -776,10 +776,15 @@ cmd_pso (void)
|
||||
|
||||
/* Skip padding 0x00 */
|
||||
len--;
|
||||
r = rsa_decrypt (apdu.cmd_apdu_data+1, res_APDU, len,
|
||||
&kd[GPG_KEY_FOR_DECRYPTION]);
|
||||
if (r < 0)
|
||||
GPG_ERROR ();
|
||||
if (len != KEY_CONTENT_LEN)
|
||||
GPG_CONDITION_NOT_SATISFIED ();
|
||||
else
|
||||
{
|
||||
r = rsa_decrypt (apdu.cmd_apdu_data+1, res_APDU, len,
|
||||
&kd[GPG_KEY_FOR_DECRYPTION]);
|
||||
if (r < 0)
|
||||
GPG_ERROR ();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user