From 52ab88e24c79c3c3852aa8345973fdc82baf2754 Mon Sep 17 00:00:00 2001 From: netconomy Date: Fri, 17 Aug 2007 06:28:18 +0000 Subject: deprecated code git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@174 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- .../knowcenter/wag/egov/egiz/TestMultipartMOA.java | 25 -- .../test/at/knowcenter/wag/egov/egiz/TestNeu.java | 313 --------------------- 2 files changed, 338 deletions(-) delete mode 100644 src/test/java/test/at/knowcenter/wag/egov/egiz/TestMultipartMOA.java delete mode 100644 src/test/java/test/at/knowcenter/wag/egov/egiz/TestNeu.java diff --git a/src/test/java/test/at/knowcenter/wag/egov/egiz/TestMultipartMOA.java b/src/test/java/test/at/knowcenter/wag/egov/egiz/TestMultipartMOA.java deleted file mode 100644 index b0204fc..0000000 --- a/src/test/java/test/at/knowcenter/wag/egov/egiz/TestMultipartMOA.java +++ /dev/null @@ -1,25 +0,0 @@ -package test.at.knowcenter.wag.egov.egiz; - -import java.io.IOException; - -import org.apache.commons.httpclient.HttpException; - -import test.at.knowcenter.wag.egov.egiz.detached.BKUPostConnection; - -public class TestMultipartMOA -{ - - /** - * @param args - * @throws IOException - * @throws HttpException - */ - public static void main(String[] args) throws HttpException, IOException - { - String MOA_URL = "http://127.0.0.1:18080/moa-spss/services/SignatureVerification"; - - BKUPostConnection.doPostRequest272(MOA_URL, "", "testdata".getBytes(), "text/plain"); - - } - -} diff --git a/src/test/java/test/at/knowcenter/wag/egov/egiz/TestNeu.java b/src/test/java/test/at/knowcenter/wag/egov/egiz/TestNeu.java deleted file mode 100644 index 8a53fea..0000000 --- a/src/test/java/test/at/knowcenter/wag/egov/egiz/TestNeu.java +++ /dev/null @@ -1,313 +0,0 @@ -/** - * - */ -package test.at.knowcenter.wag.egov.egiz; - - -/** - * @deprecated old code - * - * @author wprinz - * - */ -public class TestNeu -{ -// private static Log logger = LogFactory.getLog(TestNeu.class); -// -// protected static String TEXT = "Test 123 äöüß"; //$NON-NLS-1$ -// -// protected static File PDF = new File("C:\\wprinz\\Filer\\egiz\\docs\\document4.pdf"); //$NON-NLS-1$ -// -// /** -// * @param args -// * @throws SignatureException -// */ -// public static void main(String[] args) throws Exception -// { -// SettingsReader.initializeForCommandLine(); -// PropertyConfigurator.configure(SettingsReader.CONFIG_PATH + "log4j.properties"); //$NON-NLS-1$ -// -// //testEnvelopingBase64BKUConnector(); -// -// testEnvelopingBase64MOAConnector(); -// -// // testDetachedLocRefMOAConnector (); -// -// // testDetachedMultipartBKUConnector(); -// -// // testTexMOA(); -// -// // testBinBKU(); -// -// // testTexBKU(); -// -// // SignatureResponse sr = bku_c.doVerify(TEXT, so); -// -// // logger.debug("sr = " + sr); -// -// logger.info("finished."); -// } -// -// public static void testEnvelopingBase64BKUConnector() throws Exception -// { -// Connector c = new EnvelopedBase64BKUConnector("CIO-BUND2"); //$NON-NLS-1$ -// -// SignatureData data = new BinarySignatureData(); -// -// { -// SignSignatureObject so = c.doSign(data); -// -// FileOutputStream fos = new FileOutputStream("C:\\wprinz\\Filer\\egiz2\\SignatureObject.bin"); -// ObjectOutputStream oos = new ObjectOutputStream(fos); -// oos.writeObject(so); -// oos.close(); -// } -// -// { -// FileInputStream fis = new FileInputStream("C:\\wprinz\\Filer\\egiz2\\SignatureObject.bin"); -// ObjectInputStream ois = new ObjectInputStream(fis); -// SignSignatureObject so = (SignSignatureObject) ois.readObject(); -// ois.close(); -// -// SignatureResponse sr = c.doVerify(data, so); -// -// logger.debug("sr = " + sr); -// } -// } -// -// public static void testEnvelopingBase64MOAConnector() throws Exception -// { -// Connector c = new EnvelopingBase64MOAConnector("CIO-BUND2"); //$NON-NLS-1$ -// -// SignatureData data = new BinarySignatureData(); -// -// { -// SignSignatureObject so = c.doSign(data); -// -// FileOutputStream fos = new FileOutputStream("C:\\wprinz\\Filer\\egiz2\\SignatureObject.bin"); -// ObjectOutputStream oos = new ObjectOutputStream(fos); -// oos.writeObject(so); -// oos.close(); -// } -// -// { -// FileInputStream fis = new FileInputStream("C:\\wprinz\\Filer\\egiz2\\SignatureObject.bin"); -// ObjectInputStream ois = new ObjectInputStream(fis); -// SignSignatureObject so = (SignSignatureObject) ois.readObject(); -// ois.close(); -// -// SignatureResponse sr = c.doVerify(data, so); -// logger.debug("sr = " + sr); -// } -// } -// -//// public static void testDetachedLocRefMOAConnector() throws Exception -//// { -//// DetachedLocRefMOAConnector c = new DetachedLocRefMOAConnector("CIO-BUND2"); //$NON-NLS-1$ -//// -//// SignatureData data = new TextSignatureData(); -//// -//// SignSignatureObject so = c.doSign(data); -//// -//// } -// -// public static void testDetachedMultipartBKUConnector() throws Exception -// { -// DetachedBKUConnector c = new MultipartDetachedBKUConnector("CIO-BUND2"); //$NON-NLS-1$ -// -// SignatureData data = new BinarySignatureData(); -// -// SignSignatureObject so = c.doSign(data); -// -// FileOutputStream fos = new FileOutputStream("C:\\wprinz\\Filer\\egiz2\\SignatureObject.bin"); -// ObjectOutputStream oos = new ObjectOutputStream(fos); -// oos.writeObject(so); -// oos.close(); -// -// FileInputStream fis = new FileInputStream("C:\\wprinz\\Filer\\egiz2\\SignatureObject.bin"); -// ObjectInputStream ois = new ObjectInputStream(fis); -// so = (SignSignatureObject) ois.readObject(); -// ois.close(); -// -// SignatureResponse sr = c.doVerify(data, so); -// logger.debug("sr = " + sr); -// -// } -// -// public static void testBinBKU() throws Exception -// { -// FileInputStream fis = new FileInputStream(PDF); -// byte[] data = new byte[(int) PDF.length()]; -// fis.read(data); -// fis.close(); -// -// PdfASID algorithm = new PdfASID("urn:pdfsigfilter:bka.gv.at:binaer:v1.0.0"); -// -// SignatureObject so = testSignBKU(data, algorithm); -// -// so.setKZ(algorithm); -// -// SignatureResponse sr = testVerifyBKU(data, so); -// -// logger.debug("sr = " + sr); -// -// } -// -// public static void testTexBKU() throws Exception -// { -// PdfASID algorithm = new PdfASID("urn:pdfsigfilter:bka.gv.at:text:v1.0.0"); -// -// SignatureObject so = testSignBKU(TEXT.getBytes("UTF-8"), algorithm); -// -// so.setKZ(algorithm); -// -// // FileOutputStream fos = new -// // FileOutputStream("C:\\wprinz\\Filer\\egiz2\\SignatureObject.bin"); -// // ObjectOutputStream oos = new ObjectOutputStream(fos); -// // oos.writeObject(so); -// // oos.close(); -// -// SignatureResponse sr = testVerifyBKU(TEXT.getBytes("UTF-8"), so); -// -// logger.debug("sr = " + sr); -// } -// -// public static void testTexMOA() throws Exception -// { -// PdfASID algorithm = new PdfASID("urn:pdfsigfilter:bka.gv.at:text:v1.0.0"); -// -// SignatureObject so = testSignMOA(TEXT.getBytes("UTF-8"), algorithm); -// -// so.setKZ(algorithm); -// -// // FileOutputStream fos = new -// // FileOutputStream("C:\\wprinz\\Filer\\egiz2\\SignatureObject.bin"); -// // ObjectOutputStream oos = new ObjectOutputStream(fos); -// // oos.writeObject(so); -// // oos.close(); -// -// // SignatureResponse sr = testVerifyBKU(TEXT.getBytes("UTF-8"), so); -// // -// // logger.debug("sr = " + sr); -// } -// -// public static SignatureObject testSignBKU(byte[] data, PdfASID algorithm) throws Exception -// { -// BKUConnector bku_c = new BKUConnector(); -// -// SignatureObject so = bku_c.doSign("CIO-BUND2", data, algorithm); -// -// logger.debug("so = " + so); -// -// return so; -// } -// -// public static SignatureObject testSignMOA(byte[] data, PdfASID algorithm) throws Exception -// { -// MOAConnector moa_c = new MOAConnector(); -// -// SignatureObject so = moa_c.doSign("CIO-BUND2", data, algorithm); -// -// logger.debug("so = " + so); -// -// return so; -// } -// -// public static SignatureResponse testVerifyBKU(byte[] data, SignatureObject so) throws Exception -// { -// BKUConnector bku_c = new BKUConnector(); -// -// SignatureResponse sr = bku_c.doVerify(data, so); -// -// logger.debug("sr = " + sr); -// -// return sr; -// } -// -// /** -// * A data source for text data. -// * -// * @author wprinz -// */ -// public static class TextSignatureData implements SignatureData -// { -// /** -// * @see at.knowcenter.wag.egov.egiz.sig.SignatureData#getData() -// */ -// public byte[] getData() -// { -// try -// { -// return TEXT.getBytes(getCharacterEncoding()); -// } -// catch (UnsupportedEncodingException e) -// { -// e.printStackTrace(); -// return null; -// } -// } -// -// /** -// * @see at.knowcenter.wag.egov.egiz.sig.SignatureData#getMimeType() -// */ -// public String getMimeType() -// { -// return "text/plain"; //$NON-NLS-1$ -// } -// -// /** -// * @see at.knowcenter.wag.egov.egiz.sig.SignatureData#getCharacterEncoding() -// */ -// public String getCharacterEncoding() -// { -// return "UTF-8"; //$NON-NLS-1$ -// } -// } -// -// /** -// * A data source for binary (PDF) data. -// * -// * @author wprinz -// */ -// public static class BinarySignatureData implements SignatureData -// { -// /** -// * @see at.knowcenter.wag.egov.egiz.sig.SignatureData#getData() -// */ -// public byte[] getData() -// { -// try -// { -// FileInputStream fis = new FileInputStream(PDF); -// byte[] data = new byte[(int) PDF.length()]; -// fis.read(data); -// fis.close(); -// -// return data; -// } -// catch (Exception e) -// { -// e.printStackTrace(); -// return null; -// } -// } -// -// /** -// * @see at.knowcenter.wag.egov.egiz.sig.SignatureData#getMimeType() -// */ -// public String getMimeType() -// { -// return "application/pdf"; //$NON-NLS-1$ -// } -// -// /** -// * @see at.knowcenter.wag.egov.egiz.sig.SignatureData#getCharacterEncoding() -// */ -// public String getCharacterEncoding() -// { -// return null; -// } -// -// } - -} -- cgit v1.2.3