diff options
Diffstat (limited to 'moaSig/common')
7 files changed, 46 insertions, 38 deletions
diff --git a/moaSig/common/build.gradle b/moaSig/common/build.gradle index 5f12e76..79f1b02 100644 --- a/moaSig/common/build.gradle +++ b/moaSig/common/build.gradle @@ -1,24 +1,45 @@ +plugins { + id 'java-library' +} + dependencies { - implementation files('../libs/iaik_jce_full_signed-6.1_moa.jar') - api 'org.slf4j:slf4j-api:1.7.36' - api 'xerces:xercesImpl:2.12.2' - api 'xalan:xalan:2.7.1' - api group: 'xalan', name: 'serializer', version: '2.7.1' - api 'joda-time:joda-time:2.12.7' - api 'jaxen:jaxen:1.2.0' + implementation files('../libs/iaik_jce_full_signed-6.1_moa.jar') + + api 'org.slf4j:slf4j-api:2.0.17' + + api(group: 'xerces', name: 'xercesImpl', version: '2.12.2') { + exclude group: 'xml-apis', module: 'xml-apis' + } + + api(group: 'xalan', name: 'xalan', version: '2.7.1') { + exclude group: 'xml-apis', module: 'xml-apis' + } + + api(group: 'xalan', name: 'serializer', version: '2.7.1') { + exclude group: 'xml-apis', module: 'xml-apis' + } + + api 'joda-time:joda-time:2.14.0' + api 'jaxen:jaxen:2.0.0' } -task testJar(type: Jar, dependsOn: testClasses) { + +java { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + withJavadocJar() + withSourcesJar() +} + +tasks.register('testJar', Jar) { + archiveClassifier.set('tests') from sourceSets.test.output - classifier = 'tests' } configurations { - testArtifacts.extendsFrom testCompile + testArtifacts } artifacts { - testArtifacts testJar - //archives testJar + testArtifacts(tasks.named('testJar')) } - diff --git a/moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/Base64Utils.java b/moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/Base64Utils.java index 2c9b4c0..a95ee5b 100644 --- a/moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/Base64Utils.java +++ b/moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/Base64Utils.java @@ -46,6 +46,7 @@ public class Base64Utils { * @param base64String The <code>String</code> containing the Base64 * encoded bytes. * @param ignoreInvalidChars Whether to ignore invalid Base64 characters. + * @param encoding Char encoding that should be used * @return byte[] The raw bytes contained in the <code>base64String</code>. * @throws IOException Failed to read the Base64 data. */ diff --git a/moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/DOMUtils.java b/moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/DOMUtils.java index 2f96196..86d2e54 100644 --- a/moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/DOMUtils.java +++ b/moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/DOMUtils.java @@ -315,26 +315,6 @@ public class DOMUtils { * * @param inputStream The <code>InputStream</code> * containing the XML document. - * @param validating If <code>true</code>, parse - * validating. - * @param externalSchemaLocations A <code>String</code> containing - * namespace URI to schema location - * pairs, the same way it is accepted - * by the <code>xsi: - * schemaLocation</code> attribute. - * @param externalNoNamespaceSchemaLocation The schema location of the schema - * for elements without a namespace, - * the same way it is accepted by the - * <code>xsi:noNamespaceSchemaLocation</code> - * attribute. - * @param entityResolver An <code>EntityResolver</code> to - * resolve external entities (schemas - * and DTDs). If <code>null</code>, it - * will not be set. - * @param errorHandler An <code>ErrorHandler</code> to - * decide what to do with parsing - * errors. If <code>null</code>, it - * will not be set. * @return The parsed XML document as a DOM tree. * @throws SAXException An error occurred parsing the document. * @throws IOException An error occurred reading the document. diff --git a/moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/KeyStoreUtils.java b/moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/KeyStoreUtils.java index f62b82a..94ecc8b 100644 --- a/moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/KeyStoreUtils.java +++ b/moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/KeyStoreUtils.java @@ -202,7 +202,7 @@ public class KeyStoreUtils { /** * Loads a keyStore without knowing the keyStore type * - * @param in input stream + * @param is input stream * @param password Password protecting the keyStore * @return keyStore loaded * @throws KeyStoreException thrown if keyStore cannot be loaded diff --git a/moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/MOAErrorHandler.java b/moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/MOAErrorHandler.java index f4acabf..2ab55a2 100644 --- a/moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/MOAErrorHandler.java +++ b/moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/MOAErrorHandler.java @@ -113,8 +113,8 @@ public class MOAErrorHandler extends DefaultErrorHandler { return new Object[] { e.getMessage(), e.getSystemId(), - new Integer(e.getLineNumber()), - new Integer(e.getColumnNumber()) }; + Integer.valueOf(e.getLineNumber()), + Integer.valueOf(e.getColumnNumber()) }; } }
\ No newline at end of file diff --git a/moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/MOATimer.java b/moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/MOATimer.java index 591495a..13133ea 100644 --- a/moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/MOATimer.java +++ b/moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/MOATimer.java @@ -70,7 +70,7 @@ public class MOATimer { * @param id The action ID. */ public void startTiming(Object id) { - timemapstart.put(id, new Long(System.currentTimeMillis())); + timemapstart.put(id, Long.valueOf(System.currentTimeMillis())); } /** @@ -79,7 +79,7 @@ public class MOATimer { * @param id The action ID. */ public void stopTiming(Object id) { - timemapend.put(id, new Long(System.currentTimeMillis())); + timemapend.put(id, Long.valueOf(System.currentTimeMillis())); } /** diff --git a/moaSig/common/src/main/resources/resources/schemas/MOA-SPSS-config-3.2.0.xsd b/moaSig/common/src/main/resources/resources/schemas/MOA-SPSS-config-3.2.0.xsd index d9cecf1..57c2e1d 100644 --- a/moaSig/common/src/main/resources/resources/schemas/MOA-SPSS-config-3.2.0.xsd +++ b/moaSig/common/src/main/resources/resources/schemas/MOA-SPSS-config-3.2.0.xsd @@ -98,6 +98,7 @@ </xs:sequence> <xs:element name="DigestMethodAlgorithm" minOccurs="0"/> </xs:sequence> + <xs:attribute name="RSASSA-PSS" type="xs:boolean"/> </xs:complexType> </xs:element> <xs:element name="KeyGroupMapping" maxOccurs="unbounded"> @@ -131,6 +132,11 @@ </xs:sequence> </xs:complexType> </xs:element> + <xs:element name="Signing" minOccurs="0"> + <xs:complexType> + <xs:attribute name="RSASSA-PSS" type="xs:boolean" default="true"/> + </xs:complexType> + </xs:element> </xs:sequence> </xs:complexType> </xs:element> |
