summaryrefslogtreecommitdiff
path: root/smcc/src/main/java/at
diff options
context:
space:
mode:
Diffstat (limited to 'smcc/src/main/java/at')
-rw-r--r--smcc/src/main/java/at/gv/egiz/smcc/util/SMCCHelper.java26
1 files changed, 13 insertions, 13 deletions
diff --git a/smcc/src/main/java/at/gv/egiz/smcc/util/SMCCHelper.java b/smcc/src/main/java/at/gv/egiz/smcc/util/SMCCHelper.java
index 61bde48c..e4e11ea1 100644
--- a/smcc/src/main/java/at/gv/egiz/smcc/util/SMCCHelper.java
+++ b/smcc/src/main/java/at/gv/egiz/smcc/util/SMCCHelper.java
@@ -57,8 +57,19 @@ public class SMCCHelper {
protected static boolean useSWCard = false;
public SMCCHelper() {
-
- System.setProperty("sun.security.smartcardio.t0GetResponse", "false");
+
+ String osName = System.getProperty("os.name");
+ if (osName.startsWith("Linux")) {
+ File libFile;
+ try {
+ libFile = LinuxLibraryFinder.getLibraryPath("pcsclite", "1");
+ System.setProperty("sun.security.smartcardio.library", libFile.getAbsolutePath());
+ } catch (FileNotFoundException e) {
+ log.error("PC/SC library not found", e);
+ }
+ }
+
+ System.setProperty("sun.security.smartcardio.t0GetResponse", "false");
update();
}
@@ -80,17 +91,6 @@ public class SMCCHelper {
return;
}
- String osName = System.getProperty("os.name");
- if (osName.startsWith("Linux")) {
- File libFile;
- try {
- libFile = LinuxLibraryFinder.getLibraryPath("pcsclite", "1");
- System.setProperty("sun.security.smartcardio.library", libFile.getAbsolutePath());
- } catch (FileNotFoundException e) {
- log.error("PC/SC library not found", e);
- }
- }
-
signatureCard = null;
resultCode = NO_CARD;
// find pcsc support