summaryrefslogtreecommitdiff
path: root/smcc/src
diff options
context:
space:
mode:
authortkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2011-09-02 16:01:17 +0000
committertkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2011-09-02 16:01:17 +0000
commit89888f9f230c98bde926e849d5e42ed92da10c0d (patch)
treeac115c56701b57e8b544e0d9628223bb605285eb /smcc/src
parent7b127caba3ddc39a5a70628c831953bb870f4b52 (diff)
downloadmocca-89888f9f230c98bde926e849d5e42ed92da10c0d.tar.gz
mocca-89888f9f230c98bde926e849d5e42ed92da10c0d.tar.bz2
mocca-89888f9f230c98bde926e849d5e42ed92da10c0d.zip
Housekeeping
* Generic types parameterized * SupressWarnings annotations added where parameterization impossible * Unused members commented out * SerialVersionUID added/removed where necessary * Superfluous imports removed * Other small changed to get rid of some compiler/validator warnings git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@976 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'smcc/src')
-rw-r--r--smcc/src/main/java/at/gv/egiz/smcc/AbstractISCard.java16
-rw-r--r--smcc/src/main/java/at/gv/egiz/smcc/AbstractSignatureCard.java3
-rw-r--r--smcc/src/main/java/at/gv/egiz/smcc/cio/CIODirectoryFile.java1
-rw-r--r--smcc/src/main/java/at/gv/egiz/smcc/conf/SMCCConfiguration.java2
-rw-r--r--smcc/src/test/java/at/gv/egiz/smcc/ESCardTest.java17
-rw-r--r--smcc/src/test/java/at/gv/egiz/smcc/FINEIDTest.java6
6 files changed, 20 insertions, 25 deletions
diff --git a/smcc/src/main/java/at/gv/egiz/smcc/AbstractISCard.java b/smcc/src/main/java/at/gv/egiz/smcc/AbstractISCard.java
index 7a1c6a66..82c0e867 100644
--- a/smcc/src/main/java/at/gv/egiz/smcc/AbstractISCard.java
+++ b/smcc/src/main/java/at/gv/egiz/smcc/AbstractISCard.java
@@ -34,15 +34,12 @@ import javax.smartcardio.CardException;
import javax.smartcardio.CommandAPDU;
import javax.smartcardio.ResponseAPDU;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
import at.gv.egiz.smcc.util.TLV;
public abstract class AbstractISCard extends AbstractSignatureCard implements
SignatureCard {
- private final Logger log = LoggerFactory.getLogger(AbstractISCard.class);
+// private final Logger log = LoggerFactory.getLogger(AbstractISCard.class);
protected static final byte[] OID = new byte[] { (byte) 0x30, (byte) 0x21, (byte) 0x30,
(byte) 0x09, (byte) 0x06, (byte) 0x05, (byte) 0x2b,
@@ -148,12 +145,11 @@ public abstract class AbstractISCard extends AbstractSignatureCard implements
"Cannot retrieve enduser certificate.", e);
}
- if (cert == null) {
-
- log.error("Retrieved certificate is null.");
- throw new SignatureCardException(
- "Cannot retrieve enduser certificate.");
- }
+// if (cert == null ) {
+// log.error("Retrieved certificate is null.");
+// throw new SignatureCardException(
+// "Cannot retrieve enduser certificate.");
+// }
return cert;
}
diff --git a/smcc/src/main/java/at/gv/egiz/smcc/AbstractSignatureCard.java b/smcc/src/main/java/at/gv/egiz/smcc/AbstractSignatureCard.java
index cad7ecf0..0104cdb3 100644
--- a/smcc/src/main/java/at/gv/egiz/smcc/AbstractSignatureCard.java
+++ b/smcc/src/main/java/at/gv/egiz/smcc/AbstractSignatureCard.java
@@ -27,7 +27,6 @@ package at.gv.egiz.smcc;
import at.gv.egiz.smcc.reader.CardReader;
import at.gv.egiz.smcc.reader.ReaderFactory;
import java.util.Locale;
-import java.util.ResourceBundle;
import javax.smartcardio.Card;
import javax.smartcardio.CardChannel;
@@ -41,7 +40,7 @@ public abstract class AbstractSignatureCard implements SignatureCard {
private final Logger log = LoggerFactory.getLogger(AbstractSignatureCard.class);
- private Locale locale = Locale.getDefault();
+ protected Locale locale = Locale.getDefault();
private Card card_;
diff --git a/smcc/src/main/java/at/gv/egiz/smcc/cio/CIODirectoryFile.java b/smcc/src/main/java/at/gv/egiz/smcc/cio/CIODirectoryFile.java
index c267fe79..8fc1b099 100644
--- a/smcc/src/main/java/at/gv/egiz/smcc/cio/CIODirectoryFile.java
+++ b/smcc/src/main/java/at/gv/egiz/smcc/cio/CIODirectoryFile.java
@@ -27,7 +27,6 @@ package at.gv.egiz.smcc.cio;
import at.gv.egiz.smcc.SignatureCardException;
import at.gv.egiz.smcc.util.ISO7816Utils;
-import at.gv.egiz.smcc.util.TLVSequence;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
diff --git a/smcc/src/main/java/at/gv/egiz/smcc/conf/SMCCConfiguration.java b/smcc/src/main/java/at/gv/egiz/smcc/conf/SMCCConfiguration.java
index 89027bf0..a1801da5 100644
--- a/smcc/src/main/java/at/gv/egiz/smcc/conf/SMCCConfiguration.java
+++ b/smcc/src/main/java/at/gv/egiz/smcc/conf/SMCCConfiguration.java
@@ -31,8 +31,6 @@ package at.gv.egiz.smcc.conf;
*/
public class SMCCConfiguration {
- private static final long serialVersionUID = 1L;
-
boolean disablePinpad;
/**
diff --git a/smcc/src/test/java/at/gv/egiz/smcc/ESCardTest.java b/smcc/src/test/java/at/gv/egiz/smcc/ESCardTest.java
index 44031e0c..4a357cec 100644
--- a/smcc/src/test/java/at/gv/egiz/smcc/ESCardTest.java
+++ b/smcc/src/test/java/at/gv/egiz/smcc/ESCardTest.java
@@ -33,7 +33,6 @@ import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.io.OutputStream;
import java.math.BigInteger;
import java.nio.ByteBuffer;
import java.security.InvalidAlgorithmParameterException;
@@ -44,13 +43,10 @@ import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.PublicKey;
-import java.security.SignatureException;
-import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;
-import java.security.spec.InvalidKeySpecException;
import java.security.spec.KeySpec;
import java.security.spec.RSAPrivateKeySpec;
import java.security.spec.RSAPublicKeySpec;
@@ -69,14 +65,21 @@ import javax.crypto.NoSuchPaddingException;
import javax.crypto.ShortBufferException;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
-import javax.smartcardio.*;
+import javax.smartcardio.Card;
+import javax.smartcardio.CardChannel;
+import javax.smartcardio.CardException;
+import javax.smartcardio.CardTerminal;
+import javax.smartcardio.CommandAPDU;
+import javax.smartcardio.ResponseAPDU;
+import javax.smartcardio.TerminalFactory;
+
+import org.junit.Ignore;
import at.gv.egiz.smcc.pin.gui.PINGUI;
import at.gv.egiz.smcc.util.SMCCHelper;
-import org.junit.Ignore;
-
@Ignore
+@SuppressWarnings("unused")
public class ESCardTest extends AbstractSignatureCard {
private static final String ROOT_CA_MODULO = "EADEDA455332945039DAA404C8EBC4D3B7F5DC869283CDEA2F101E2AB54FB0D0B03D8F030DAF2458028288F54CE552F8FA57AB2FB103B112427E11131D1D27E10A5B500EAAE5D940301E30EB26C3E9066B257156ED639D70CCC090B863AFBB3BFED8C17BE7673034B9823E977ED657252927F9575B9FFF6691DB64F80B5E92CD";
diff --git a/smcc/src/test/java/at/gv/egiz/smcc/FINEIDTest.java b/smcc/src/test/java/at/gv/egiz/smcc/FINEIDTest.java
index 99e7d46f..f3b2fa39 100644
--- a/smcc/src/test/java/at/gv/egiz/smcc/FINEIDTest.java
+++ b/smcc/src/test/java/at/gv/egiz/smcc/FINEIDTest.java
@@ -81,9 +81,9 @@ public class FINEIDTest extends AbstractSignatureCard {
public void testPIN() {
- PinInfo pinInfo = new PinInfo(6, 8, "[0-9]",
- "at/gv/egiz/smcc/FINEIDCard", "sig.pin", (byte) 0x00,
- new byte[] {}, PinInfo.UNKNOWN_RETRIES);
+// PinInfo pinInfo = new PinInfo(6, 8, "[0-9]",
+// "at/gv/egiz/smcc/FINEIDCard", "sig.pin", (byte) 0x00,
+// new byte[] {}, PinInfo.UNKNOWN_RETRIES);
VerifyAPDUSpec apduSpec = new VerifyAPDUSpec(new byte[] { (byte) 0x00,
(byte) 0x20, (byte) 0x00, (byte)0x82 }, 0,