Am Montag, 30. Oktober 2006 15:17 schrieb OZER METIN:
> I am trying to use openSC java but I get an exception while trying to add
> opensc provider.
>
> exception:
> org.opensc.pkcs11.wrap.PKCS11Exception: Cannot find function
> C_GetFunctionList in PKCS11 module opensc-PKCS11-0.1.
> at org.opensc.pkcs11.PKCS11Provider.loadPKCS11Module(Native Method)
> at org.opensc.pkcs11.PKCS11Provider.initialize(PKCS11Provider.java:151)
> at org.opensc.pkcs11.PKCS11Provider.<init>(PKCS11Provider.java:188)
>
> My code:
>
> Provider p=null;
> try {
>       p = new org.opensc.pkcs11.PKCS11Provider(configName);
> } catch (IOException e) {
>       e.printStackTrace();
> }
> Security.addProvider(p);

I guess, you are using opensc-java under Win32 and the JVM process is unable 
to resolve all dependent DLLs. Generally, you might either

 1) add the directory, where additional DLLs referenced by your PKCS#11 module 
to the PATH env. variable.

or

 2) Install all additional DLLs referenced by your PKCS#11 module in 
%SystemRoot%

or
 
 3) Set the current working directory the running program to the directory, 
where additional DLLs referenced by your PKCS#11 module are located.

In order to find dependent DLLs, you might use the 'deoends.exe' tool from 
MSVC or an equivalent tool.

The opensc PKCS#11 module depnds BTW in opensc.dll pkcs15init.dll libeay32.dll 
libssl32.dll, which are typically installed in your SCB directory.

Regards,

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

Reply via email to