Author: cschneider
Date: Wed Aug 7 11:29:55 2013
New Revision: 1511249
URL: http://svn.apache.org/r1511249
Log:
CXF-5173 Fix some dependencies
Modified:
cxf/trunk/services/xkms/README.txt
cxf/trunk/services/xkms/pom.xml
cxf/trunk/services/xkms/xkms-client/ (props changed)
cxf/trunk/services/xkms/xkms-client/pom.xml
cxf/trunk/services/xkms/xkms-common/pom.xml
cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/AdditionalClassesFactory.java
cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/ClassArrayFactoryBean.java
cxf/trunk/services/xkms/xkms-features/src/main/resources/features.xml
cxf/trunk/services/xkms/xkms-features/src/main/resources/org.apache.cxf.xkms.cfg
cxf/trunk/services/xkms/xkms-itests/pom.xml
cxf/trunk/services/xkms/xkms-itests/src/test/java/org/apache/cxf/xkms/itests/BasicIntegrationTest.java
cxf/trunk/services/xkms/xkms-itests/src/test/java/org/apache/cxf/xkms/itests/handlers/validator/ValidatorTest.java
cxf/trunk/services/xkms/xkms-osgi/ (props changed)
cxf/trunk/services/xkms/xkms-osgi/pom.xml
cxf/trunk/services/xkms/xkms-osgi/src/main/resources/OSGI-INF/blueprint/cxf-endpoint.xml
cxf/trunk/services/xkms/xkms-war/ (props changed)
cxf/trunk/services/xkms/xkms-x509-handlers/pom.xml
cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/handlers/X509LocatorTest.java
cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/utils/X509UtilsTest.java
cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/validator/BasicValidationTest.java
cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/validator/DateValidatorTest.java
cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/validator/TrustedAuthorityValidatorTest.java
Modified: cxf/trunk/services/xkms/README.txt
URL:
http://svn.apache.org/viewvc/cxf/trunk/services/xkms/README.txt?rev=1511249&r1=1511248&r2=1511249&view=diff
==============================================================================
--- cxf/trunk/services/xkms/README.txt (original)
+++ cxf/trunk/services/xkms/README.txt Wed Aug 7 11:29:55 2013
@@ -12,3 +12,8 @@ xkms-itests - Integration tests
xkms-osgi - OSGi blueprint configuration for OSGi deployment
xkms-war - Web spring configuration for Web depoyment
+Installation
+------------
+
+features:addurl
mvn:org.apache.cxf.services.xkms/cxf-services-xkms-features/3.0.0-SNAPSHOT/xml
+features:install cxf-xkms-service cxf-xkms-client
Modified: cxf/trunk/services/xkms/pom.xml
URL:
http://svn.apache.org/viewvc/cxf/trunk/services/xkms/pom.xml?rev=1511249&r1=1511248&r2=1511249&view=diff
==============================================================================
--- cxf/trunk/services/xkms/pom.xml (original)
+++ cxf/trunk/services/xkms/pom.xml Wed Aug 7 11:29:55 2013
@@ -43,5 +43,14 @@
<module>xkms-osgi</module>
<module>xkms-war</module>
</modules>
+
+ <profiles>
+ <profile>
+ <id>xkms-ldap-test</id>
+ <modules>
+ <module>xkms-itests</module>
+ </modules>
+ </profile>
+ </profiles>
</project>
Propchange: cxf/trunk/services/xkms/xkms-client/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Aug 7 11:29:55 2013
@@ -5,3 +5,5 @@ target
bin
.project
+
+.classpath
Modified: cxf/trunk/services/xkms/xkms-client/pom.xml
URL:
http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-client/pom.xml?rev=1511249&r1=1511248&r2=1511249&view=diff
==============================================================================
--- cxf/trunk/services/xkms/xkms-client/pom.xml (original)
+++ cxf/trunk/services/xkms/xkms-client/pom.xml Wed Aug 7 11:29:55 2013
@@ -45,6 +45,11 @@
<version>${project.version}</version>
</dependency>
<dependency>
+ <groupId>net.sf.ehcache</groupId>
+ <artifactId>ehcache</artifactId>
+ <version>${cxf.ehcache.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-ws-security</artifactId>
<version>${project.version}</version>
Modified: cxf/trunk/services/xkms/xkms-common/pom.xml
URL:
http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/pom.xml?rev=1511249&r1=1511248&r2=1511249&view=diff
==============================================================================
--- cxf/trunk/services/xkms/xkms-common/pom.xml (original)
+++ cxf/trunk/services/xkms/xkms-common/pom.xml Wed Aug 7 11:29:55 2013
@@ -37,6 +37,8 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
+ <!-- Not needed in OSGi when using blueprint -->
+ <optional>true</optional>
</dependency>
</dependencies>
Modified:
cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/AdditionalClassesFactory.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/AdditionalClassesFactory.java?rev=1511249&r1=1511248&r2=1511249&view=diff
==============================================================================
---
cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/AdditionalClassesFactory.java
(original)
+++
cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/AdditionalClassesFactory.java
Wed Aug 7 11:29:55 2013
@@ -19,7 +19,9 @@
package org.apache.cxf.xkms.model.extensions;
-
+/**
+ * Needed for detail messages in OSGi blueprint deployment
+ */
public class AdditionalClassesFactory {
public Class<?>[] create() {
return new Class[]{ResultDetails.class};
Modified:
cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/ClassArrayFactoryBean.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/ClassArrayFactoryBean.java?rev=1511249&r1=1511248&r2=1511249&view=diff
==============================================================================
---
cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/ClassArrayFactoryBean.java
(original)
+++
cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/ClassArrayFactoryBean.java
Wed Aug 7 11:29:55 2013
@@ -23,6 +23,9 @@ import java.util.List;
import org.springframework.beans.factory.FactoryBean;
+/**
+ * Needed for detail messages in war deployment (spring)
+ */
public class ClassArrayFactoryBean implements FactoryBean<Object> {
private List<String> classNames;
Modified: cxf/trunk/services/xkms/xkms-features/src/main/resources/features.xml
URL:
http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-features/src/main/resources/features.xml?rev=1511249&r1=1511248&r2=1511249&view=diff
==============================================================================
--- cxf/trunk/services/xkms/xkms-features/src/main/resources/features.xml
(original)
+++ cxf/trunk/services/xkms/xkms-features/src/main/resources/features.xml Wed
Aug 7 11:29:55 2013
@@ -18,10 +18,13 @@
under the License.
-->
<features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0">
+
<repository>mvn:org.apache.cxf.karaf/apache-cxf/${project.version}/xml/features</repository>
<feature name="cxf-xkms-client" version="${project.version}">
- <feature>cxf</feature>
- <feature>spring-dm</feature>
+ <feature>cxf-jaxws</feature>
+ <feature>cxf-http</feature>
+ <feature>wss4j</feature>
+ <bundle start-level='40'
dependency="true">mvn:net.sf.ehcache/ehcache/${cxf.ehcache.version}</bundle>
<bundle>mvn:${project.groupId}/cxf-services-xkms-common/${project.version}</bundle>
<bundle>mvn:${project.groupId}/cxf-services-xkms-client/${project.version}</bundle>
<configfile finalname="/etc/org.apache.cxf.xkms.client.cfg">
@@ -30,8 +33,8 @@
</feature>
<feature name="cxf-xkms-service" version="${project.version}">
- <feature>cxf</feature>
- <feature>spring-dm</feature>
+ <feature>cxf-jaxws</feature>
+ <feature>cxf-http</feature>
<bundle>mvn:${project.groupId}/cxf-services-xkms-common/${project.version}</bundle>
<bundle>mvn:${project.groupId}/cxf-services-xkms-service/${project.version}</bundle>
<bundle>mvn:${project.groupId}/cxf-services-xkms-x509-handlers/${project.version}</bundle>
Modified:
cxf/trunk/services/xkms/xkms-features/src/main/resources/org.apache.cxf.xkms.cfg
URL:
http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-features/src/main/resources/org.apache.cxf.xkms.cfg?rev=1511249&r1=1511248&r2=1511249&view=diff
==============================================================================
---
cxf/trunk/services/xkms/xkms-features/src/main/resources/org.apache.cxf.xkms.cfg
(original)
+++
cxf/trunk/services/xkms/xkms-features/src/main/resources/org.apache.cxf.xkms.cfg
Wed Aug 7 11:29:55 2013
@@ -19,6 +19,8 @@
# XKMS configuration properties
+xkms.enableXKRSS=false
+
# Certificate repository ldap or file
xkms.certificate.repo=ldap
Modified: cxf/trunk/services/xkms/xkms-itests/pom.xml
URL:
http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-itests/pom.xml?rev=1511249&r1=1511248&r2=1511249&view=diff
==============================================================================
--- cxf/trunk/services/xkms/xkms-itests/pom.xml (original)
+++ cxf/trunk/services/xkms/xkms-itests/pom.xml Wed Aug 7 11:29:55 2013
@@ -25,7 +25,7 @@
</parent>
<properties>
- <pax-exam.version>3.1.0-SNAPSHOT</pax-exam.version>
+ <pax-exam.version>3.2.0</pax-exam.version>
<karaf.version>2.3.1</karaf.version>
</properties>
@@ -72,17 +72,23 @@
<dependency>
<groupId>org.ops4j.pax.url</groupId>
<artifactId>pax-url-aether</artifactId>
- <version>1.5.2</version>
+ <version>1.6.0</version>
<scope>test</scope>
</dependency>
-
+
<dependency>
- <groupId>org.apache.karaf.features</groupId>
- <artifactId>org.apache.karaf.features.core</artifactId>
- <version>${karaf.version}</version>
- <scope>test</scope>
+ <groupId>org.apache.karaf</groupId>
+ <artifactId>apache-karaf</artifactId>
+ <version>${karaf.version}</version>
+ <type>tar.gz</type>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.karaf</groupId>
+ <artifactId>org.apache.karaf.client</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
-
+
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
@@ -110,18 +116,4 @@
</plugins>
</build>
- <repositories>
- <repository>
- <id>ops4j.snapshot</id>
- <name>The OPS4J SNAPSHOT Repository</name>
-
<url>https://oss.sonatype.org/content/repositories/ops4j-snapshots/</url>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>false</enabled>
- </releases>
- </repository>
- </repositories>
-
</project>
Modified:
cxf/trunk/services/xkms/xkms-itests/src/test/java/org/apache/cxf/xkms/itests/BasicIntegrationTest.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-itests/src/test/java/org/apache/cxf/xkms/itests/BasicIntegrationTest.java?rev=1511249&r1=1511248&r2=1511249&view=diff
==============================================================================
---
cxf/trunk/services/xkms/xkms-itests/src/test/java/org/apache/cxf/xkms/itests/BasicIntegrationTest.java
(original)
+++
cxf/trunk/services/xkms/xkms-itests/src/test/java/org/apache/cxf/xkms/itests/BasicIntegrationTest.java
Wed Aug 7 11:29:55 2013
@@ -32,7 +32,6 @@ import org.ops4j.pax.exam.spi.reactors.P
import org.w3._2002._03.xkms_wsdl.XKMSPortType;
import static org.ops4j.pax.exam.CoreOptions.maven;
-import static org.ops4j.pax.exam.CoreOptions.systemTimeout;
import static
org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
import static
org.ops4j.pax.exam.karaf.options.KarafDistributionOption.features;
import static
org.ops4j.pax.exam.karaf.options.KarafDistributionOption.karafDistributionConfiguration;
@@ -45,6 +44,14 @@ public class BasicIntegrationTest {
private static final String HTTP_PORT = "9191";
private static final String XKMS_ENDPOINT = "http://localhost:" +
HTTP_PORT + "/cxf/XKMS";
+
+ // Adding apache snapshots as cxf trunk may contain snapshot dependencies
+ private static final String REPOS =
"http://repo1.maven.org/maven2@id=central, "
+// + "http://svn.apache.org/repos/asf/servicemix/m2-repo@id=servicemix,
"
+ +
"http://repository.apache.org/content/groups/snapshots-group@snapshots@noreleases@id=apache-snapshots
";
+// +
"http://repository.springsource.com/maven/bundles/release@id=springsource.release,
"
+// +
"http://repository.springsource.com/maven/bundles/external@id=springsource.external,
"
+// +
"http://oss.sonatype.org/content/repositories/releases/@id=sonatype";
@Inject
protected XKMSPortType xkmsService;
@@ -55,23 +62,14 @@ public class BasicIntegrationTest {
String projectVersion = System.getProperty("project.version");
String karafVersion = System.getProperty("karaf.version");
MavenArtifactUrlReference karafUrl =
maven().groupId("org.apache.karaf").artifactId("apache-karaf")
- .version(karafVersion).type("zip");
- MavenUrlReference cxfFeatures =
maven().groupId("org.apache.cxf.karaf").artifactId("apache-cxf")
- .version(projectVersion).type("xml").classifier("features");
+ .version(karafVersion).type("tar.gz");
MavenUrlReference xkmsFeatures =
maven().groupId("org.apache.cxf.services.xkms")
.artifactId("cxf-services-xkms-features").version(projectVersion).type("xml");
return new Option[] {
karafDistributionConfiguration().frameworkUrl(karafUrl).karafVersion(karafVersion)
.unpackDirectory(new
File("target/paxexam/unpack/")).useDeployFolder(false),
- /*
- * Timeout is set to 15 minutes because installation of cxf and
xkms takes ages. The reason should
- * be investigated in the near future. One problem is the usage of
pax exam snapshot build which
- * makes maven scan the snapshot repositories for each dependency
but that should not be the main
- * reason.
- */
- systemTimeout(900000),
- logLevel(LogLevel.ERROR),
+ logLevel(LogLevel.INFO),
keepRuntimeFolder(),
replaceConfigurationFile("data/xkms/certificates/trusted_cas/root.cer",
@@ -82,8 +80,9 @@ public class BasicIntegrationTest {
replaceConfigurationFile("etc/org.apache.cxf.xkms.cfg",
new
File("src/test/resources/etc/org.apache.cxf.xkms.cfg")),
- features(cxfFeatures, "cxf"), features(xkmsFeatures,
"cxf-xkms-service", "cxf-xkms-client"),
+ features(xkmsFeatures, "cxf-xkms-service", "cxf-xkms-client"),
+ editConfigurationFilePut("etc/org.ops4j.pax.url.mvn.cfg",
"org.ops4j.pax.url.mvn.repositories", REPOS),
editConfigurationFilePut("etc/org.ops4j.pax.web.cfg",
"org.osgi.service.http.port", HTTP_PORT),
editConfigurationFilePut("etc/org.apache.cxf.xkms.client.cfg",
"xkms.endpoint", XKMS_ENDPOINT)
};
Modified:
cxf/trunk/services/xkms/xkms-itests/src/test/java/org/apache/cxf/xkms/itests/handlers/validator/ValidatorTest.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-itests/src/test/java/org/apache/cxf/xkms/itests/handlers/validator/ValidatorTest.java?rev=1511249&r1=1511248&r2=1511249&view=diff
==============================================================================
---
cxf/trunk/services/xkms/xkms-itests/src/test/java/org/apache/cxf/xkms/itests/handlers/validator/ValidatorTest.java
(original)
+++
cxf/trunk/services/xkms/xkms-itests/src/test/java/org/apache/cxf/xkms/itests/handlers/validator/ValidatorTest.java
Wed Aug 7 11:29:55 2013
@@ -42,23 +42,31 @@ import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.junit.PaxExam;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@RunWith(PaxExam.class)
public class ValidatorTest extends BasicIntegrationTest {
-
private static final String PATH_TO_RESOURCES = "/data/xkms/certificates/";
private static final org.apache.cxf.xkms.model.xmldsig.ObjectFactory
DSIG_OF =
new org.apache.cxf.xkms.model.xmldsig.ObjectFactory();
private static final org.apache.cxf.xkms.model.xkms.ObjectFactory XKMS_OF
=
new org.apache.cxf.xkms.model.xkms.ObjectFactory();
+
+ private static final Logger LOG =
LoggerFactory.getLogger(ValidatorTest.class);
@Test
public void testRootCertIsValid() throws CertificateException {
-
+ try {
+ Thread.sleep(20000);
+ } catch (InterruptedException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
X509Certificate rootCertificate =
readCertificate("trusted_cas/root.cer");
ValidateRequestType request =
prepareValidateXKMSRequest(rootCertificate);
- StatusType result =
xkmsService.validate(request).getKeyBinding().get(0).getStatus();
+ StatusType result = doValidate(request);
Assert.assertEquals(KeyBindingEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_VALID,
result.getStatusValue());
Assert.assertFalse(result.getValidReason().isEmpty());
@@ -72,7 +80,7 @@ public class ValidatorTest extends Basic
public void testAliceSignedByRootIsValid() throws JAXBException,
CertificateException {
X509Certificate aliceCertificate = readCertificate("cas/alice.cer");
ValidateRequestType request =
prepareValidateXKMSRequest(aliceCertificate);
- StatusType result =
xkmsService.validate(request).getKeyBinding().get(0).getStatus();
+ StatusType result = doValidate(request);
Assert.assertEquals(KeyBindingEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_VALID,
result.getStatusValue());
Assert.assertFalse(result.getValidReason().isEmpty());
@@ -86,7 +94,7 @@ public class ValidatorTest extends Basic
public void testDaveSignedByAliceSginedByRootIsValid() throws
JAXBException, CertificateException {
X509Certificate daveCertificate = readCertificate("dave.cer");
ValidateRequestType request =
prepareValidateXKMSRequest(daveCertificate);
- StatusType result =
xkmsService.validate(request).getKeyBinding().get(0).getStatus();
+ StatusType result = doValidate(request);
Assert.assertEquals(KeyBindingEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_VALID,
result.getStatusValue());
Assert.assertFalse(result.getValidReason().isEmpty());
@@ -100,7 +108,7 @@ public class ValidatorTest extends Basic
public void testSelfSignedCertOscarIsNotValid() throws JAXBException,
CertificateException {
X509Certificate oscarCertificate = readCertificate("oscar.cer");
ValidateRequestType request =
prepareValidateXKMSRequest(oscarCertificate);
- StatusType result =
xkmsService.validate(request).getKeyBinding().get(0).getStatus();
+ StatusType result = doValidate(request);
Assert.assertEquals(KeyBindingEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_INVALID,
result.getStatusValue());
Assert.assertFalse(result.getInvalidReason().isEmpty());
@@ -112,7 +120,7 @@ public class ValidatorTest extends Basic
public void testExpiredCertIsNotValid() throws CertificateException {
X509Certificate expiredCertificate = readCertificate("expired.cer");
ValidateRequestType request =
prepareValidateXKMSRequest(expiredCertificate);
- StatusType result =
xkmsService.validate(request).getKeyBinding().get(0).getStatus();
+ StatusType result = doValidate(request);
Assert.assertEquals(KeyBindingEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_INVALID,
result.getStatusValue());
Assert.assertFalse(result.getInvalidReason().isEmpty());
@@ -158,5 +166,15 @@ public class ValidatorTest extends Basic
CertificateFactory cf = CertificateFactory.getInstance("X.509");
return (X509Certificate)cf.generateCertificate(inputStream);
}
+
+ private StatusType doValidate(ValidateRequestType request) {
+ try {
+ return
xkmsService.validate(request).getKeyBinding().get(0).getStatus();
+ } catch (Exception e) {
+ // Avoid serialization problems for some exceptions when
transported by pax exam
+ LOG.error(e.getMessage(), e);
+ throw new RuntimeException(e.getMessage());
+ }
+ }
}
Propchange: cxf/trunk/services/xkms/xkms-osgi/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Aug 7 11:29:55 2013
@@ -3,3 +3,5 @@ target
.settings
.project
+
+.classpath
Modified: cxf/trunk/services/xkms/xkms-osgi/pom.xml
URL:
http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-osgi/pom.xml?rev=1511249&r1=1511248&r2=1511249&view=diff
==============================================================================
--- cxf/trunk/services/xkms/xkms-osgi/pom.xml (original)
+++ cxf/trunk/services/xkms/xkms-osgi/pom.xml Wed Aug 7 11:29:55 2013
@@ -60,9 +60,6 @@
<configuration>
<instructions>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
- <Require-Bundle>
- org.springframework.beans
- </Require-Bundle>
</instructions>
</configuration>
</plugin>
Modified:
cxf/trunk/services/xkms/xkms-osgi/src/main/resources/OSGI-INF/blueprint/cxf-endpoint.xml
URL:
http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-osgi/src/main/resources/OSGI-INF/blueprint/cxf-endpoint.xml?rev=1511249&r1=1511248&r2=1511249&view=diff
==============================================================================
---
cxf/trunk/services/xkms/xkms-osgi/src/main/resources/OSGI-INF/blueprint/cxf-endpoint.xml
(original)
+++
cxf/trunk/services/xkms/xkms-osgi/src/main/resources/OSGI-INF/blueprint/cxf-endpoint.xml
Wed Aug 7 11:29:55 2013
@@ -20,7 +20,15 @@
http://cxf.apache.org/blueprint/core
http://cxf.apache.org/schemas/blueprint/core.xsd
">
- <cm:property-placeholder persistent-id="org.apache.cxf.xkms" />
+ <cm:property-placeholder persistent-id="org.apache.cxf.xkms">
+ <cm:default-properties>
+ <cm:property name="xkms.enableXKRSS" value="true"/>
+ <cm:property name="xkms.ldap.url"
value="tcp:localhost:389"/>
+ <cm:property name="xkms.ldap.user" value=""/>
+ <cm:property name="xkms.ldap.pwd" value=""/>
+ <cm:property name="xkms.ldap.retry" value=""/>
+ </cm:default-properties>
+ </cm:property-placeholder>
<bean id="ldapSearch"
class="org.apache.cxf.xkms.x509.repo.ldap.LdapSearch">
<argument value="${xkms.ldap.url}" />
@@ -70,7 +78,7 @@
</bean>
<bean id="xkmsProviderBean"
class="org.apache.cxf.xkms.service.XKMSService">
- <property name="enableXKRSS" value="${xkms.enableXKRSS}" />
+ <!-- <property name="enableXKRSS" value="${xkms.enableXKRSS}" /> -->
<property name="validators">
<list>
<ref component-id="dateValidator" />
Propchange: cxf/trunk/services/xkms/xkms-war/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Aug 7 11:29:55 2013
@@ -3,3 +3,5 @@ target
.settings
.project
+
+.classpath
Modified: cxf/trunk/services/xkms/xkms-x509-handlers/pom.xml
URL:
http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-x509-handlers/pom.xml?rev=1511249&r1=1511248&r2=1511249&view=diff
==============================================================================
--- cxf/trunk/services/xkms/xkms-x509-handlers/pom.xml (original)
+++ cxf/trunk/services/xkms/xkms-x509-handlers/pom.xml Wed Aug 7 11:29:55 2013
@@ -41,12 +41,7 @@
</dependency>
<dependency>
<groupId>org.apache.cxf.services.xkms</groupId>
- <artifactId>cxf-services-xkms-service</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf.services.xkms</groupId>
- <artifactId>cxf-services-xkms-client</artifactId>
+ <artifactId>cxf-services-xkms-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Modified:
cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/handlers/X509LocatorTest.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/handlers/X509LocatorTest.java?rev=1511249&r1=1511248&r2=1511249&view=diff
==============================================================================
---
cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/handlers/X509LocatorTest.java
(original)
+++
cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/handlers/X509LocatorTest.java
Wed Aug 7 11:29:55 2013
@@ -19,12 +19,8 @@
package org.apache.cxf.xkms.x509.handlers;
import java.security.cert.CertificateException;
-import java.util.ArrayList;
-import java.util.List;
import java.util.UUID;
-
-import org.apache.cxf.xkms.client.X509AppId;
import org.apache.cxf.xkms.handlers.Applications;
import org.apache.cxf.xkms.handlers.XKMSConstants;
import org.apache.cxf.xkms.model.xkms.LocateRequestType;
@@ -76,24 +72,19 @@ public class X509LocatorTest {
@Ignore
@Test
public void locate() {
- List<X509AppId> ids = new ArrayList<X509AppId>();
- X509AppId id = new X509AppId(Applications.PKIX, "alice");
- ids.add(id);
- LocateRequestType request = prepareLocateXKMSRequest(ids);
+ LocateRequestType request = prepareLocateXKMSRequest();
UnverifiedKeyBindingType result = locator.locate(request);
Assert.assertNotNull(result.getKeyInfo());
}
- private LocateRequestType prepareLocateXKMSRequest(List<X509AppId> ids) {
+ private LocateRequestType prepareLocateXKMSRequest() {
QueryKeyBindingType queryKeyBindingType =
XKMS_OF.createQueryKeyBindingType();
- for (X509AppId id : ids) {
- UseKeyWithType useKeyWithType = XKMS_OF.createUseKeyWithType();
- useKeyWithType.setIdentifier(id.getId());
- useKeyWithType.setApplication(id.getApplication().getUri());
+ UseKeyWithType useKeyWithType = XKMS_OF.createUseKeyWithType();
+ useKeyWithType.setIdentifier("alice");
+ useKeyWithType.setApplication(Applications.PKIX.getUri());
- queryKeyBindingType.getUseKeyWith().add(useKeyWithType);
- }
+ queryKeyBindingType.getUseKeyWith().add(useKeyWithType);
LocateRequestType locateRequestType =
XKMS_OF.createLocateRequestType();
locateRequestType.setQueryKeyBinding(queryKeyBindingType);
Modified:
cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/utils/X509UtilsTest.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/utils/X509UtilsTest.java?rev=1511249&r1=1511248&r2=1511249&view=diff
==============================================================================
---
cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/utils/X509UtilsTest.java
(original)
+++
cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/utils/X509UtilsTest.java
Wed Aug 7 11:29:55 2013
@@ -19,6 +19,7 @@
package org.apache.cxf.xkms.x509.utils;
+import java.io.InputStream;
import java.security.cert.X509Certificate;
import java.util.List;
@@ -36,9 +37,9 @@ public class X509UtilsTest extends Basic
private static final String CERT_DN = "CN=www.anothersts.com, L=CGN,
ST=NRW, C=DE, O=AnotherSTS";
public void extractValidatingCertsOK() throws JAXBException {
+ InputStream is =
this.getClass().getResourceAsStream("/validateRequestOK.xml");
@SuppressWarnings("unchecked")
- JAXBElement<ValidateRequestType> request =
(JAXBElement<ValidateRequestType>)u.unmarshal(this.getClass()
- .getResourceAsStream("/validateRequestOK.xml"));
+ JAXBElement<ValidateRequestType> request =
(JAXBElement<ValidateRequestType>)unmarshaller.unmarshal(is);
List<X509Certificate> certs =
ValidateRequestParser.parse(request.getValue());
Assert.assertEquals("Exactly one certificate should be found", 1,
certs.size());
Assert.assertEquals("Unexcpected certificate DN", CERT_DN,
certs.get(0).getSubjectDN().getName());
@@ -46,9 +47,9 @@ public class X509UtilsTest extends Basic
@Test(expected = XKMSRequestException.class)
public void extractValidatingCertsCorrupted() throws JAXBException {
+ InputStream is =
this.getClass().getResourceAsStream("/validateRequestCorrupted.xml");
@SuppressWarnings("unchecked")
- JAXBElement<ValidateRequestType> request =
(JAXBElement<ValidateRequestType>)u.unmarshal(this.getClass()
- .getResourceAsStream("/validateRequestCorrupted.xml"));
+ JAXBElement<ValidateRequestType> request =
(JAXBElement<ValidateRequestType>)unmarshaller.unmarshal(is);
ValidateRequestParser.parse(request.getValue());
}
}
Modified:
cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/validator/BasicValidationTest.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/validator/BasicValidationTest.java?rev=1511249&r1=1511248&r2=1511249&view=diff
==============================================================================
---
cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/validator/BasicValidationTest.java
(original)
+++
cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/validator/BasicValidationTest.java
Wed Aug 7 11:29:55 2013
@@ -23,16 +23,17 @@ import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
+import org.apache.cxf.xkms.model.xkms.MessageAbstractType;
import org.junit.Before;
public class BasicValidationTest {
- protected JAXBContext jc;
- protected Unmarshaller u;
+ protected JAXBContext jaxbContext;
+ protected Unmarshaller unmarshaller;
@Before
public void setUp() throws JAXBException {
- jc = JAXBContext.newInstance("org.apache.cxf.xkms.model.xkms");
- u = jc.createUnmarshaller();
+ jaxbContext =
JAXBContext.newInstance(MessageAbstractType.class.getPackage().getName());
+ unmarshaller = jaxbContext.createUnmarshaller();
}
}
Modified:
cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/validator/DateValidatorTest.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/validator/DateValidatorTest.java?rev=1511249&r1=1511248&r2=1511249&view=diff
==============================================================================
---
cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/validator/DateValidatorTest.java
(original)
+++
cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/validator/DateValidatorTest.java
Wed Aug 7 11:29:55 2013
@@ -18,6 +18,8 @@
*/
package org.apache.cxf.xkms.x509.validator;
+import java.io.InputStream;
+
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
@@ -49,9 +51,9 @@ public class DateValidatorTest extends B
}
private StatusType processRequest(String path) throws JAXBException {
+ InputStream is = this.getClass().getResourceAsStream(path);
@SuppressWarnings("unchecked")
- JAXBElement<ValidateRequestType> request =
(JAXBElement<ValidateRequestType>) u.unmarshal(this.getClass()
- .getResourceAsStream(path));
+ JAXBElement<ValidateRequestType> request =
(JAXBElement<ValidateRequestType>) unmarshaller.unmarshal(is);
DateValidator validator = new DateValidator();
return validator.validate(request.getValue());
Modified:
cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/validator/TrustedAuthorityValidatorTest.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/validator/TrustedAuthorityValidatorTest.java?rev=1511249&r1=1511248&r2=1511249&view=diff
==============================================================================
---
cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/validator/TrustedAuthorityValidatorTest.java
(original)
+++
cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/validator/TrustedAuthorityValidatorTest.java
Wed Aug 7 11:29:55 2013
@@ -120,7 +120,7 @@ public class TrustedAuthorityValidatorTe
private StatusType processRequest(String path) throws JAXBException,
CertificateException {
@SuppressWarnings("unchecked")
- JAXBElement<ValidateRequestType> request =
(JAXBElement<ValidateRequestType>)u.unmarshal(this
+ JAXBElement<ValidateRequestType> request =
(JAXBElement<ValidateRequestType>)unmarshaller.unmarshal(this
.getClass().getResourceAsStream(PATH_TO_RESOURCES + path));
TrustedAuthorityValidator validator = new
TrustedAuthorityValidator(certificateRepo);
return validator.validate(request.getValue());