gpg: Make decryption with the OpenPGP card work.
authorWerner Koch <wk@gnupg.org>
Mon, 26 Aug 2013 15:29:54 +0000 (17:29 +0200)
committerWerner Koch <wk@gnupg.org>
Wed, 28 Aug 2013 15:40:32 +0000 (17:40 +0200)
commit780ba3233618393835970bac4cf8aab713f4d7fa
tree646f0a60cff18fb3743abeecc46bb2a21877937c
parent04e2c83f189cc56342e1be784bdc63761ccdb5bb
gpg: Make decryption with the OpenPGP card work.

* scd/app-common.h (APP_DECIPHER_INFO_NOPAD): New.
* scd/app-openpgp.c (do_decipher): Add arg R_INFO.
* scd/app-nks.c (do_decipher): Add arg R_INFO as a dummy.
* scd/app.c (app_decipher): Add arg R_INFO.
* scd/command.c (cmd_pkdecrypt): Print status line "PADDING".
* agent/call-scd.c (padding_info_cb): New.
(agent_card_pkdecrypt): Add arg R_PADDING.
* agent/divert-scd.c (divert_pkdecrypt): Ditto.
* agent/pkdecrypt.c (agent_pkdecrypt): Ditto.
* agent/command.c (cmd_pkdecrypt):  Print status line "PADDING".
* g10/call-agent.c (padding_info_cb): New.
(agent_pkdecrypt): Add arg R_PADDING.
* g10/pubkey-enc.c (get_it): Use padding info.
--

Decryption using a card never worked in gpg 2.1 because the
information whether the pkcs#1 padding needs to be removed was not
available.  Gpg < 2.1 too this info from the secret sub key but that
has gone in 2.1.

Signed-off-by: Werner Koch <wk@gnupg.org>
16 files changed:
NEWS
agent/agent.h
agent/call-scd.c
agent/command.c
agent/divert-scd.c
agent/pkdecrypt.c
doc/gpg-agent.texi
doc/scdaemon.texi
g10/call-agent.c
g10/call-agent.h
g10/pubkey-enc.c
scd/app-common.h
scd/app-nks.c
scd/app-openpgp.c
scd/app.c
scd/command.c