diff options
author | tkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2014-01-07 17:27:03 +0000 |
---|---|---|
committer | tkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2014-01-07 17:27:03 +0000 |
commit | 37be39f59c728cdcbdc60e6a10b04d59443fc98f (patch) | |
tree | a64fbcd50c535e636f3cf78d3fe7967da5822845 /smcc/src/main | |
parent | ef000b5d2cc1b695f34e07b67b5c580a36608454 (diff) | |
download | mocca-37be39f59c728cdcbdc60e6a10b04d59443fc98f.tar.gz mocca-37be39f59c728cdcbdc60e6a10b04d59443fc98f.tar.bz2 mocca-37be39f59c728cdcbdc60e6a10b04d59443fc98f.zip |
Move linux library detection
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1275 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'smcc/src/main')
-rw-r--r-- | smcc/src/main/java/at/gv/egiz/smcc/util/SMCCHelper.java | 26 |
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 |