kaoh / globalplatform

C library + command-line for Open- / GlobalPlatform smart cards
https://kaoh.github.io/globalplatform/
Other
72 stars 30 forks source link

Another segfault in open_sc #13

Closed kaoh closed 4 years ago

kaoh commented 14 years ago

I have a USB eToken PRO 72K Java and have been getting a similar error to bug 2805984.

Using globalplatform-5.0.0.tar.gz and gpshell-1.4.2.tar.gz

mode_211 enable_trace establish_context card_connect select -AID A0000001510000 Command --> 00A4040007A0000001510000 Wrapped command --> 00A4040007A0000001510000 Response <-- 6F0F8407A0000001510000A5049F6501FF9000 open_sc -security 1 -keyind 0 -keyver 0 -enc_key 404142434445464748494a4b4c4d4e4f -mac_key 404142434445464748494a4b4c4d4e4f Command --> 80CA006600 Wrapped command --> 80CA006600 Response <-- 663F733D06072A864886FC6B01600C060A2A864886FC6B02020101630906072A864886FC6B03640B06092A864886FC6B040105660C060A2B060104012A026E01029000 Command --> 8050000008F95D3DC43E16273700 Wrapped command --> 8050000008F95D3DC43E16273700 Response <-- 00000000000000000000010124E4FF320492AE7B811C1F32D937950D9000 Segmentation fault

I've must have run this a couple dozen times, hopefully I haven't locked my card.. I'm very new to smartcards and didn't know about this until I read the comments in bug 2805984 after I Googled this problem.

Reported by: rabdargab

kaoh commented 14 years ago

Thanks, for the bug report. A new release of GP is on its way. I will did into this and try to find the problem.

Original comment by: kaoh

kaoh commented 14 years ago

Cool, any ETA when we'll see the new release?

Original comment by: rabdargab

kaoh commented 14 years ago

I would say in two months. In the SVN there is a branch for this. The new release will be more modular, so the is a separate crypto layer so that the crypto layer could be exchanged. But this is theoretically. The transmission layer is modular so, instead of PC/SC also a socket conenction can be used to send data over the wire.

Some functions in the library have call back function for a progress bar. There will be a time command to measure the execution time of a command.

For an immediate solution for your problem I cannot help. Well, I gues the response is in an unexpected format. Or simply the trace function is broken. So you could try to leave out the enable_trace in the beginning and test it with a new card so that it gets not locked. Or you look into the README and enable the the logging (set GLOBALPLATFORM_DEBUG=1 on the command line and specify an a log fiel with GLOBALPLATFORM_LOGFILE if I remember correctly). Maybe there is more information which can help to solve this issue.

Original comment by: kaoh

kaoh commented 14 years ago

Hi Eric,

Can you test if the bug still exists? You must check out from SVN branches/globalplatform-6.0.0 and compile all three modules, globalplatform, gppcscconnectionplugin, gpshell (./configure --prefx=/usr --enable-debug && make && sudo make install)

I can also provide binaries and Debian/Ubuntu packages.

Not tried under windows, I'm just doing this as next step.

Thanks, Karsten

Original comment by: kaoh

kaoh commented 14 years ago

This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker).

Original comment by: sf-robot