From 89888f9f230c98bde926e849d5e42ed92da10c0d Mon Sep 17 00:00:00 2001 From: tkellner Date: Fri, 2 Sep 2011 16:01:17 +0000 Subject: 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 --- .../gv/egiz/bku/gui/html/RestrictedImageView.java | 29 +- .../java/at/gv/egiz/bku/gui/viewer/MimeTypes.java | 8 +- .../test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java | 61 +- .../test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java | 155 ++-- .../local/spring/SMCCConfigurationFactoryBean.java | 2 +- .../stal/service/impl/STALXJAXBContextFactory.java | 11 +- BKUOnline/src/test/resources/appletTest.html | 1 + .../java/at/gv/egiz/bku/webstart/Container.java | 26 +- .../egiz/stal/service/GetHashDataInputFault.java | 5 + .../bku/accesscontroller/CommandParamChecker.java | 14 +- .../bku/accesscontroller/InfoboxParamChecker.java | 2 +- .../bku/binding/BindingProcessorManagerImpl.java | 4 +- .../main/java/at/gv/egiz/bku/binding/HttpUtil.java | 2 +- .../at/gv/egiz/bku/conf/IAIKLogAdapterFactory.java | 2 +- .../slcommands/impl/xsect/SignatureLocation.java | 3 +- .../gv/egiz/bku/spring/PKIProfileFactoryBean.java | 1 + bkucommon/src/test/java/moaspss/MOASPClient.java | 4 +- .../src/test/java/moaspss/generated/MOAFault.java | 5 + bkucommon/src/test/resources/MOA-SPSS-1.3.xsd | 938 ++++++++++----------- .../main/java/at/gv/egiz/smcc/AbstractISCard.java | 16 +- .../at/gv/egiz/smcc/AbstractSignatureCard.java | 3 +- .../java/at/gv/egiz/smcc/cio/CIODirectoryFile.java | 1 - .../at/gv/egiz/smcc/conf/SMCCConfiguration.java | 2 - smcc/src/test/java/at/gv/egiz/smcc/ESCardTest.java | 17 +- smcc/src/test/java/at/gv/egiz/smcc/FINEIDTest.java | 6 +- .../apache/tomcat/util/http/AcceptLanguage.java | 12 +- 26 files changed, 667 insertions(+), 663 deletions(-) diff --git a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/html/RestrictedImageView.java b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/html/RestrictedImageView.java index 4e1497c9..2b633139 100644 --- a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/html/RestrictedImageView.java +++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/html/RestrictedImageView.java @@ -26,7 +26,6 @@ package at.gv.egiz.bku.gui.html; import javax.swing.text.Element; -import javax.swing.text.html.HTML; import javax.swing.text.html.ImageView; /** @@ -58,18 +57,18 @@ import javax.swing.text.html.ImageView; // return super.getImage(); // } - /** - * check whether this URL corresponds to the data URI scheme - * (and the referenced content is directly included in the document). - * @return - */ - private boolean isDataURI() { - String src = (String)getElement().getAttributes(). - getAttribute(HTML.Attribute.SRC); - if (src == null) { - return false; - } - - return src.toLowerCase().startsWith("data"); - } +// /** +// * check whether this URL corresponds to the data URI scheme +// * (and the referenced content is directly included in the document). +// * @return +// */ +// private boolean isDataURI() { +// String src = (String)getElement().getAttributes(). +// getAttribute(HTML.Attribute.SRC); +// if (src == null) { +// return false; +// } +// +// return src.toLowerCase().startsWith("data"); +// } } \ No newline at end of file diff --git a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/viewer/MimeTypes.java b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/viewer/MimeTypes.java index b1661f41..17316602 100644 --- a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/viewer/MimeTypes.java +++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/viewer/MimeTypes.java @@ -34,7 +34,9 @@ import java.util.Map; */ public class MimeTypes { - private static final Map FILE_EXTENSIONS = new HashMap() {{ + private static final Map FILE_EXTENSIONS = new HashMap() { + private static final long serialVersionUID = 1L; +{ put("application/msword", ".doc"); put("application/octet-stream", ".bin"); put("application/pdf", ".pdf"); @@ -44,7 +46,9 @@ public class MimeTypes { put("text/xml", ".xml"); }}; - private static final Map DESCRIPTIONS = new HashMap() {{ + private static final Map DESCRIPTIONS = new HashMap() { + private static final long serialVersionUID = 1L; +{ put("application/msword", "mimetype.desc.doc"); put("application/octet-stream", "mimetype.desc.bin"); put("application/pdf", "mimetype.desc.pdf"); diff --git a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java index 824c1219..36e5ea0d 100644 --- a/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java +++ b/BKUCommonGUI/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java @@ -49,7 +49,7 @@ public class BKUGUIWorker implements Runnable { try { final PinInfo signPinSpec = new SimplePinInfo(6, 10, "[0-9]", "Test-PIN", (byte) 0x81, null, PinInfo.UNKNOWN_RETRIES); - final PinInfo cardPinSpec = new SimplePinInfo(4, 4, "[0-9]", "Test-PIN", (byte) 0x01, null, PinInfo.UNKNOWN_RETRIES); +// final PinInfo cardPinSpec = new SimplePinInfo(4, 4, "[0-9]", "Test-PIN", (byte) 0x01, null, PinInfo.UNKNOWN_RETRIES); final ActionListener cancelListener = new ActionListener() { @@ -58,13 +58,13 @@ public class BKUGUIWorker implements Runnable { System.out.println("CANCEL EVENT OCCURED: " + e); } }; - ActionListener okListener = new ActionListener() { - - @Override - public void actionPerformed(ActionEvent e) { - System.out.println("OK EVENT OCCURED: " + e); - } - }; +// ActionListener okListener = new ActionListener() { +// +// @Override +// public void actionPerformed(ActionEvent e) { +// System.out.println("OK EVENT OCCURED: " + e); +// } +// }; final ActionListener signListener = new ActionListener() { public void actionPerformed(ActionEvent e) { @@ -89,29 +89,28 @@ public class BKUGUIWorker implements Runnable { "UTF-8", "file.txt"); - HashDataInput signedRef2 = new ByteArrayHashDataInput( - "HashDataInput_002".getBytes(), - "ref-id-000000002", - "application/xhtml+xml", - "UTF-8", - "file.xhtml"); - - HashDataInput signedRef3 = new ByteArrayHashDataInput( - "HashDataInput_003".getBytes(), - "ref-id-000000003", - "application/xhtml+xml", - "UTF-8", - "file2.xhtml"); - - HashDataInput signedRef4 = new ByteArrayHashDataInput( - "HashDataInput_004".getBytes(), - "ref-id-000000004", - "text/xml", - "UTF-8", - "file.xml"); - - // - List signedRefs = new ArrayList(); +// HashDataInput signedRef2 = new ByteArrayHashDataInput( +// "HashDataInput_002".getBytes(), +// "ref-id-000000002", +// "application/xhtml+xml", +// "UTF-8", +// "file.xhtml"); +// +// HashDataInput signedRef3 = new ByteArrayHashDataInput( +// "HashDataInput_003".getBytes(), +// "ref-id-000000003", +// "application/xhtml+xml", +// "UTF-8", +// "file2.xhtml"); +// +// HashDataInput signedRef4 = new ByteArrayHashDataInput( +// "HashDataInput_004".getBytes(), +// "ref-id-000000004", +// "text/xml", +// "UTF-8", +// "file.xml"); + + List signedRefs = new ArrayList(); signedRefs.add(signedRef1); // signedRefs.add(signedRef2); // signedRefs.add(signedRef3); diff --git a/BKUGuiExt/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java b/BKUGuiExt/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java index cb4ed754..2d885faa 100644 --- a/BKUGuiExt/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java +++ b/BKUGuiExt/src/test/java/at/gv/egiz/bku/gui/BKUGUIWorker.java @@ -24,13 +24,6 @@ package at.gv.egiz.bku.gui; -import at.gv.egiz.smcc.PinInfo; -import at.gv.egiz.stal.HashDataInput; -import at.gv.egiz.stal.impl.ByteArrayHashDataInput; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.util.ArrayList; -import java.util.List; /** * @@ -48,81 +41,81 @@ public class BKUGUIWorker implements Runnable { public void run() { try { - final PinInfo signPinSpec = new SimplePinInfo(6, 10, "[0-9]", "Signatur-PIN", (byte)0x00, null, PinInfo.UNKNOWN_RETRIES); - - - final ActionListener cancelListener = new ActionListener() { - - public void actionPerformed(ActionEvent e) { - System.out.println("CANCEL EVENT OCCURED: " + e); - } - }; - ActionListener okListener = new ActionListener() { - - @Override - public void actionPerformed(ActionEvent e) { - System.out.println("OK EVENT OCCURED: " + e); - } - }; - final ActionListener signListener = new ActionListener() { - - public void actionPerformed(ActionEvent e) { - System.out.println("SIGN EVENT OCCURED: " + e); - } - }; - ActionListener hashdataListener = new ActionListener() { - - public void actionPerformed(ActionEvent e) { - System.out.println("HASHDATA EVENT OCCURED: " + e); - ActionListener returnListener = new ActionListener() { - - @Override - public void actionPerformed(ActionEvent e) { - gui.showSignaturePINDialog(signPinSpec, -1, signListener, "sign", cancelListener, "cancel", null, "hashdata"); - } - }; - HashDataInput signedRef1 = new ByteArrayHashDataInput( - "Ich bin ein einfacher Text mit Umlauten: öäüßéç@€\n123\n456\n\tHello, world!\n\nlkjsd\nnksdjf".getBytes(), - "ref-id-0000000000000000000000001", - "text/plain", - "UTF-8", - "filename.txt"); - - HashDataInput signedRef2 = new ByteArrayHashDataInput( - "HashDataInput_002".getBytes(), - "ref-id-000000002", - "application/xhtml+xml", - "UTF-8", - "filename.xhtml"); - - HashDataInput signedRef3 = new ByteArrayHashDataInput( - "HashDataInput_003".getBytes(), - "ref-id-000000003", - "application/xhtml+xml", - "UTF-8", - "filename.xhtml"); - - HashDataInput signedRef4 = new ByteArrayHashDataInput( - "HashDataInput_004".getBytes(), - "ref-id-000000004", - "text/xml", - "UTF-8", - "filename.xml"); - - // - List signedRefs = new ArrayList(); - signedRefs.add(signedRef1); - signedRefs.add(signedRef2); - signedRefs.add(signedRef3); - signedRefs.add(signedRef4); -// signedRefs.add(signedRef4); -// signedRefs.add(signedRef4); -// signedRefs.add(signedRef4); +// final PinInfo signPinSpec = new SimplePinInfo(6, 10, "[0-9]", "Signatur-PIN", (byte)0x00, null, PinInfo.UNKNOWN_RETRIES); + + +// final ActionListener cancelListener = new ActionListener() { +// +// public void actionPerformed(ActionEvent e) { +// System.out.println("CANCEL EVENT OCCURED: " + e); +// } +// }; +// ActionListener okListener = new ActionListener() { +// +// @Override +// public void actionPerformed(ActionEvent e) { +// System.out.println("OK EVENT OCCURED: " + e); +// } +// }; +// final ActionListener signListener = new ActionListener() { +// +// public void actionPerformed(ActionEvent e) { +// System.out.println("SIGN EVENT OCCURED: " + e); +// } +// }; +// ActionListener hashdataListener = new ActionListener() { +// +// public void actionPerformed(ActionEvent e) { +// System.out.println("HASHDATA EVENT OCCURED: " + e); +// ActionListener returnListener = new ActionListener() { +// +// @Override +// public void actionPerformed(ActionEvent e) { +// gui.showSignaturePINDialog(signPinSpec, -1, signListener, "sign", cancelListener, "cancel", null, "hashdata"); +// } +// }; +// HashDataInput signedRef1 = new ByteArrayHashDataInput( +// "Ich bin ein einfacher Text mit Umlauten: öäüßéç@€\n123\n456\n\tHello, world!\n\nlkjsd\nnksdjf".getBytes(), +// "ref-id-0000000000000000000000001", +// "text/plain", +// "UTF-8", +// "filename.txt"); +// +// HashDataInput signedRef2 = new ByteArrayHashDataInput( +// "HashDataInput_002".getBytes(), +// "ref-id-000000002", +// "application/xhtml+xml", +// "UTF-8", +// "filename.xhtml"); +// +// HashDataInput signedRef3 = new ByteArrayHashDataInput( +// "HashDataInput_003".getBytes(), +// "ref-id-000000003", +// "application/xhtml+xml", +// "UTF-8", +// "filename.xhtml"); +// +// HashDataInput signedRef4 = new ByteArrayHashDataInput( +// "HashDataInput_004".getBytes(), +// "ref-id-000000004", +// "text/xml", +// "UTF-8", +// "filename.xml"); +// +// // +// List signedRefs = new ArrayList(); +// signedRefs.add(signedRef1); +// signedRefs.add(signedRef2); +// signedRefs.add(signedRef3); // signedRefs.add(signedRef4); -// signedRefs = Collections.singletonList(signedRef1); - gui.showSecureViewer(signedRefs, returnListener, "return"); - } - }; +//// signedRefs.add(signedRef4); +//// signedRefs.add(signedRef4); +//// signedRefs.add(signedRef4); +//// signedRefs.add(signedRef4); +//// signedRefs = Collections.singletonList(signedRef1); +// gui.showSecureViewer(signedRefs, returnListener, "return"); +// } +// }; diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/spring/SMCCConfigurationFactoryBean.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/spring/SMCCConfigurationFactoryBean.java index 2fdecd20..2098af93 100644 --- a/BKULocal/src/main/java/at/gv/egiz/bku/local/spring/SMCCConfigurationFactoryBean.java +++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/spring/SMCCConfigurationFactoryBean.java @@ -64,7 +64,7 @@ public class SMCCConfigurationFactoryBean implements FactoryBean { } @Override - public Class getObjectType() { + public Class getObjectType() { return SMCCConfiguration.class; } diff --git a/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALXJAXBContextFactory.java b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALXJAXBContextFactory.java index b7f5727f..298a302a 100644 --- a/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALXJAXBContextFactory.java +++ b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALXJAXBContextFactory.java @@ -24,6 +24,8 @@ package at.gv.egiz.stal.service.impl; +import at.buergerkarte.namespaces.cardchannel.service.ObjectFactory; + import com.sun.xml.bind.api.JAXBRIContext; import com.sun.xml.bind.api.TypeReference; import com.sun.xml.ws.api.model.SEIModel; @@ -43,19 +45,20 @@ public class STALXJAXBContextFactory implements JAXBContextFactory { private final Logger log = LoggerFactory.getLogger(STALXJAXBContextFactory.class); @Override - public JAXBRIContext createJAXBContext(SEIModel sei, List classesToBind, List typeReferences) throws JAXBException { + public JAXBRIContext createJAXBContext(SEIModel sei, @SuppressWarnings("rawtypes") List classesToBind, List typeReferences) throws JAXBException { if (log.isTraceEnabled()) { log.trace("JAXBContext seed for SEI " + sei.getTargetNamespace() + ":"); - for (Class class1 : classesToBind) { + for (Class class1 : classesToBind) { log.trace(" " + class1); } for (TypeReference typeReference : typeReferences) { log.trace(" typeRef " + typeReference.tagName + " -> " + typeReference.type); } } - List classes = new ArrayList(); + @SuppressWarnings("rawtypes") + List classes = new ArrayList(); classes.addAll(classesToBind); - Class ccOF = at.buergerkarte.namespaces.cardchannel.service.ObjectFactory.class; + Class ccOF = ObjectFactory.class; if (!classes.contains(ccOF)) { log.debug("adding " + ccOF + " to JAXBContext seed"); classes.add(ccOF); diff --git a/BKUOnline/src/test/resources/appletTest.html b/BKUOnline/src/test/resources/appletTest.html index 4f8f1073..a221476e 100644 --- a/BKUOnline/src/test/resources/appletTest.html +++ b/BKUOnline/src/test/resources/appletTest.html @@ -1,3 +1,4 @@ + - - - - - - - - - - - - - - - - - - Ermöglichung der Stapelsignatur durch wiederholte Angabe dieses Elements - - - - - - - - - - - - - - - - - - - Auswahl: Entweder explizite Angabe des Signaturorts sowie ggf. sinnvoller Supplements im Zshg. mit der Signaturumgebung, oder Verweis auf ein benanntes Profil - - - - - - - - - - - - - - - - - - Kardinalität 1..oo erlaubt die Antwort auf eine Stapelsignatur-Anfrage - - - - Resultat, falls die Signaturerstellung erfolgreich war - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - mit diesem Profil wird eine Menge von vertrauenswürdigen Wurzelzertifikaten spezifiziert - - - - - - - - - - - only ds:X509Data and RetrievalMethod is supported; QualifiedCertificate is included as X509Data/any;publicAuthority is included as X509Data/any - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Pro dsig:Reference-Element in der zu überprüfenden XML-Signatur muss hier ein ReferenceInfo-Element erscheinen. Die Reihenfolge der einzelnen ReferenceInfo Elemente entspricht jener der dsig:Reference Elemente in der XML-Signatur. - - - - - - - - - - mit diesem Profil wird eine Menge von vertrauenswürdigen Wurzelzertifikaten spezifiziert - - - - - - - - - - - only ds:X509Data and ds:RetrievalMethod is supported; QualifiedCertificate is included as X509Data/any; PublicAuthority is included as X509Data/any - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Auswahl: Entweder explizite Angabe EINER Transformationskette inklusive ggf. sinnvoller Supplements oder Verweis auf ein benanntes Profil - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Resultat, falls die Signaturerstellung gescheitert ist - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Ein oder mehrere Transformationswege können von der Applikation an MOA mitgeteilt werden. Die zu prüfende Signatur hat zumindest einem dieser Transformationswege zu entsprechen. Die Angabe kann explizit oder als Profilbezeichner erfolgen. - - - - - Profilbezeichner für einen Transformationsweg - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Die Angabe des Transformationsparameters (explizit oder als Hashwert) kann unterlassen werden, wenn die Applikation von der Unveränderlichkeit des Inhalts der in "Transformationsparamter", Attribut "URI" angegebenen URI ausgehen kann. - - - - Der Transformationsparameter explizit angegeben. - - - - - Der Hashwert des Transformationsparameters. - - - - - - - - - - - - - - - - - - - - - - Explizite Angabe des Transformationswegs - - - - - - - Alle impliziten Transformationsparameter, die zum Durchlaufen der oben angeführten Transformationskette bekannt sein müssen, müssen hier angeführt werden. Das Attribut "URI" bezeichnet den Transformationsparameter in exakt jener Weise, wie er in der zu überprüfenden Signatur gebraucht wird. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + Ermöglichung der Stapelsignatur durch wiederholte Angabe dieses Elements + + + + + + + + + + + + + + + + + + + Auswahl: Entweder explizite Angabe des Signaturorts sowie ggf. sinnvoller Supplements im Zshg. mit der Signaturumgebung, oder Verweis auf ein benanntes Profil + + + + + + + + + + + + + + + + + + Kardinalität 1..oo erlaubt die Antwort auf eine Stapelsignatur-Anfrage + + + + Resultat, falls die Signaturerstellung erfolgreich war + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mit diesem Profil wird eine Menge von vertrauenswürdigen Wurzelzertifikaten spezifiziert + + + + + + + + + + + only ds:X509Data and RetrievalMethod is supported; QualifiedCertificate is included as X509Data/any;publicAuthority is included as X509Data/any + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Pro dsig:Reference-Element in der zu überprüfenden XML-Signatur muss hier ein ReferenceInfo-Element erscheinen. Die Reihenfolge der einzelnen ReferenceInfo Elemente entspricht jener der dsig:Reference Elemente in der XML-Signatur. + + + + + + + + + + mit diesem Profil wird eine Menge von vertrauenswürdigen Wurzelzertifikaten spezifiziert + + + + + + + + + + + only ds:X509Data and ds:RetrievalMethod is supported; QualifiedCertificate is included as X509Data/any; PublicAuthority is included as X509Data/any + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Auswahl: Entweder explizite Angabe EINER Transformationskette inklusive ggf. sinnvoller Supplements oder Verweis auf ein benanntes Profil + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Resultat, falls die Signaturerstellung gescheitert ist + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Ein oder mehrere Transformationswege können von der Applikation an MOA mitgeteilt werden. Die zu prüfende Signatur hat zumindest einem dieser Transformationswege zu entsprechen. Die Angabe kann explizit oder als Profilbezeichner erfolgen. + + + + + Profilbezeichner für einen Transformationsweg + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Die Angabe des Transformationsparameters (explizit oder als Hashwert) kann unterlassen werden, wenn die Applikation von der Unveränderlichkeit des Inhalts der in "Transformationsparamter", Attribut "URI" angegebenen URI ausgehen kann. + + + + Der Transformationsparameter explizit angegeben. + + + + + Der Hashwert des Transformationsparameters. + + + + + + + + + + + + + + + + + + + + + + Explizite Angabe des Transformationswegs + + + + + + + Alle impliziten Transformationsparameter, die zum Durchlaufen der oben angeführten Transformationskette bekannt sein müssen, müssen hier angeführt werden. Das Attribut "URI" bezeichnet den Transformationsparameter in exakt jener Weise, wie er in der zu überprüfenden Signatur gebraucht wird. + + + + + + + + + + + + + + + + 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, diff --git a/utils/src/main/java/at/gv/egiz/org/apache/tomcat/util/http/AcceptLanguage.java b/utils/src/main/java/at/gv/egiz/org/apache/tomcat/util/http/AcceptLanguage.java index 9cf8a003..d39ce675 100644 --- a/utils/src/main/java/at/gv/egiz/org/apache/tomcat/util/http/AcceptLanguage.java +++ b/utils/src/main/java/at/gv/egiz/org/apache/tomcat/util/http/AcceptLanguage.java @@ -60,7 +60,7 @@ public class AcceptLanguage { return (Locale)l.elementAt(0); } - public static Enumeration getLocales(String acceptLanguage) { + public static Enumeration getLocales(String acceptLanguage) { // Short circuit with an empty enumeration if null header if (acceptLanguage == null) { Vector v = new Vector(); @@ -132,15 +132,15 @@ public class AcceptLanguage { } } - private static void extractLocales(Hashtable languages, Vector q, + private static void extractLocales(Hashtable> languages, Vector q, Vector l) { // XXX We will need to order by q value Vector in the Future ? - Enumeration e = q.elements(); + Enumeration e = q.elements(); while (e.hasMoreElements()) { - Vector v = - (Vector)languages.get(((Double)e.nextElement()).toString()); - Enumeration le = v.elements(); + Vector v = + (Vector)languages.get(((Double)e.nextElement()).toString()); + Enumeration le = v.elements(); while (le.hasMoreElements()) { String language = (String)le.nextElement(); String country = ""; -- cgit v1.2.3