Re: [opensc-devel] keycache broken between pkcs11 and pkcs15 layers

2010-01-18 Thread Viktor TARASOV
Xiaoshuo Wu wrote:
 On Sun, 17 Jan 2010 20:36:53 +0800, Xiaoshuo Wu xiaos...@ftsafe.com 
 wrote:

 I'd like to hear your plan for these changes so as to help me fix this.
 I recovered cache_pin() in rev 3783, renamed it add_pins_to_keycache() 
 and had some adjustment. When login/change PIN/init PIN/create object 
 successful, we cache the pin. I made a patch for this, please review 
 it, any advices are welcome, thank you.

Afaiu,
there is the tendency to replace the existing global static pin cache 
system (pkcs15init/keycache.c)
with the pin cache as a part of the sc_pkc15_card structure 
(sc_pkcs15_pincache_entry_t *pin_cache[SC_PKCS15_MAX_PINS];).

Your proposal still uses the first one.
As for me, the second one is more preferable.


 Regards, Xiaoshuo

Kind wishes,
Viktor.


 

 ___
 opensc-devel mailing list
 opensc-devel@lists.opensc-project.org
 http://www.opensc-project.org/mailman/listinfo/opensc-devel


-- 
Viktor Tarasov  viktor.tara...@opentrust.com

___
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel


[opensc-devel] Add more functions in libopensc.exports

2010-01-18 Thread François Leblanc

Hello,

I wish to add sc_apdu_log, sc_apdu_get_octets and sc_apdu_set_resp to

libopensc.exports but if I do this compilation fail with :


/usr/bin/ld:.libs/libopensc.ver:216: syntax error in VERSION script
collect2: ld returned 1 exit status

Someone can help me?

I need doing this since I wan't to provide a pcsc drivers in separate dll

for cards minidrivers on windows, and need to formatting apdu for transmit

calls


Regards,

François.



___
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel


Re: [opensc-devel] keycache broken between pkcs11 and pkcs15 layers

2010-01-18 Thread Aktiv Co. Aleksey Samsonov
Hello,

 Xiaoshuo Wu wrote:
 On Sun, 17 Jan 2010 20:36:53 +0800, Xiaoshuo Wu xiaos...@ftsafe.com
 wrote:

 I'd like to hear your plan for these changes so as to help me fix this.
 I recovered cache_pin() in rev 3783, renamed it add_pins_to_keycache()
 and had some adjustment. When login/change PIN/init PIN/create object
 successful, we cache the pin. I made a patch for this, please review
 it, any advices are welcome, thank you.

Please see patch in 
http://www.opensc-project.org/pipermail/opensc-devel/2009-November/012863.html 
for interim measures.

___
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel


Re: [opensc-devel] Add more functions in libopensc.exports

2010-01-18 Thread François Leblanc


On Jan 18, 2010, at 12:28 PM, François Leblanc wrote:
 I wish to add sc_apdu_log, sc_apdu_get_octets and sc_apdu_set_resp to
Why do you want to do that? These are internal functions and should not be 
used outside of libopensc.


 I need doing this since I wan't to provide a pcsc drivers in separate dll
What do you need to change and why the builtin pcsc driver does not work for 
you (or what kind of changes would it need)?


For windows minidrivers to use opensc with standard windows crytographics API I 
need to run opensc with a SCardHandle and ScardContext set by windows and not 
open my own context and handle to the card. To do this I first provide my own 
pcsc driver without connect, disconnect and other I keep mainly transmit 
function. I give the availability to set card handle and so I use my own driver 
with opensc but I need to access to apdu.

If it's not possible, I can add my driver to libopensc and put my code into 
libopensc but anyway I need to add some export function to libopensc.export too 
to give windows access to newly added functions.

It's certainly not clear because it's quite difficult to explain for me in 
english, but if you help me I'll can provide a patch to show why I need so you 
can accept or reject this patch...

François.
___
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel


Re: [opensc-devel] Add more functions in libopensc.exports

2010-01-18 Thread Martin Paljak
Hello François

(Cc added to opensc-devel)
On Jan 18, 2010, at 4:00 PM, François Leblanc wrote:
 On Jan 18, 2010, at 12:28 PM, François Leblanc wrote:
 I wish to add sc_apdu_log, sc_apdu_get_octets and sc_apdu_set_resp to
 Why do you want to do that? These are internal functions and should not be 
 used outside of libopensc.
 
 It's amazing since you can build module for drivers but you can't access
 to data to send to cards ?? I don't understand why to give possibility to
 make modules and not to use them...
The fact that you can have reader plugins is an old concept, since there were 
more API-s back in time, out of which CT-API is old and deprecated and the same 
starts to apply to OpenCT. So yes, there's a code-level thing to write plugins 
but unless justified (and unless it really is a very special interface) it 
should not be encouraged. Having an external plugin for PC/SC would not be 
useful from OpenSC point of view nor would it make sense to 100% duplicate 
reader-pcsc.c.

 I need doing this since I wan't to provide a pcsc drivers in separate dll
 What do you need to change and why the builtin pcsc driver does not work 
 for you (or what kind of changes would it need)?
 
 Martin
 
 Like I've already said, the windows minidrivers to use opensc in standard
 Windows api need to use a channel already opened so I need to give the 
 SCardChannel and SCardContext handles to pcsc driver and to forbidden 
 functions like connect, disconnect, reset, cards
Yes, I understand and that's why I asked what kind of changes would it need to 
use the existing codebase. This also depends on how the minidriver makes use of 
libopensc.

There have been other  incarnations of basecsp plugins and the same issue has 
been (tried to) addressed before. So I believe that with little discussion on 
the list we can find a way to integrate it in libopensc core.


 So I make a dll with it's own pcsc drivers, I can send a patch to show how 
 it's working...
I would prefer to use the codebase present in reader-pcsc.c. But please, do 
sent the patch as well, I might not know what I'm talking about.

Martin.

___
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel


Re: [opensc-devel] [opensc-commits] svn opensc changed[3917] pkcs15init: use pinpad

2010-01-18 Thread Martin Paljak
On Jan 17, 2010, at 11:08 PM, webmas...@opensc-project.org wrote:

 Revision: 3917
 + if (use_pinpad)
 + r = sc_verify(card, type, reference, NULL, 0, NULL);
 + else
 + r = sc_verify(card, type, reference, pinbuf, *pinsize, 
 NULL);
In theory, sc_verify has been deprecated in favor of sc_pin_cmd since r811

___
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel


Re: [opensc-devel] OpenSC-Java required Dll and exe

2010-01-18 Thread Andreas Schwier (ML)
Hi Harry,

to access a PKCS#11 DLL you will just need the opensc-java.jar included
in your classpath and opensc-PKCS11-0.3.dll file in a directory
contained in the PATH environment variable or defined in java.library.path.

The location and name of the PKCS#11 DLL is passed to the PKCS11Provider
constructor.

Andreas

Harry Anuszewski schrieb:
 Hello,

  

 I am just wondering what the minimally required dlls / exe to use
 opensc-java on a Windows 32 bit machine. Without using the Smart Card Bundle
 and just compiling a fresh copy of OpenSC what is needed to be copied to the
 System32 directory to make openSC-java load the provider and work. 

  

 Thank you,

  

 Harry


   
 

 ___
 opensc-devel mailing list
 opensc-devel@lists.opensc-project.org
 http://www.opensc-project.org/mailman/listinfo/opensc-devel

___
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel


Re: [opensc-devel] keycache broken between pkcs11 and pkcs15 layers

2010-01-18 Thread Xiaoshuo Wu
On Mon, 18 Jan 2010 18:55:56 +0800, Aktiv Co. Aleksey Samsonov  
samso...@guardant.ru wrote:

 Please see patch in
 http://www.opensc-project.org/pipermail/opensc-devel/2009-November/012863.html
 for interim measures.
That's more subtle, more preferable, I saw its been partly applied in  
OpenSC, thank you all!

___
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel