diff options
author | NIIBE Yutaka <[email protected]> | 2015-07-02 03:14:40 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2015-07-02 03:14:40 +0000 |
commit | 45c49a0030c7a01ec011ce810ddb3aaef734e9bf (patch) | |
tree | 56047a760e49aeaa4e79f59118308dad821ecb0c /scd/app-openpgp.c | |
parent | Post release updates (diff) | |
download | gnupg-45c49a0030c7a01ec011ce810ddb3aaef734e9bf.tar.gz gnupg-45c49a0030c7a01ec011ce810ddb3aaef734e9bf.zip |
scd: Support AES decryption for OpenPGPcard v3.0.
* scd/app-openpgp.c (do_decipher): Support AES decryption.
Diffstat (limited to 'scd/app-openpgp.c')
-rw-r--r-- | scd/app-openpgp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c index 467389d5a..f5911f3c6 100644 --- a/scd/app-openpgp.c +++ b/scd/app-openpgp.c @@ -4101,7 +4101,10 @@ do_decipher (app_t app, const char *keyidstr, if (rc) return rc; - if (app->app_local->keyattr[1].key_type == KEY_TYPE_RSA) + if (indatalen == 16 + 1 || indatalen == 32 + 1) + /* PSO:DECIPHER with symmetric key. */ + padind = -1; + else if (app->app_local->keyattr[1].key_type == KEY_TYPE_RSA) { /* We might encounter a couple of leading zeroes in the cryptogram. Due to internal use of MPIs these leading zeroes |