[opensc-devel] algorithm & flags

2010-04-30 Thread Benoit Ferson
Hi, I am a bit confused by the semantics of SC_ALGORITHM_RSA_* flags and their interpretation by opensc... Could someone give me the right combination of flags for opensc to 1) add the correct SHA1 DigestInfo prefix to a hash to be sent to the card (for a signature operation) and 2) *not* pad the

[opensc-devel] File enumeration

2010-03-31 Thread Benoit Ferson
Hello, Correct me if I'm wrong, but my understanding of the C_FindObjectsInit function in opensc is that it solely relies on the in-memory data structures for the card content, which are built by the PKCS15 operations (either emulated or native) during C_Initialize. In other words, C_FindObjectsIn

Re: [opensc-devel] Integration of a smartcard in opensc

2010-03-10 Thread Benoit Ferson
> > douglas suggested the piv driver, so have a look at that one. > Yes, Our messages have crossed. coolkey or javacardsign are alternatives. but they implement only support > for their applet each, as far as I know. so if you look for a flexible > software that can work with different cards/appl

Re: [opensc-devel] Integration of a smartcard in opensc

2010-03-10 Thread Benoit Ferson
Andreas, Thank you so much for your answer. It definitely helps me. opensc is written for pkcs#15 cards ... OK ; I had missed that (which is why I did not understand the "adherence" of pkcs11-tool to PKCS15). > if you aim for less, you can write a pkcs#15 emulation > driver: it creates all th

[opensc-devel] Integration of a smartcard in opensc

2010-03-10 Thread Benoit Ferson
Hi, Sorry in advance for some of my questions that may sound irrelevant ; I'm a newbie... Here is the context : I am trying to add support to opensc for an applet hosted on a javacard. The applet currently answers to my APDUs correctly, using pcsc-lite. I take inspiration from the card-muscle.c m