← Back to team overview

openjdk team mailing list archive

[Bug 898689] Re: OpenJDK does not find libpcsc, fails silently, causing smartcard applications to fail

 

Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: openjdk-7 (Ubuntu)
       Status: New => Confirmed

-- 
You received this bug notification because you are a member of OpenJDK,
which is subscribed to openjdk-7 in Ubuntu.
https://bugs.launchpad.net/bugs/898689

Title:
  OpenJDK does not find libpcsc, fails silently, causing smartcard
  applications to fail

Status in “openjdk-6” package in Ubuntu:
  Confirmed
Status in “openjdk-7” package in Ubuntu:
  Confirmed

Bug description:
  The current versions of OpenJDK do not correctly find the libpcsc
  native C library, causing them to remove PC/SC support silently. This
  breaks smartcard applications, as javax.smartcardio uses libpcsc to
  interface with smartcard terminals.

  Please see the attached Example.java. It loads the default smartcardio
  terminal factory, and shows the type. Currently, Java JDK supports two
  terminal types[0]: "None" (a dummy type which always says there are no
  terminals) and "PC/SC" (interfaces with PC/SC terminals). The PC/SC
  terminal factory is the default, but if it cannot be loaded, the Java
  library silently falls back to "None".

  Now, on Ubuntu, the library searches for the PC/SC library in /usr/lib
  and /usr/local/lib, but libpcsclite1 installs its library file in
  /lib/libpcsclite.so.1.0.0. Therefore, the JDK library fails to find
  the file, and silently disables smartcard terminal support. To see
  this, compile the attached Example.java normally and run it:

  $ javac Example.java
  $ java Example
  Terminal factory type: None

   A workaround[0] is to set the Java system property
  sun.security.smartcardio.library to the correct location:

  $ javac Example.java
  $ java -Dsun.security.smartcardio.library=/lib/libpcsclite.so.1 Example
  Terminal factory type: PC/SC

  Note: you don't need to have any terminals attached to see this
  result.

  I would like to request the JDK be patched to search for the PCSC
  library in the correct location, namely /lib, so PC/SC applications
  can work out-of-the-box without having to supply system properties
  every time Java is started.

  [0]
  http://docs.oracle.com/javase/6/docs/technotes/guides/security/SunProviders.html#SunPCSCProvider

  ProblemType: Bug
  DistroRelease: Ubuntu 11.10
  Package: openjdk-6-jdk 6b23~pre11-0ubuntu1.11.10
  ProcVersionSignature: Ubuntu 3.0.0-13.22-generic 3.0.6
  Uname: Linux 3.0.0-13-generic x86_64
  ApportVersion: 1.23-0ubuntu4
  Architecture: amd64
  Date: Thu Dec  1 16:20:56 2011
  EcryptfsInUse: Yes
  InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
  ProcEnviron:
   PATH=(custom, no user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: openjdk-6
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/898689/+subscriptions



References