mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: Allow decryption using PIV cards.
* g10/call-agent.c (struct getattr_one_parm_s): New. (getattr_one_status_cb): New. (agent_scd_getattr_one): New. * g10/pubkey-enc.c (get_it): Allow the standard leading zero byte from pkcs#1. * g10/skclist.c (enum_secret_keys): Handle non-OpenPGP cards. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
2b1135cf92
commit
ec6a677923
4 changed files with 146 additions and 8 deletions
|
@ -319,6 +319,16 @@ get_it (ctrl_t ctrl,
|
|||
err = gpg_error (GPG_ERR_WRONG_SECKEY);
|
||||
goto leave;
|
||||
}
|
||||
|
||||
/* 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 right way and
|
||||
* therefore we have to skip the zero. This should be fixed
|
||||
* in gpg-agent of course. */
|
||||
if (!frame[n])
|
||||
n++;
|
||||
|
||||
if (frame[n] == 1 && frame[nframe - 1] == 2)
|
||||
{
|
||||
log_info (_("old encoding of the DEK is not supported\n"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue