summaryrefslogtreecommitdiff
path: root/smcc/src/main/java/at/gv/egiz/smcc/ccid/ReaderFactory.java
diff options
context:
space:
mode:
authorclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2010-01-05 10:06:43 +0000
committerclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2010-01-05 10:06:43 +0000
commitecc11bdb13ae27385486ad1c944ee01ffd0440e7 (patch)
treea3455fcf715ce761493317d81c3ca71cddc87635 /smcc/src/main/java/at/gv/egiz/smcc/ccid/ReaderFactory.java
parent992b3f1b54dca5d09167b1861541055f68311a4f (diff)
downloadmocca-ecc11bdb13ae27385486ad1c944ee01ffd0440e7.tar.gz
mocca-ecc11bdb13ae27385486ad1c944ee01ffd0440e7.tar.bz2
mocca-ecc11bdb13ae27385486ad1c944ee01ffd0440e7.zip
Features
[#437] Handle pinpad [64:03] response apdu correctly [#445] pin entry feedback for VERIFY_PIN_START/FINISH [#471] Provide SecureViewer Link before Pinpad PinEntry timeout starts Bugs [#479] PIN Managment Applet allows unmatching new pin and pin confirmation [#480] PIN Management displays blocked PINs as ACTIVE [#486] Not possible to select 3 times in series the same item from signedReferencesList for display in secureViewer [#506] change pin dialog (gui) issues [#508] e-card G3 PIN activation (with TransportPIN) not supported [#509] closing secure viewer window (WINDOW_CLOSING) leaves "signature data is displayed in viewer" dialog in applet git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@564 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'smcc/src/main/java/at/gv/egiz/smcc/ccid/ReaderFactory.java')
-rw-r--r--smcc/src/main/java/at/gv/egiz/smcc/ccid/ReaderFactory.java89
1 files changed, 0 insertions, 89 deletions
diff --git a/smcc/src/main/java/at/gv/egiz/smcc/ccid/ReaderFactory.java b/smcc/src/main/java/at/gv/egiz/smcc/ccid/ReaderFactory.java
deleted file mode 100644
index 43949f42..00000000
--- a/smcc/src/main/java/at/gv/egiz/smcc/ccid/ReaderFactory.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright 2008 Federal Chancellery Austria and
- * Graz University of Technology
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package at.gv.egiz.smcc.ccid;
-
-import at.gv.egiz.smcc.conf.SMCCConfiguration;
-import javax.smartcardio.Card;
-import javax.smartcardio.CardTerminal;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-/**
- *
- * @author Clemens Orthacker <clemens.orthacker@iaik.tugraz.at>
- */
-public class ReaderFactory {
-
- protected final static Log log = LogFactory.getLog(ReaderFactory.class);
-
- protected SMCCConfiguration configuration;
- private static ReaderFactory instance;
-
- private ReaderFactory() {
- }
-
- public static ReaderFactory getInstance() {
- if (instance == null) {
- instance = new ReaderFactory();
- }
- return instance;
- }
-
- /**
- * @param configuration the configuration to set
- */
- public void setConfiguration(SMCCConfiguration configuration) {
- this.configuration = configuration;
- }
-
- public CCID getReader(Card icc, CardTerminal ct) {
- CCID reader;
- String name = ct.getName();
- if (name != null) {
- log.info("creating reader " + name);
- name = name.toLowerCase();
- //ReinerSCT: http://support.reiner-sct.de/downloads/LINUX
- // http://www.linux-club.de/viewtopic.php?f=61&t=101287&start=0
- //old: REINER SCT CyberJack 00 00
- //new (CCID): 0C4B/0300 Reiner-SCT cyberJack pinpad(a) 00 00
- //Mac "Snow Leopard": Reiner-SCT cyberJack pinpad(a) 00 00
- //display: REINER SCT CyberJack 00 00
- if(name.startsWith("gemplus gempc pinpad") || name.startsWith("gemalto gempc pinpad")) {
- reader = new GemplusGemPCPinpad(icc, ct);
- } else if (name.startsWith("omnikey cardman 3621")) {
- reader = new OMNIKEYCardMan3621(icc, ct);
- } else if (name.startsWith("scm spr 532") || name.startsWith("scm microsystems inc. sprx32 usb smart card reader")) {
- reader = new SCMMicrosystemsSPRx32(icc, ct);
- } else if (name.startsWith("cherry smartboard xx44")) {
- reader = new CherrySmartBoardXX44(icc, ct);
- } else {
- log.info("no suitable implementation found, using default");
- reader = new DefaultReader(icc, ct);
- }
- } else {
- reader = new DefaultReader(icc, ct);
- }
-
- if (configuration != null) {
- String disablePinpad = configuration.getProperty(SMCCConfiguration.DISABLE_PINPAD_P);
- log.debug("setting disablePinpad to " + Boolean.parseBoolean(disablePinpad));
- reader.setDisablePinpad(Boolean.parseBoolean(disablePinpad));
- }
- return reader;
- }
-}