<div>I have openpgp keys loaded on a yubikey in smartcard mode but am having problems accessing the card. Originally there were some permission issues but i worked them out to the point that gpg --card-status consistently reads the card. This is on fedora. However gpg2 --card-status gives "gpg selecting openpgp failed Card error gpg OpenPGP card not available Card error"<br></div><div><br></div><div>Since selinux had previously been a problem I did setenforce 0 to troubleshoot. Now gpg2 --card-status reads the card successfully. However there are no new avc denials so I'm not sure how or why selinux is blocking gpg2 but not gpg. Even more weirdly If while selinux is in permissive mode I read the card with gpg2 I can't afterwards read it with gpg. I get "gpg pcsc_establish_context failed no service (0x801001d) gpg OpenPGP card not available general error"<br></div><div><br></div><div>So using gpg I can access the card if selinux is on or off unless I first access the card with gpg2. Afterwards I get errors from gpg. <br></div><div><br></div><div>gpg  --version<br></div><div>1.4.22<br></div><div><br></div><div>gpg2 --version<br></div><div>2.1.13<br></div><div>Libgcrypt 1.7.9<br></div><div><br></div><div>Any idea how to troubleshoot this?</div><div><br></div><div><br></div><div class="protonmail_signature_block"><div class="protonmail_signature_block-user protonmail_signature_block-empty"><br></div><div class="protonmail_signature_block-proton">Sent with <a href="https://protonmail.com">ProtonMail</a> Secure Email.<br></div></div><div><br></div>