Re: Cyberflex
Tommaso Cucinotta <[email protected]>
| Newsgroups | gmane.comp.lib.muscle |
|---|---|
| Message-ID | <[email protected]> |
On 28/02/14 20:49, wully wrote:
> Thank you very much for your support. I would feel great, when the
> nice idea about a true open source implementation of a sc application
> would run here with my Cyberflex eGate 32k Developer (called CF)!
I'm positive it will happen. AFAICR, one of my last experimentations were
made just the eGate 32K :-)!
> What has been achieved up to now: 1) The reader Reiner-SCT is running
> with pcsc-lite. 1a) in /etc/opensc.conf I have inserted
In ancient times in which I was playing with this stuff, I didn't use
opensc at all. However, as far as I am reading, it helped you in installing
the applet on the card, so it's all good.
The relationship among libraries, as I used them long ago, is:
application compiled using musclecard.h API (including libpkcs11.so for MuscleCard)
|
V
libmusclecard.so
|
V
/usr/local/pcsc/services/* or /usr/local/musclecard/services/* or $prefix/pcsc/services/*
(these folders are scanned searching for bundle plugins, matching them based on configured ATR)
|
V
libMuscleCardApplet.so (e.g., in */services/mscMuscleCard.bundle/...
|
V
libpcsclite.so
|
| (FS pipe)
V
pcscd (system daemon handling smart-card readers)
libmusclecard.so can load different plugins, based on the ATR sensed from the card. For example,
if you insert a Cryptoflex, there's a plugin detecting it and using the plugin that implements
the MuscleCard API on top of it. If you insert a Cyberflex with the MuscleCard Applet on board,
you get the corresponding plugin activated, etc.... this, assuming that those plugins are
correctly installed and available in the system (*/services folder as from above picture).
> 2) the libmusclecard.so (in version 1.3.6) could be built on my
> openSuse 13.1 in 32 and 64 bits each.
Good
> 3) of the muscleframework 1.1.7
> I have built the libraries for pkcs#11 (32 and 64 bit) and for the
> MCardPlugin (only in 64 bit, name musclecardApplet.so).
Ok.
> 4) I have
> loaded the CardEdgeII.ijc into the CF with gpshell 1.4.4
Good.
> 5) setup of the applet by opensc-tool: $ opensc-tool -s
> 00:A4:04:00:06:A0:00:00:00:01:01 -s
> B0:2A:00:00:38:08:4D:75:73:63:6C:65:30:30:04:01:08:30:30:30:30:30:30:30:30:08:30:30:30:30:30:30:30:30:05:02:08:30:30:30:30:30:30:30:30:08:30:30:30:30:30:30:30:30:00:00:17:70:00:02:01
Ok, but AFAICR the musclecardapplet plugin for the muscle framework
actually selects the applet on its own, based on the pre-configured
AID that should be somewhere in the plugin code or config file.
Also, I guess that any attempt to run muscletest and any other muscleframework
app, including XCardII, while running opensc, will fail as the reader has
already been acquired/locked by opensc, so the muscleframework apps won't be
able to use the smart-card.
> EstablishConn returns : Token is unsupported
As explained in my other e-mail, try to modify the ATR in the mscMuscleCardBundle/..../Info.plist
to match the one that is currently being returned by your eGate with the MuscleCardApplet on board.
Perhaps, that will fix the issue.
> Qestion: There is no connection from the musclecardApplet.so to the
> libmusclecard.so. They are just there in /usr/local/lib. How do they
> relate? What steps did I miss?
I hope the explanations above (and the picture) may be helpful in that regard.
Please, let us know whether you sort this out, or you have further problems, we can try to debug more thoroughly the situation
(pcscd -d should be useful in this regard, to see all the traffic going to/from the SC at the low level).
Bye,
T.