aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgregor <gregor@d688527b-c9ab-4aba-bd8d-4036d912da1d>2005-01-18 11:06:28 +0000
committergregor <gregor@d688527b-c9ab-4aba-bd8d-4036d912da1d>2005-01-18 11:06:28 +0000
commitca508dd0091a1e3736a6b98543996a47cc6a1835 (patch)
treef2c20842745623f747ad1173fb17903165805df2
parente5b40dcb121128907b858f029a149e120922033b (diff)
downloadmoa-id-spss-ca508dd0091a1e3736a6b98543996a47cc6a1835.tar.gz
moa-id-spss-ca508dd0091a1e3736a6b98543996a47cc6a1835.tar.bz2
moa-id-spss-ca508dd0091a1e3736a6b98543996a47cc6a1835.zip
Unterstützung des aktuellen NS für ECDSA-XML-Strukturen (dsig-more statt buergerkarte).
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@220 d688527b-c9ab-4aba-bd8d-4036d912da1d
-rw-r--r--common/.classpath38
-rw-r--r--common/build.xml4
-rw-r--r--common/res/resources/schemas/ECDSAKeyValue.ancient.xsd122
-rw-r--r--common/res/resources/schemas/ECDSAKeyValue.wrong.xsd122
-rw-r--r--common/res/resources/schemas/ECDSAKeyValue.xsd2
-rw-r--r--common/src/at/gv/egovernment/moa/util/Constants.java16
6 files changed, 282 insertions, 22 deletions
diff --git a/common/.classpath b/common/.classpath
index 614f844f4..6534e6c4e 100644
--- a/common/.classpath
+++ b/common/.classpath
@@ -1,22 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="res"/>
- <classpathentry kind="var" path="JRE_LIB" sourcepath="JRE_SRC"/>
- <classpathentry kind="lib" path="lib/commons-logging-1.0.2/commons-logging-api.jar"/>
- <classpathentry kind="lib" path="lib/jaxen-1.0/jaxen-core.jar"/>
- <classpathentry kind="lib" path="lib/xerces-j-2.0.2/xmlParserAPIs.jar"/>
- <classpathentry kind="lib" path="lib/jaxp-1.2_01/dom.jar"/>
- <classpathentry kind="lib" path="lib/xalan-j-2.2/xalan.jar"/>
- <classpathentry kind="lib" path="lib/jaxen-1.0/jaxen-dom.jar"/>
- <classpathentry kind="lib" path="lib/jaxp-1.2_01/jaxp-api.jar"/>
- <classpathentry kind="lib" path="lib/jaxen-1.0/saxpath.jar"/>
- <classpathentry kind="lib" path="lib/xerces-j-2.0.2/xercesImpl.jar"/>
- <classpathentry kind="lib" path="lib/junit-3.8.1/junit.jar"/>
- <classpathentry kind="lib" path="lib/iaik-jce-3.01/iaik_jce_full.jar"/>
- <classpathentry kind="lib" path="lib/iaik-ecc/iaik_ecc.jar"/>
- <classpathentry kind="lib" path="lib/jsse-1.0.3_03/jcert.jar"/>
- <classpathentry kind="lib" path="lib/jsse-1.0.3_03/jnet.jar"/>
- <classpathentry kind="lib" path="lib/jsse-1.0.3_03/jsse.jar"/>
- <classpathentry kind="output" path="bin"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="res"/>
+ <classpathentry sourcepath="JRE_SRC" kind="var" path="JRE_LIB"/>
+ <classpathentry kind="lib" path="lib/commons-logging-1.0.2/commons-logging-api.jar"/>
+ <classpathentry kind="lib" path="lib/jaxen-1.0/jaxen-core.jar"/>
+ <classpathentry kind="lib" path="lib/jaxp-1.2_01/dom.jar"/>
+ <classpathentry kind="lib" path="lib/jaxen-1.0/jaxen-dom.jar"/>
+ <classpathentry kind="lib" path="lib/jaxp-1.2_01/jaxp-api.jar"/>
+ <classpathentry kind="lib" path="lib/jaxen-1.0/saxpath.jar"/>
+ <classpathentry kind="lib" path="lib/junit-3.8.1/junit.jar"/>
+ <classpathentry kind="lib" path="lib/iaik-jce-3.01/iaik_jce_full.jar"/>
+ <classpathentry kind="lib" path="lib/iaik-ecc/iaik_ecc.jar"/>
+ <classpathentry kind="lib" path="lib/jsse-1.0.3_03/jcert.jar"/>
+ <classpathentry kind="lib" path="lib/jsse-1.0.3_03/jnet.jar"/>
+ <classpathentry kind="lib" path="lib/jsse-1.0.3_03/jsse.jar"/>
+ <classpathentry kind="lib" path="lib/xalan-j-2.5.1/xalan.jar"/>
+ <classpathentry kind="lib" path="lib/xerces-j-2.4.0/xercesImpl.jar"/>
+ <classpathentry kind="lib" path="lib/xerces-j-2.4.0/xmlParserAPIs.jar"/>
+ <classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/common/build.xml b/common/build.xml
index 20ac141ad..c118f86de 100644
--- a/common/build.xml
+++ b/common/build.xml
@@ -16,8 +16,8 @@
<property name="lib" value="lib"/>
<property name="lib.jaxp" value="${lib}/jaxp-1.2_01"/>
<property name="lib.jaxen" value="${lib}/jaxen-1.0"/>
- <property name="lib.xerces" value="${lib}/xerces-j-2.0.2"/>
- <property name="lib.xalan" value="${lib}/xalan-j-2.2"/>
+ <property name="lib.xerces" value="${lib}/xerces-j-2.4.0"/>
+ <property name="lib.xalan" value="${lib}/xalan-j-2.5.1"/>
<property name="lib.iaik-jce" value="${lib}/iaik-jce-3.01"/>
<property name="lib.jsse" value="${lib}/jsse-1.0.3_03"/>
<property name="lib.junit" value="${lib}/junit-3.8.1"/>
diff --git a/common/res/resources/schemas/ECDSAKeyValue.ancient.xsd b/common/res/resources/schemas/ECDSAKeyValue.ancient.xsd
new file mode 100644
index 000000000..833d327f2
--- /dev/null
+++ b/common/res/resources/schemas/ECDSAKeyValue.ancient.xsd
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema targetNamespace="http://www.buergerkarte.at/namespaces/ecdsa/200206030#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ecdsa="http://www.buergerkarte.at/namespaces/ecdsa/200206030#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="0.3">
+ <!--ECDSA key value root element-->
+ <xs:element name="ECDSAKeyValue" type="ecdsa:ECDSAKeyValueType"/>
+ <xs:complexType name="ECDSAKeyValueType">
+ <xs:sequence>
+ <xs:element name="DomainParameters" type="ecdsa:DomainParamsType" minOccurs="0"/>
+ <xs:element name="PublicKey" type="ecdsa:ECPointType"/>
+ </xs:sequence>
+ </xs:complexType>
+ <!--EC domain parameters-->
+ <xs:complexType name="DomainParamsType">
+ <xs:choice>
+ <xs:element name="ExplicitParams" type="ecdsa:ExplicitParamsType"/>
+ <xs:element name="NamedCurve">
+ <xs:complexType>
+ <xs:attribute name="URN" type="xs:anyURI" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ <xs:complexType name="FieldParamsType" abstract="true"/>
+ <xs:complexType name="PrimeFieldParamsType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:FieldParamsType">
+ <xs:sequence>
+ <xs:element name="P" type="xs:positiveInteger"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="CharTwoFieldParamsType" abstract="true">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:FieldParamsType">
+ <xs:sequence>
+ <xs:element name="M" type="xs:positiveInteger"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="OddCharExtensionFieldParamsType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:FieldParamsType">
+ <xs:sequence>
+ <xs:element name="M" type="xs:positiveInteger"/>
+ <xs:element name="W" type="xs:positiveInteger"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="TnBFieldParamsType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:CharTwoFieldParamsType">
+ <xs:sequence>
+ <xs:element name="K" type="xs:positiveInteger"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="PnBFieldParamsType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:CharTwoFieldParamsType">
+ <xs:sequence>
+ <xs:element name="K1" type="xs:positiveInteger"/>
+ <xs:element name="K2" type="xs:positiveInteger"/>
+ <xs:element name="K3" type="xs:positiveInteger"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="ExplicitParamsType">
+ <xs:sequence>
+ <xs:element name="FieldParams" type="ecdsa:FieldParamsType"/>
+ <xs:element name="CurveParams" type="ecdsa:CurveParamsType"/>
+ <xs:element name="BasePointParams" type="ecdsa:BasePointParamsType"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="CurveParamsType">
+ <xs:sequence>
+ <xs:element name="A" type="ecdsa:FieldElemType"/>
+ <xs:element name="B" type="ecdsa:FieldElemType"/>
+ <xs:element name="Seed" type="xs:hexBinary" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="BasePointParamsType">
+ <xs:sequence>
+ <xs:element name="BasePoint" type="ecdsa:ECPointType"/>
+ <xs:element name="Order" type="xs:positiveInteger"/>
+ <xs:element name="Cofactor" type="xs:positiveInteger" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ <!--EC point-->
+ <xs:complexType name="ECPointType">
+ <xs:sequence minOccurs="0">
+ <xs:element name="X" type="ecdsa:FieldElemType"/>
+ <xs:element name="Y" type="ecdsa:FieldElemType"/>
+ </xs:sequence>
+ </xs:complexType>
+ <!--Field element-->
+ <xs:complexType name="FieldElemType" abstract="true"/>
+ <xs:complexType name="PrimeFieldElemType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:FieldElemType">
+ <xs:attribute name="Value" type="xs:nonNegativeInteger" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="CharTwoFieldElemType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:FieldElemType">
+ <xs:attribute name="Value" type="xs:hexBinary" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="OddCharExtensionFieldElemType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:FieldElemType">
+ <xs:attribute name="Value" type="xs:nonNegativeInteger" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+</xs:schema>
diff --git a/common/res/resources/schemas/ECDSAKeyValue.wrong.xsd b/common/res/resources/schemas/ECDSAKeyValue.wrong.xsd
new file mode 100644
index 000000000..db83c9df5
--- /dev/null
+++ b/common/res/resources/schemas/ECDSAKeyValue.wrong.xsd
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema targetNamespace="http://www.w3.org/2004/01/xmldsig-more#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ecdsa="http://www.w3.org/2004/01/xmldsig-more#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="0.3">
+ <!--ECDSA key value root element-->
+ <xs:element name="ECDSAKeyValue" type="ecdsa:ECDSAKeyValueType"/>
+ <xs:complexType name="ECDSAKeyValueType">
+ <xs:sequence>
+ <xs:element name="DomainParameters" type="ecdsa:DomainParamsType" minOccurs="0"/>
+ <xs:element name="PublicKey" type="ecdsa:ECPointType"/>
+ </xs:sequence>
+ </xs:complexType>
+ <!--EC domain parameters-->
+ <xs:complexType name="DomainParamsType">
+ <xs:choice>
+ <xs:element name="ExplicitParams" type="ecdsa:ExplicitParamsType"/>
+ <xs:element name="NamedCurve">
+ <xs:complexType>
+ <xs:attribute name="URN" type="xs:anyURI" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ <xs:complexType name="FieldParamsType" abstract="true"/>
+ <xs:complexType name="PrimeFieldParamsType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:FieldParamsType">
+ <xs:sequence>
+ <xs:element name="P" type="xs:positiveInteger"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="CharTwoFieldParamsType" abstract="true">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:FieldParamsType">
+ <xs:sequence>
+ <xs:element name="M" type="xs:positiveInteger"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="OddCharExtensionFieldParamsType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:FieldParamsType">
+ <xs:sequence>
+ <xs:element name="M" type="xs:positiveInteger"/>
+ <xs:element name="W" type="xs:positiveInteger"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="TnBFieldParamsType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:CharTwoFieldParamsType">
+ <xs:sequence>
+ <xs:element name="K" type="xs:positiveInteger"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="PnBFieldParamsType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:CharTwoFieldParamsType">
+ <xs:sequence>
+ <xs:element name="K1" type="xs:positiveInteger"/>
+ <xs:element name="K2" type="xs:positiveInteger"/>
+ <xs:element name="K3" type="xs:positiveInteger"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="ExplicitParamsType">
+ <xs:sequence>
+ <xs:element name="FieldParams" type="ecdsa:FieldParamsType"/>
+ <xs:element name="CurveParams" type="ecdsa:CurveParamsType"/>
+ <xs:element name="BasePointParams" type="ecdsa:BasePointParamsType"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="CurveParamsType">
+ <xs:sequence>
+ <xs:element name="A" type="ecdsa:FieldElemType"/>
+ <xs:element name="B" type="ecdsa:FieldElemType"/>
+ <xs:element name="Seed" type="xs:hexBinary" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="BasePointParamsType">
+ <xs:sequence>
+ <xs:element name="BasePoint" type="ecdsa:ECPointType"/>
+ <xs:element name="Order" type="xs:positiveInteger"/>
+ <xs:element name="Cofactor" type="xs:positiveInteger" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ <!--EC point-->
+ <xs:complexType name="ECPointType">
+ <xs:sequence minOccurs="0">
+ <xs:element name="X" type="ecdsa:FieldElemType"/>
+ <xs:element name="Y" type="ecdsa:FieldElemType"/>
+ </xs:sequence>
+ </xs:complexType>
+ <!--Field element-->
+ <xs:complexType name="FieldElemType" abstract="true"/>
+ <xs:complexType name="PrimeFieldElemType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:FieldElemType">
+ <xs:attribute name="Value" type="xs:nonNegativeInteger" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="CharTwoFieldElemType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:FieldElemType">
+ <xs:attribute name="Value" type="xs:hexBinary" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="OddCharExtensionFieldElemType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:FieldElemType">
+ <xs:attribute name="Value" type="xs:nonNegativeInteger" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+</xs:schema>
diff --git a/common/res/resources/schemas/ECDSAKeyValue.xsd b/common/res/resources/schemas/ECDSAKeyValue.xsd
index 833d327f2..7a01b23d1 100644
--- a/common/res/resources/schemas/ECDSAKeyValue.xsd
+++ b/common/res/resources/schemas/ECDSAKeyValue.xsd
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema targetNamespace="http://www.buergerkarte.at/namespaces/ecdsa/200206030#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ecdsa="http://www.buergerkarte.at/namespaces/ecdsa/200206030#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="0.3">
+<xs:schema targetNamespace="http://www.w3.org/2001/04/xmldsig-more#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ecdsa="http://www.w3.org/2001/04/xmldsig-more#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="0.3">
<!--ECDSA key value root element-->
<xs:element name="ECDSAKeyValue" type="ecdsa:ECDSAKeyValueType"/>
<xs:complexType name="ECDSAKeyValueType">
diff --git a/common/src/at/gv/egovernment/moa/util/Constants.java b/common/src/at/gv/egovernment/moa/util/Constants.java
index e63dbf015..0d8f19064 100644
--- a/common/src/at/gv/egovernment/moa/util/Constants.java
+++ b/common/src/at/gv/egovernment/moa/util/Constants.java
@@ -67,7 +67,15 @@ public interface Constants {
/** URI of the ECDSA XML namespace */
public static final String ECDSA_NS_URI =
+ "http://www.w3.org/2001/04/xmldsig-more#";
+
+ /** Ancient URI for the ECDSA XML namespace **/
+ public static final String ECDSA_NS_URI_ANCIENT =
"http://www.buergerkarte.at/namespaces/ecdsa/200206030#";
+
+ /** Wrong URI for the ECDSA XML namespace, used by the ZMR **/
+ public static final String ECDSA_NS_URI_WRONG = // TODO Entfernen, sobald ZMR umgestellt hat
+ "http://www.w3.org/2004/01/xmldsig-more#";
/** Prefix used for ECDSA namespace */
public static final String ECDSA_PREFIX = "ecdsa";
@@ -76,6 +84,14 @@ public interface Constants {
public static final String ECDSA_SCHEMA_LOCATION =
SCHEMA_ROOT + "ECDSAKeyValue.xsd";
+ /** Local location of ECDSA XML schema definition (ancient version) */
+ public static final String ECDSA_SCHEMA_LOCATION_ANCIENT =
+ SCHEMA_ROOT + "ECDSAKeyValue.ancient.xsd";
+
+ /** Local location of ECDSA XML schema definition (wrong ZMR version) */
+ public static final String ECDSA_SCHEMA_LOCATION_WRONG =
+ SCHEMA_ROOT + "ECDSAKeyValue.wrong.xsd";
+
/** URI of the PersonData XML namespace. */
public static final String PD_NS_URI =
"http://reference.e-government.gv.at/namespace/persondata/20020228#";