Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opensc compatibility #4

Open
klali opened this issue Apr 19, 2013 · 9 comments
Open

opensc compatibility #4

klali opened this issue Apr 19, 2013 · 9 comments

Comments

@klali
Copy link
Member

klali commented Apr 19, 2013

The openpgp applet today is not compatible with opensc, it would probably be a good idea to be compatible even if opensc requires the atr to be listed to recognize the card.

@Yannovitch
Copy link

+1

1 similar comment
@oliverklee
Copy link

👍

@klali klali mentioned this issue Apr 7, 2014
@Doridian
Copy link

+1

@jas4711
Copy link
Contributor

jas4711 commented Aug 4, 2014

So what's involved in making this happen? Is it about patching OpenSC, or is something required in the applet?

@klali
Copy link
Member Author

klali commented Aug 5, 2014

It's probably only changes to the applet to conform to expectations of OpenSC.

As the openpgp driver in OpenSC does it's detection based on ATR the driver choice has to be forced instead of autodetected.
The first and simplest test is to run:

$ OPENSC_DEBUG=9 opensc-tool -c openpgp -n

and compare with a standard openpgp card.

@asheiduk
Copy link
Contributor

It seems that OpenSC sends SELECT-FILE:

00 A4 04 00 06 D2 76 00 01 24 01 00

The OpenPGP card returns

62 15 84 10 D2 76 00 01 24 01 02 00 00 05 00 00
21 E4 00 00 8A 01 05 90 00

but Yubico only returns

90 00

The OpenPGP spec 2.0 allows to return a FCI or empty (p. 31) but OpenSC bails out expecting either an FCI or FCP response.

@stv0g
Copy link

stv0g commented Aug 6, 2015

The OpenPGP spec 2.0 allows to return a FCI or empty (p. 31) but OpenSC bails out expecting either an FCI or FCP response.

Sounds like OpenSC is not following the spec? In this case we should patch OpenSC instead of the applet?

@jas4711
Copy link
Contributor

jas4711 commented Aug 7, 2015

What's the SELECT FILE command supposed to do? If we can make OpenSC accept this (supposedly legal?) output, would it make the OpenSC OpenPGP PKCS#11 driver work? That would be good -- I just read http://changelog.complete.org/archives/9381-detailed-smart-card-cryptographic-token-security-guide and it suggested the neo didn't work with opensc in openpgp mode.

@frankmorgner
Copy link

Just stumbled across this; a bug report would have been nice...

Anyway, it's fixed in OpenSC with OpenSC/OpenSC#1232

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

8 participants