Package: openjdk-11 / 11.0.4+11-1~deb10u1

libpcsclite-dlopen.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Index: b/src/java.smartcardio/unix/classes/sun/security/smartcardio/PlatformPCSC.java
===================================================================
--- a/src/java.smartcardio/unix/classes/sun/security/smartcardio/PlatformPCSC.java
+++ b/src/java.smartcardio/unix/classes/sun/security/smartcardio/PlatformPCSC.java
@@ -48,6 +48,7 @@ class PlatformPCSC {
 
     private final static String PROP_NAME = "sun.security.smartcardio.library";
 
+    private final static String LIB0 = "libpcsclite.so.1";
     private final static String LIB1 = "/usr/$LIBISA/libpcsclite.so";
     private final static String LIB2 = "/usr/local/$LIBISA/libpcsclite.so";
     private final static String PCSC_FRAMEWORK = "/System/Library/Frameworks/PCSC.framework/Versions/Current/PCSC";
@@ -104,22 +105,9 @@ class PlatformPCSC {
         if (lib.length() != 0) {
             return lib;
         }
-        lib = expand(LIB1);
-        if (new File(lib).isFile()) {
-            // if LIB1 exists, use that
-            return lib;
-        }
-        lib = expand(LIB2);
-        if (new File(lib).isFile()) {
-            // if LIB2 exists, use that
-            return lib;
-        }
-        lib = PCSC_FRAMEWORK;
-        if (new File(lib).isFile()) {
-            // if PCSC.framework exists, use that
-            return lib;
-        }
-        throw new IOException("No PC/SC library found on this system");
+	// let dlopen do the work
+	lib = LIB0;
+	return lib;
     }
 
     private static native void initialize(String libraryName);