Bug #216
closedPCSC fails to load shared library on linux
0%
Description
OpenJDK and apparently Oracle JDK use a flawed mechanism to load libpcsclite.so. The problem is fixed in Debian (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=529339), but at least not in Fedora.
In order to fix this issue, the library paths can be adjusted as it is the case in the Belgian eID Applet (https://code.google.com/p/eid-applet/source/browse/trunk/eid-applet-core/src/main/java/be/fedict/eid/applet/sc/PcscEid.java).
Added by Tobias Wich over 12 years ago
Added by Tobias Wich about 12 years ago
Add code that simulates ld under linux and use it to find pcsclite (fixes #216)
ld uses LD_LIBRARY_PATH, ld.so.cache and fixed base paths to find the library. The SmartcardIO PCSC
implementation only uses the fixed base paths and Java specific load paths. The LinuxLibraryFinder
class finds a library according to the mechanism described in the ld.so(8) man page. In case no
library could be found, an error is raised instead of relying on the SmartcardIO to find the lib
nevertheless.
Add code that simulates ld under linux and use it to find pcsclite (fixes #216)
ld uses LD_LIBRARY_PATH, ld.so.cache and fixed base paths to find the library. The SmartcardIO PCSC
implementation only uses the fixed base paths and Java specific load paths. The LinuxLibraryFinder
class finds a library according to the mechanism described in the ld.so(8) man page. In case no
library could be found, an error is raised instead of relying on the SmartcardIO to find the lib
nevertheless.