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

Is Le not logged [Query] #1444

Closed
code-with-amitk opened this issue Aug 8, 2018 · 1 comment
Closed

Is Le not logged [Query] #1444

code-with-amitk opened this issue Aug 8, 2018 · 1 comment

Comments

@code-with-amitk
Copy link

Problem Description

I see this after connecting Atos card 5.3
# /usr/local/bin/opensc-tool -a -vvv
0x7fd485e77880 17:20:53.811 [opensc-tool] apdu.c:378:sc_single_transmit: CLA:0, INS:CA, P1:1, P2:8D, data(0) (nil)
0x7fd485e77880 17:20:53.811 [opensc-tool] reader-pcsc.c:284:pcsc_transmit: reader 'Gemalto PC Twin Reader 00 00'
0x7fd485e77880 17:20:53.811 [opensc-tool] reader-pcsc.c:285:pcsc_transmit:
Outgoing APDU (5 bytes):
00 CA 01 8D 02 .....
0x7fd485e77880 17:20:53.811 [opensc-tool] reader-pcsc.c:213:pcsc_internal_transmit: called
0x7fd485e77880 17:20:53.815 [opensc-tool] reader-pcsc.c:294:pcsc_transmit:
Incoming APDU (4 bytes):
01 80 90 00 ....

What is 02 in CAPDU (00 CA 01 8D 02)? Is this Le?
P1=01(1st parameter), P2=8D(2nd parameter)

Is RAPDU correct? (01 80 90 00)
a. Asked P2 was 8D, but came=80. Does this mean card does not have data starting from 01 8D?
b. Do I need to ask communication specs from manufacturer of card for same.

Too early to say but sorry I feel there is lot of repetitive code we can optimize it.

@martinpaljak
Copy link
Member

martinpaljak commented Aug 9, 2018

You can try stackoverflow for generic smart card discussion. Or is there a bug in OpenSC? Having specs for a productg is always a good thing and usually required to do development for a specific card.

Yes 02 can probably be interpreted as Le. What exactly should this given APDU do, depends on the specific card.

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

No branches or pull requests

2 participants