Hi Ludovic, I don't have the source code of pcsc-lite from solaris, only binaries. I will repack the opensc with these change for solaris...
Thanks for all, -- Marc Rios Vallès [email protected] C3PO, S.A. http://www.c3po.es C/ Alejandro Goicoechea, 6 Local 9 - 08960 St. Just Desvern, Barcelona Tel. 93 417 99 55 - Fax 93 253 12 80 On Mon, 2009-02-02 at 20:58 +0100, Ludovic Rousseau wrote: > 2009/2/2 Marc Rios Valles <[email protected]>: > > Hi to everybody, > > Hello, > > > I have been working these days with opensc 0.11.6 and Solaris 10 11/06 > > with pcsc-lite version 1.1 from solaris[1]. > > > > I am working with a card that works with trusted channel and I have > > found strange things with the sc_reset() and pcsc_reconnect() functions. > > The reader I am working with is the SunRay 270 internal Reader. I don't > > know if it works same mode in other readers. > > > > The fact is that when I make and sc_reset, which calls to pcsc_reconnect > > which executes the following line: > > > > pcsc-reader.c:490 rv = priv->gpriv->SCardReconnect(pslot->pcsc_card, > > priv->gpriv->connect_exclusive ? > > SCARD_SHARE_EXCLUSIVE : SCARD_SHARE_SHARED, > > SCARD_PROTOCOL_ANY, reset ? > > SCARD_UNPOWER_CARD : SCARD_LEAVE_CARD, &active_proto); > > > > > > The pcsc daemon says that has send a reset and it seems to receive ATR > > correctly, but the card is not reset. How can it be? > > > > If I where in trusted channel, I execute sc_reset and I send a > > non-ciphered apdu the card returns me an error saying that the apdu must > > be ciphered when It should accept non-ciphered because of the reset. > > > > I have been trying and if I change the code to this: > > > > pcsc-reader.c:490 rv = priv->gpriv->SCardReconnect(pslot->pcsc_card, > > priv->gpriv->connect_exclusive ? > > SCARD_SHARE_EXCLUSIVE : SCARD_SHARE_SHARED, > > SCARD_PROTOCOL_ANY, reset ? > > SCARD_RESET_CARD : SCARD_LEAVE_CARD, &active_proto); > > > > It works perfect. What do you thing about? The code should look like > > this? Maybe we can put a macro detecting Solaris... > > You only changed SCARD_UNPOWER_CARD by SCARD_RESET_CARD? > It looks like a bug in Solaris pcsc-lite or the SunRay reader driver. > > If the pcsc-lite you are using is from the source code at [1] (Solaris > branch) then pcsc-lite looks OK. > if (SCARD_RESET_CARD == dwInitialization) > rv = IFDPowerICC(rContext, IFD_RESET, > rContext->readerState->cardAtr, > &rContext->readerState->cardAtrLength); > else > { > rv = IFDPowerICC(rContext, IFD_POWER_DOWN, > rContext->readerState->cardAtr, > &rContext->readerState->cardAtrLength); > rv = IFDPowerICC(rContext, IFD_POWER_UP, > rContext->readerState->cardAtr, > &rContext->readerState->cardAtrLength); > } > > Do you have the same problem with a normal reader on a Linux system? > > Bye > > [1] > http://svn.debian.org/viewsvn/pcsclite/branches/Solaris/src/winscard.c?rev=2989&view=markup > _______________________________________________ opensc-devel mailing list [email protected] http://www.opensc-project.org/mailman/listinfo/opensc-devel
