Some smart card tools assume that the openpgp app is active unless they have changed it themselves. To prevent confusing those tools, Kleopatra should switch the smart cards back to the openpgp app after any operation involving a different smart card app.
Description
Revisions and Commits
rKLEOPATRA Kleopatra | |||
rKLEOPATRA58bb942c20f2 Switch smart card back to openpgp after reading other app | |||
rKLEOPATRAf9a3dd76a1e8 Switch smart card back to openpgp after any card command |
Related Objects
Event Timeline
Note that this change has the inconvenient consequence for the users that they will have to (re-)enter the PIV Authentication Key for each operation that requires authentication, e.g. for each write operation (generate key, write key, write certificate), because switching to openpgp seems to reset the PIV authentication.
I have checked that we now switch back to openpgp (if necessary) after every use of ReaderStatus::startSimpleTransaction and ReaderStatus::startTransaction. The only uses of those functions outside of subclasses of CardCommand are by PGPCardWidget for which switching back to openpgp isn't needed.
This means that all code paths which switch the smart card app should be covered.
works: After generating a PIV key
gpg --edit-card
nevertheless shows the OpenPGP keys. Tested with gpg4win 4.2.0.