From 1ad814ccbbe4f65f430ac738104e3f3c8256c229 Mon Sep 17 00:00:00 2001 From: Klaus Stranacher Date: Tue, 16 Apr 2013 14:44:08 +0200 Subject: Update digest algorithm, XAdES version, whitelisting --- .../main/java/at/gv/egovernment/moa/util/Constants.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'common/src/main/java/at') diff --git a/common/src/main/java/at/gv/egovernment/moa/util/Constants.java b/common/src/main/java/at/gv/egovernment/moa/util/Constants.java index c4f7eb3f3..7e98f0427 100644 --- a/common/src/main/java/at/gv/egovernment/moa/util/Constants.java +++ b/common/src/main/java/at/gv/egovernment/moa/util/Constants.java @@ -397,6 +397,20 @@ public interface Constants { /** URI of the SHA1 digest algorithm */ public static final String SHA1_URI = "http://www.w3.org/2000/09/xmldsig#sha1"; + + /** URI of the SHA1 digest algorithm */ + public static final String SHA256_URI = + "http://www.w3.org/2000/09/xmldsig#sha256"; + + /** URI of the SHA1 digest algorithm */ + public static final String SHA384_URI = + "http://www.w3.org/2000/09/xmldsig#sha384"; + + /** URI of the SHA1 digest algorithm */ + public static final String SHA512_URI = + "http://www.w3.org/2000/09/xmldsig#sha512"; + + // TODO Supported Hash-Algorithms? /** URI of the Canonical XML algorithm */ public static final String C14N_URI = -- cgit v1.2.3 From a544afcf4ad581ab7b76e85dc597ccf5643cd55a Mon Sep 17 00:00:00 2001 From: Klaus Stranacher Date: Mon, 6 May 2013 21:43:00 +0200 Subject: - Update MOA-SS Interface (CreateCMSignatureRequest) - Whitelisting in MOA-SPSS --- common/src/main/java/at/gv/egovernment/moa/util/Constants.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'common/src/main/java/at') diff --git a/common/src/main/java/at/gv/egovernment/moa/util/Constants.java b/common/src/main/java/at/gv/egovernment/moa/util/Constants.java index 7e98f0427..120c222cf 100644 --- a/common/src/main/java/at/gv/egovernment/moa/util/Constants.java +++ b/common/src/main/java/at/gv/egovernment/moa/util/Constants.java @@ -83,7 +83,7 @@ public interface Constants { /** Local location of the MOA XML schema definition. */ public static final String MOA_SCHEMA_LOCATION = - SCHEMA_ROOT + "MOA-SPSS-1.4.7.xsd"; + SCHEMA_ROOT + "MOA-SPSS-1.5.2.xsd"; /** URI of the MOA configuration XML namespace. */ public static final String MOA_CONFIG_NS_URI = @@ -410,8 +410,6 @@ public interface Constants { public static final String SHA512_URI = "http://www.w3.org/2000/09/xmldsig#sha512"; - // TODO Supported Hash-Algorithms? - /** URI of the Canonical XML algorithm */ public static final String C14N_URI = "http://www.w3.org/TR/2001/REC-xml-c14n-20010315"; @@ -437,6 +435,11 @@ public interface Constants { */ public static final String MOA_SPSS_CREATE_XML_REQUEST = "CreateXMLSignatureRequest"; + /** + * Local name of request for creating a CMS signature. + */ + public static final String MOA_SPSS_CREATE_CMS_REQUEST = "CreateCMSSignatureRequest"; + /** * Local name of request for verifying an XML signature. */ -- cgit v1.2.3 From a52d3300d20837b12b45a0d4fb2b0ee520f6e641 Mon Sep 17 00:00:00 2001 From: Klaus Stranacher Date: Wed, 14 Aug 2013 16:36:40 +0200 Subject: TSL integration updates: - Setting of hashcache parameter in MOA - Update MOA-SP Response (Source attribute in QualifiedCertificate and SecureSignatureCreationDevice element) - Hidden truststores (for TSL enabled truststore: given certificates are copied to hidden truststore, where TSL certificates are copied) - Update of QC and SSCD detection - Update MOA-SPSS config: EU TSL URL can be set via configuration --- .../java/at/gv/egovernment/moa/util/FileUtils.java | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'common/src/main/java/at') diff --git a/common/src/main/java/at/gv/egovernment/moa/util/FileUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/FileUtils.java index 7effe8b4f..cac179a75 100644 --- a/common/src/main/java/at/gv/egovernment/moa/util/FileUtils.java +++ b/common/src/main/java/at/gv/egovernment/moa/util/FileUtils.java @@ -27,8 +27,10 @@ package at.gv.egovernment.moa.util; import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; +import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; +import java.io.OutputStream; import java.net.URL; /** @@ -136,5 +138,36 @@ public class FileUtils { return newURL; } } + + + private static void copy( InputStream fis, OutputStream fos ) + { + try + { + byte[] buffer = new byte[ 0xFFFF ]; + for ( int len; (len = fis.read(buffer)) != -1; ) + fos.write( buffer, 0, len ); + } + catch( IOException e ) { + System.err.println( e ); + } + finally { + if ( fis != null ) + try { fis.close(); } catch ( IOException e ) { e.printStackTrace(); } + if ( fos != null ) + try { fos.close(); } catch ( IOException e ) { e.printStackTrace(); } + } + } + + public static void copyFile(File src, File dest) + { + try + { + copy( new FileInputStream( src ), new FileOutputStream( dest ) ); + } + catch( IOException e ) { + e.printStackTrace(); + } + } } -- cgit v1.2.3