Commit f9a92113 authored by Werner Koch's avatar Werner Koch Committed by Ingo Klöcker
Browse files

Create shadow key also for the smartcard's encryption key.

The shadow key is required to properly decrypt messages.  The test
case here is: A new user inserts her card, Kleo figures which are
signing and encryption key and shows that in the dialog.  The user
enters the address of the recipient, signs and encrypts, and sends off
the data.  Now when she wants to decrypt the message by herself, she
will get an error because GnuPG can't find the key due to the missing
shadow key for the encryption key.  This might work better with GnuPG
2.3 but for 2.2 this is very annoying.  GnuPG actually does the same
what this patch does but that does not kick in here.

The --no-data is just an optimization available with latest gpg-agent
version; older version would just ignore this.
parent ab36849e
Pipeline #60784 passed with stage
in 15 minutes and 2 seconds
......@@ -527,7 +527,8 @@ static void handle_p15_card(std::shared_ptr<Card> &ci, std::shared_ptr<Context>
}
/* Create the key stubs */
gpgagent_statuslines(gpg_agent, "READKEY --card -- $SIGNKEYID", err);
gpgagent_statuslines(gpg_agent, "READKEY --card --no-data -- $SIGNKEYID", err);
gpgagent_statuslines(gpg_agent, "READKEY --card --no-data -- $ENCRKEYID", err);
p15Card->setCardInfo(info);
p15Card->setManufacturer(get_manufacturer(gpg_agent, err));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment