Are you sure you are using Windows?
Anyway, if you don't use Windows, I will be happy if you send your
test program so I can reproduce it my-self easily.

Alon.

On 2/13/09, Roman Himmes <him...@idev.de> wrote:
> Hi,
>
>  I  have now the debug log you requested. The debug outputs are zipped into
> a file that I attached to this mail.
>
>  If I start my small test program for the first time:
>
>         Running 1 test case...
>         0 OpenSC Card (test)              OpenSC Project
> PKCS #15 SCard  265350031606     265350031606            1 OpenSC Card
> (test2)             OpenSC Project                  PKCS #15 SCard
> 265350031606      265350031606            Updating SLOT 0
>         Opening session on SLOT 0
>         Set data on SLOT 0
>         Updating data on SLOT 0
>         count = 1
>         Updating private data ...
>         count = 1
>         count = 1
>         Delete data on SLOT 0
>         count = 1
>         Updating SLOT 1
>         Opening session on SLOT 1
>         Set data on SLOT 1
>         LOGMSG: 2009.02.13 13:04:20.848(UTC)    7 crypto_token.cpp
>            272 t:20187 Error in C_CreateObject (error code: 5)
>         unknown location(0): fatal error in "simple_test":
> std::runtime_error: failed to create an object
>         crypto_token_test.cpp(71): last checkpoint
>
>  When I start it for the second time
>
>         Running 1 test case...
>         0 OpenSC Card (test)              OpenSC Project
> PKCS #15 SCard  265350031606    265350031606            1 OpenSC Card
> (test2)             OpenSC Project                  PKCS #15 SCard
> 265350031606 265350031606            Updating SLOT 0
>         Opening session on SLOT 0
>         Set data on SLOT 0
>         [opensc-pkcs11] card-cardos.c:255:cardos_check_sw:
> required access right not granted
>         [opensc-pkcs11]
> iso7816.c:290:iso7816_update_binary: Card returned error:
> Security status not satisfied
>         [opensc-pkcs11] card.c:514:sc_update_binary: returning with:
> Security status not satisfied
>         [opensc-pkcs11] card.c:499:sc_update_binary: sc_update_binary()
> failed: Security status not satisfied
>         LOGMSG: 2009.02.13 13:04:28.555(UTC)    7 crypto_token.cpp
>            272 t:20188 Error in C_CreateObject (error code: 257)
>
>
>  So I cannot even access the Data on Slot0 again.
>
>  Greetings,
>
>  Roman
>
>
>
>
>
>
>  Am 12.02.2009 um 14:29 schrieb Alon Bar-Lev:
>
>
> > Should not happen.
> > Please provide debug log.
> >
> > Alon
> >
> > On 2/12/09, Roman Himmes <him...@idev.de> wrote:
> >
> > > Hello,
> > >
> > > the applciation I write has to store data on different parts of a
> > > crypto token protected by different pins.
> > > I discovered that I have to  reload the  opensc-pkcs11.dll when trying
> > > to access the slot protected with the other pin.
> > >
> > > In my testcase I initialized a token with
> > >
> > > pkcs15-init -E -C --no-so-pin
> > > pkcs15-init -P --auth 01 -label test
> > > pkcs15-init -P --auth 02 -label tset
> > >
> > > And wrote a test application that tries to create some data objects on
> > > PIN1 (slot0) and PIN2 (slot1) without unloading the dll first ( but
> > > still calling C_Logout, C_CloseSession and C_Finalize) the attempt to
> > > create data on slot1 failed with a CKR_GENERAL_ERROR.
> > >
> > > If I run the same application a second time on the same crypto token,
> > > I  even cannot create/access the data on slot1 and get an
> > > CKR_USER_NOT_LOGGED_IN error, even though I logged in and C_Login()
> > > returns CKR_OK.
> > >
> > > I use an Aladdin eToken 32k on a Windows Vista (64bit) using the
> > > opensc-pkcs11.dll from the latest build opensc-i686-mingw32-002-
> > > base.tar.bz2
> > >
> > > With unloading the DLL I can switch the token slots and create as much
> > > data object as I like ( as long as there is space left on the token ).
> > >
> > > Is there a way accessing the data on different PINs without unloading
> > > the DLL before?
> > >
> > > Greetings,
> > >
> > >
> > > Roman Himmes
> > > _______________________________________________
> > > opensc-devel mailing list
> > > opensc-devel@lists.opensc-project.org
> > >
> http://www.opensc-project.org/mailman/listinfo/opensc-devel
> > >
> > >
> >
> >
>
>  --
>
>  Roman Himmes
>  Softwareentwicklung
>
>  iDev GmbH
>  Spichernstr. 73
>  50672 Köln
>
>  Tel: +49 221 5000941
>  Fax: +49 221 5000943
>
>  E-Mail:   him...@idev.de
>  WWW:    www.idev.de
>
>  AG Köln HRB 58720
>  Geschäftsführung: Michael Mertens
>
>
>
>
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to