summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorHolger Oehm2011-09-28 11:17:01 (EDT)
committer Tobias Oberlies2011-10-10 10:33:44 (EDT)
commitc283b91bd87c0282c59a40801db653e88a7fed77 (patch)
treead12aec1e0e2aa0f44bd3cf662b5deefc5516ccb
parent4dda65a568c25bd47a3ccd2f08bde2df6a2b3791 (diff)
downloadorg.eclipse.tycho-c283b91bd87c0282c59a40801db653e88a7fed77.zip
org.eclipse.tycho-c283b91bd87c0282c59a40801db653e88a7fed77.tar.gz
org.eclipse.tycho-c283b91bd87c0282c59a40801db653e88a7fed77.tar.bz2
344691 Work around MD5 problem for signed JARs
The fix in this patch consists of adding the flag IPublisherInfo.A_NO_MD5 while generating the p2 metadata. To support the fix, this patch also contains a new mojo that allows to verify md5 sums and signatures in built repositories. This VerifyIntegrityRepositoryMojo is not integrated into the default build lifecycle but used to add md5 verification to the jarsigning integration test. (Without the fix above, the wrong md5 sum would show up in the integration test result). Bug: 344691 Invalid MD5 sums for signed jars in eclipse-repository
-rw-r--r--tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/impl/publisher/P2GeneratorImpl.java4
-rw-r--r--tycho-bundles/org.eclipse.tycho.p2.tools.facade/META-INF/MANIFEST.MF3
-rw-r--r--tycho-bundles/org.eclipse.tycho.p2.tools.facade/src/main/java/org/eclipse/tycho/p2/tools/verifier/facade/VerifierService.java24
-rw-r--r--tycho-bundles/org.eclipse.tycho.p2.tools.impl/META-INF/MANIFEST.MF4
-rw-r--r--tycho-bundles/org.eclipse.tycho.p2.tools.impl/OSGI-INF/verifierservice.xml7
-rw-r--r--tycho-bundles/org.eclipse.tycho.p2.tools.impl/src/main/java/org/eclipse/tycho/p2/tools/verifier/VerifierServiceImpl.java112
-rw-r--r--tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/selfsigned/artifacts.xml36
-rw-r--r--tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/selfsigned/content.xml402
-rw-r--r--tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/selfsigned/features/jarsigning.feature_0.0.1.201109191414.jarbin0 -> 3465 bytes
-rw-r--r--tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/selfsigned/plugins/jarsigning_0.0.1.201109191414.jarbin0 -> 3499 bytes
-rw-r--r--tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/tampered_file/artifacts.xml35
-rw-r--r--tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/tampered_file/content.xml402
-rw-r--r--tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/tampered_file/features/jarsigning.feature_0.0.1.201109191414.jarbin0 -> 3465 bytes
-rw-r--r--tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/tampered_file/plugins/jarsigning_0.0.1.201109191414.jarbin0 -> 3320 bytes
-rw-r--r--tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/wrong_checksum/artifacts.xml36
-rw-r--r--tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/wrong_checksum/content.xml402
-rw-r--r--tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/wrong_checksum/features/jarsigning.feature_0.0.1.201109191414.jarbin0 -> 3465 bytes
-rw-r--r--tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/wrong_checksum/plugins/jarsigning_0.0.1.201109191414.jarbin0 -> 3499 bytes
-rw-r--r--tycho-bundles/org.eclipse.tycho.p2.tools.tests/src/main/java/org/eclipse/tycho/p2/tools/mirroring/MirrorApplicationServiceTest.java2
-rw-r--r--tycho-bundles/org.eclipse.tycho.p2.tools.tests/src/main/java/org/eclipse/tycho/p2/tools/verfier/VerifierServiceImplTest.java114
-rw-r--r--tycho-its/projects/jar-signing/feature/build.properties1
-rw-r--r--tycho-its/projects/jar-signing/feature/feature.xml13
-rw-r--r--tycho-its/projects/jar-signing/feature/pom.xml14
-rw-r--r--tycho-its/projects/jar-signing/keystorebin0 -> 1313 bytes
-rw-r--r--tycho-its/projects/jar-signing/plugin/META-INF/MANIFEST.MF6
-rw-r--r--tycho-its/projects/jar-signing/plugin/build.properties4
-rw-r--r--tycho-its/projects/jar-signing/plugin/pom.xml14
-rw-r--r--tycho-its/projects/jar-signing/plugin/src/Dummy.java2
-rw-r--r--tycho-its/projects/jar-signing/pom.xml94
-rw-r--r--tycho-its/projects/jar-signing/rcp/category.xml4
-rw-r--r--tycho-its/projects/jar-signing/rcp/main.product10
-rw-r--r--tycho-its/projects/jar-signing/rcp/pom.xml65
-rw-r--r--tycho-its/src/test/java/org/eclipse/tycho/test/jarsigning/JarSigningTest.java28
-rw-r--r--tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/facade/internal/TychoP2RuntimeLocator.java3
-rw-r--r--tycho-p2/tycho-p2-repository-plugin/src/main/java/org/eclipse/tycho/plugins/p2/repository/VerifyIntegrityRepositoryMojo.java54
35 files changed, 1890 insertions, 5 deletions
diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/impl/publisher/P2GeneratorImpl.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/impl/publisher/P2GeneratorImpl.java
index b83d6c3..9f15641 100644
--- a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/impl/publisher/P2GeneratorImpl.java
+++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/impl/publisher/P2GeneratorImpl.java
@@ -76,7 +76,8 @@ public class P2GeneratorImpl extends AbstractMetadataGenerator implements P2Gene
// meta data handling for root files
if ("eclipse-feature".equals(artifact.getPackagingType())) {
- publisherInfo.setArtifactOptions(IPublisherInfo.A_INDEX | IPublisherInfo.A_PUBLISH);
+ publisherInfo.setArtifactOptions(IPublisherInfo.A_INDEX | IPublisherInfo.A_PUBLISH
+ | IPublisherInfo.A_NO_MD5);
FeatureRootfileArtifactRepository artifactsRepository = new FeatureRootfileArtifactRepository(
publisherInfo, targetDir);
publisherInfo.setArtifactRepository(artifactsRepository);
@@ -85,6 +86,7 @@ public class P2GeneratorImpl extends AbstractMetadataGenerator implements P2Gene
attachedArtifacts.putAll(artifactsRepository.getPublishedArtifacts());
} else {
+ publisherInfo.setArtifactOptions(IPublisherInfo.A_NO_MD5);
TransientArtifactRepository artifactsRepository = new TransientArtifactRepository();
publisherInfo.setArtifactRepository(artifactsRepository);
super.generateMetadata(artifact, null, units, artifactDescriptors, publisherInfo);
diff --git a/tycho-bundles/org.eclipse.tycho.p2.tools.facade/META-INF/MANIFEST.MF b/tycho-bundles/org.eclipse.tycho.p2.tools.facade/META-INF/MANIFEST.MF
index adc0c66..6586031 100644
--- a/tycho-bundles/org.eclipse.tycho.p2.tools.facade/META-INF/MANIFEST.MF
+++ b/tycho-bundles/org.eclipse.tycho.p2.tools.facade/META-INF/MANIFEST.MF
@@ -8,7 +8,8 @@ Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: org.eclipse.tycho.p2.tools,
org.eclipse.tycho.p2.tools.director.facade,
org.eclipse.tycho.p2.tools.mirroring.facade,
- org.eclipse.tycho.p2.tools.publisher.facade
+ org.eclipse.tycho.p2.tools.publisher.facade,
+ org.eclipse.tycho.p2.tools.verifier.facade
Import-Package: org.eclipse.tycho.core.facade,
org.eclipse.tycho.p2.repository,
org.eclipse.tycho.repository.registry.facade
diff --git a/tycho-bundles/org.eclipse.tycho.p2.tools.facade/src/main/java/org/eclipse/tycho/p2/tools/verifier/facade/VerifierService.java b/tycho-bundles/org.eclipse.tycho.p2.tools.facade/src/main/java/org/eclipse/tycho/p2/tools/verifier/facade/VerifierService.java
new file mode 100644
index 0000000..f31a902
--- /dev/null
+++ b/tycho-bundles/org.eclipse.tycho.p2.tools.facade/src/main/java/org/eclipse/tycho/p2/tools/verifier/facade/VerifierService.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2011 SAP AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tycho.p2.tools.verifier.facade;
+
+import java.net.URI;
+
+import org.eclipse.tycho.core.facade.MavenLogger;
+import org.eclipse.tycho.p2.tools.BuildContext;
+import org.eclipse.tycho.p2.tools.FacadeException;
+
+public interface VerifierService {
+
+ public abstract boolean verify(URI metadataRepositoryUri, URI artifactRepositoryUri, BuildContext context,
+ MavenLogger logger) throws FacadeException;
+
+}
diff --git a/tycho-bundles/org.eclipse.tycho.p2.tools.impl/META-INF/MANIFEST.MF b/tycho-bundles/org.eclipse.tycho.p2.tools.impl/META-INF/MANIFEST.MF
index 2934b35..16ed86b 100644
--- a/tycho-bundles/org.eclipse.tycho.p2.tools.impl/META-INF/MANIFEST.MF
+++ b/tycho-bundles/org.eclipse.tycho.p2.tools.impl/META-INF/MANIFEST.MF
@@ -22,10 +22,12 @@ Import-Package: org.eclipse.tycho.core.facade,
org.eclipse.tycho.p2.tools.director.facade,
org.eclipse.tycho.p2.tools.mirroring.facade,
org.eclipse.tycho.p2.tools.publisher.facade,
+ org.eclipse.tycho.p2.tools.verifier.facade,
org.eclipse.tycho.p2.util,
org.eclipse.tycho.repository.registry.facade,
org.osgi.framework;version="[1.5.0,2.0.0)"
-Service-Component: OSGI-INF/directorapp.xml, OSGI-INF/publisherfactory.xml, OSGI-INF/mirrorapp.xml
+Service-Component: OSGI-INF/directorapp.xml, OSGI-INF/publisherfactory.xml, OSGI-INF/mirrorapp.xml,
+ OSGI-INF/verifierservice.xml
Bundle-Activator: org.eclipse.tycho.p2.tools.impl.Activator
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
diff --git a/tycho-bundles/org.eclipse.tycho.p2.tools.impl/OSGI-INF/verifierservice.xml b/tycho-bundles/org.eclipse.tycho.p2.tools.impl/OSGI-INF/verifierservice.xml
new file mode 100644
index 0000000..436146c
--- /dev/null
+++ b/tycho-bundles/org.eclipse.tycho.p2.tools.impl/OSGI-INF/verifierservice.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0">
+ <implementation class="org.eclipse.tycho.p2.tools.verifier.VerifierServiceImpl"/>
+ <service>
+ <provide interface="org.eclipse.tycho.p2.tools.verifier.facade.VerifierService"/>
+ </service>
+</scr:component>
diff --git a/tycho-bundles/org.eclipse.tycho.p2.tools.impl/src/main/java/org/eclipse/tycho/p2/tools/verifier/VerifierServiceImpl.java b/tycho-bundles/org.eclipse.tycho.p2.tools.impl/src/main/java/org/eclipse/tycho/p2/tools/verifier/VerifierServiceImpl.java
new file mode 100644
index 0000000..25af8fd
--- /dev/null
+++ b/tycho-bundles/org.eclipse.tycho.p2.tools.impl/src/main/java/org/eclipse/tycho/p2/tools/verifier/VerifierServiceImpl.java
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2011 SAP AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tycho.p2.tools.verifier;
+
+import java.io.ByteArrayOutputStream;
+import java.net.URI;
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.tycho.core.facade.MavenLogger;
+import org.eclipse.tycho.p2.tools.BuildContext;
+import org.eclipse.tycho.p2.tools.FacadeException;
+import org.eclipse.tycho.p2.tools.impl.Activator;
+import org.eclipse.tycho.p2.tools.verifier.facade.VerifierService;
+
+public class VerifierServiceImpl implements VerifierService {
+
+ private final NullProgressMonitor monitor = new NullProgressMonitor();
+
+ public boolean verify(URI metadataRepositoryUri, URI artifactRepositoryUri, BuildContext context, MavenLogger logger)
+ throws FacadeException {
+ logger.debug("Verifying metadata from " + metadataRepositoryUri + " with artifcats from "
+ + artifactRepositoryUri);
+ IProvisioningAgent agent = Activator.createProvisioningAgent(context.getTargetDirectory());
+ try {
+ try {
+ final IMetadataRepository metadata = loadMetadataRepository(metadataRepositoryUri, agent);
+ final IArtifactRepository artifactRepository = loadArtifactRepository(artifactRepositoryUri, agent);
+ final IQueryResult<IInstallableUnit> collector = metadata.query(QueryUtil.ALL_UNITS, monitor);
+ boolean valid = true;
+ for (Iterator<IInstallableUnit> iterator = collector.iterator(); iterator.hasNext();) {
+ IInstallableUnit iu = iterator.next();
+ final Collection<IArtifactKey> artifacts = iu.getArtifacts();
+ for (IArtifactKey key : artifacts) {
+ valid = valid && verifySingleArtifact(key, artifactRepository, logger);
+ }
+ }
+ if (valid) {
+ logger.info("The integrity of the metadata repository '" + metadataRepositoryUri
+ + "' and artifact repository '" + artifactRepositoryUri
+ + "' has been verified successfully");
+ }
+ return valid;
+ } catch (ProvisionException e) {
+ throw new FacadeException(e);
+ }
+ } finally {
+ agent.stop();
+ }
+ }
+
+ private boolean verifySingleArtifact(IArtifactKey key, IArtifactRepository repository, MavenLogger logger) {
+ boolean valid = true;
+ final IArtifactDescriptor[] descriptors = repository.getArtifactDescriptors(key);
+ for (IArtifactDescriptor descriptor : descriptors) {
+ final IStatus status = repository.getArtifact(descriptor, new ByteArrayOutputStream(), monitor);
+ if (!status.isOK()) {
+ logErrorStatus(status, "", logger);
+ }
+ valid = valid && status.isOK();
+ }
+ return valid;
+ }
+
+ private void logErrorStatus(IStatus status, String indent, MavenLogger logger) {
+ final Throwable exception = status.getException();
+ if (exception == null) {
+ logger.error(indent + status.getMessage());
+ } else {
+ logger.error(indent + status.getMessage() + ": " + exception.getLocalizedMessage());
+ }
+ for (IStatus kid : status.getChildren()) {
+ logErrorStatus(kid, indent + " ", logger);
+ }
+ }
+
+ private IMetadataRepository loadMetadataRepository(URI metadataRepository, IProvisioningAgent agent)
+ throws ProvisionException {
+ final IMetadataRepositoryManager repositoryManager = (IMetadataRepositoryManager) agent
+ .getService(IMetadataRepositoryManager.SERVICE_NAME);
+ return repositoryManager.loadRepository(metadataRepository, monitor);
+ }
+
+ private IArtifactRepository loadArtifactRepository(URI artifactRepository, IProvisioningAgent agent)
+ throws ProvisionException {
+ final IArtifactRepositoryManager repositoryManager = (IArtifactRepositoryManager) agent
+ .getService(IArtifactRepositoryManager.SERVICE_NAME);
+ return repositoryManager.loadRepository(artifactRepository, monitor);
+ }
+
+}
diff --git a/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/selfsigned/artifacts.xml b/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/selfsigned/artifacts.xml
new file mode 100644
index 0000000..e987418
--- /dev/null
+++ b/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/selfsigned/artifacts.xml
@@ -0,0 +1,36 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<?artifactRepository version='1.1.0'?>
+<repository name='jarsigning.rcp' type='org.eclipse.equinox.p2.artifact.repository.simpleRepository' version='1'>
+ <properties size='2'>
+ <property name='p2.timestamp' value='1316441695413'/>
+ <property name='p2.compressed' value='true'/>
+ </properties>
+ <mappings size='3'>
+ <rule filter='(&amp; (classifier=osgi.bundle))' output='${repoUrl}/plugins/${id}_${version}.jar'/>
+ <rule filter='(&amp; (classifier=binary))' output='${repoUrl}/binary/${id}_${version}'/>
+ <rule filter='(&amp; (classifier=org.eclipse.update.feature))' output='${repoUrl}/features/${id}_${version}.jar'/>
+ </mappings>
+ <artifacts size='2'>
+ <artifact classifier='osgi.bundle' id='jarsigning' version='0.0.1.201109191414'>
+ <properties size='6'>
+ <property name='artifact.size' value='2087'/>
+ <property name='download.size' value='3499'/>
+ <property name='download.md5' value='aa8a2c6ca14437854f69a854aa4be626'/>
+ <property name='maven-groupId' value='org.eclipse.tycho.its.selfsignedcert'/>
+ <property name='maven-artifactId' value='jarsigning'/>
+ <property name='maven-version' value='0.0.1-SNAPSHOT'/>
+ </properties>
+ </artifact>
+ <artifact classifier='org.eclipse.update.feature' id='jarsigning.feature' version='0.0.1.201109191414'>
+ <properties size='7'>
+ <property name='artifact.size' value='2037'/>
+ <property name='download.size' value='3465'/>
+ <property name='download.md5' value='3a18adcf04421de451135a3b94ff497f'/>
+ <property name='maven-groupId' value='org.eclipse.tycho.its.selfsignedcert'/>
+ <property name='maven-artifactId' value='jarsigning.feature'/>
+ <property name='maven-version' value='0.0.1-SNAPSHOT'/>
+ <property name='download.contentType' value='application/zip'/>
+ </properties>
+ </artifact>
+ </artifacts>
+</repository>
diff --git a/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/selfsigned/content.xml b/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/selfsigned/content.xml
new file mode 100644
index 0000000..b395853
--- /dev/null
+++ b/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/selfsigned/content.xml
@@ -0,0 +1,402 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<?metadataRepository version='1.1.0'?>
+<repository name='jarsigning.rcp' type='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1'>
+ <properties size='2'>
+ <property name='p2.timestamp' value='1316441695446'/>
+ <property name='p2.compressed' value='true'/>
+ </properties>
+ <units size='11'>
+ <unit id='tooling.source.default' version='1.0.0' singleton='false'>
+ <hostRequirements size='1'>
+ <required namespace='org.eclipse.equinox.p2.eclipse.type' name='source' range='0.0.0' optional='true' multiple='true' greedy='false'/>
+ </hostRequirements>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.type.fragment' value='true'/>
+ </properties>
+ <provides size='2'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='tooling.source.default' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.flavor' name='tooling' version='1.0.0'/>
+ </provides>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.eclipse.type' name='source' range='0.0.0' optional='true' multiple='true' greedy='false'/>
+ </requires>
+ <touchpoint id='null' version='0.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='2'>
+ <instruction key='install'>
+ addSourceBundle(bundle:${artifact})
+ </instruction>
+ <instruction key='uninstall'>
+ removeSourceBundle(bundle:${artifact})
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='jarsigning.feature.feature.group' version='0.0.1.201109191414' singleton='false'>
+ <update id='jarsigning.feature.feature.group' range='[0.0.0,0.0.1.201109191414)' severity='0'/>
+ <properties size='5'>
+ <property name='org.eclipse.equinox.p2.name' value='OSGi Jarsigning Example Feature'/>
+ <property name='org.eclipse.equinox.p2.type.group' value='true'/>
+ <property name='maven-groupId' value='org.eclipse.tycho.its.selfsignedcert'/>
+ <property name='maven-artifactId' value='jarsigning.feature'/>
+ <property name='maven-version' value='0.0.1-SNAPSHOT'/>
+ </properties>
+ <provides size='1'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='jarsigning.feature.feature.group' version='0.0.1.201109191414'/>
+ </provides>
+ <requires size='2'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='jarsigning' range='[0.0.1.201109191414,0.0.1.201109191414]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='jarsigning.feature.feature.jar' range='[0.0.1.201109191414,0.0.1.201109191414]'>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
+ </required>
+ </requires>
+ <touchpoint id='null' version='0.0.0'/>
+ </unit>
+ <unit id='a.jre.javase' version='1.6.0' singleton='false'>
+ <provides size='159'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='a.jre.javase' version='1.6.0'/>
+ <provided namespace='java.package' name='javax.accessibility' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.activation' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.activity' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.annotation' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.annotation.processing' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.crypto' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.crypto.interfaces' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.crypto.spec' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.imageio' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.imageio.event' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.imageio.metadata' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.imageio.plugins.bmp' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.imageio.plugins.jpeg' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.imageio.spi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.imageio.stream' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.jws' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.jws.soap' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.lang.model' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.lang.model.element' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.lang.model.type' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.lang.model.util' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.loading' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.modelmbean' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.monitor' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.openmbean' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.relation' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.remote' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.remote.rmi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.timer' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.naming' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.naming.directory' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.naming.event' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.naming.ldap' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.naming.spi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.net' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.net.ssl' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.print' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.print.attribute' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.print.attribute.standard' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.print.event' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.rmi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.rmi.CORBA' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.rmi.ssl' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.script' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.auth' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.auth.callback' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.auth.kerberos' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.auth.login' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.auth.spi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.auth.x500' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.cert' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.sasl' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sound.midi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sound.midi.spi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sound.sampled' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sound.sampled.spi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sql' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sql.rowset' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sql.rowset.serial' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sql.rowset.spi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.border' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.colorchooser' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.event' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.filechooser' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.plaf' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.plaf.basic' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.plaf.metal' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.plaf.multi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.plaf.synth' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.table' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.text' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.text.html' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.text.html.parser' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.text.rtf' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.tree' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.undo' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.tools' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.transaction' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.transaction.xa' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.bind' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.bind.annotation' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.bind.annotation.adapters' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.bind.attachment' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.bind.helpers' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.bind.util' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.crypto' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.crypto.dom' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.crypto.dsig' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.crypto.dsig.dom' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.crypto.dsig.keyinfo' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.crypto.dsig.spec' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.datatype' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.namespace' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.parsers' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.soap' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.stream' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.stream.events' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.stream.util' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.transform' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.transform.dom' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.transform.sax' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.transform.stax' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.transform.stream' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.validation' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.ws' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.ws.handler' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.ws.handler.soap' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.ws.http' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.ws.soap' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.ws.spi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.ws.wsaddressing' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.xpath' version='0.0.0'/>
+ <provided namespace='java.package' name='org.ietf.jgss' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CORBA' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CORBA_2_3' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CORBA_2_3.portable' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CORBA.DynAnyPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CORBA.ORBPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CORBA.portable' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CORBA.TypeCodePackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CosNaming' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CosNaming.NamingContextExtPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CosNaming.NamingContextPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.Dynamic' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.DynamicAny' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.DynamicAny.DynAnyFactoryPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.DynamicAny.DynAnyPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.IOP' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.IOP.CodecFactoryPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.IOP.CodecPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.Messaging' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableInterceptor' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableInterceptor.ORBInitInfoPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableServer' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableServer.CurrentPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableServer.POAManagerPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableServer.POAPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableServer.portable' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableServer.ServantLocatorPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.SendingContext' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.stub.java.rmi' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.bootstrap' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.css' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.events' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.html' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.ls' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.ranges' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.stylesheets' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.traversal' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.views' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.xpath' version='0.0.0'/>
+ <provided namespace='java.package' name='org.xml.sax' version='0.0.0'/>
+ <provided namespace='java.package' name='org.xml.sax.ext' version='0.0.0'/>
+ <provided namespace='java.package' name='org.xml.sax.helpers' version='0.0.0'/>
+ </provides>
+ <touchpoint id='org.eclipse.equinox.p2.native' version='1.0.0'/>
+ </unit>
+ <unit id='201109191414.Default' version='1.0.0.0-1d4rCo-773553K5K5A5A'>
+ <properties size='3'>
+ <property name='org.eclipse.equinox.p2.name' value='Uncategorized'/>
+ <property name='org.eclipse.equinox.p2.description' value='Default category for otherwise uncategorized features'/>
+ <property name='org.eclipse.equinox.p2.type.category' value='true'/>
+ </properties>
+ <provides size='1'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='201109191414.Default' version='1.0.0.0-1d4rCo-773553K5K5A5A'/>
+ </provides>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='jarsigning.feature.feature.group' range='[0.0.1.201109191414,0.0.1.201109191414]'/>
+ </requires>
+ <touchpoint id='null' version='0.0.0'/>
+ </unit>
+ <unit id='jarsigning' version='0.0.1.201109191414' singleton='false'>
+ <update id='jarsigning' range='[0.0.0,0.0.1.201109191414)' severity='0'/>
+ <properties size='4'>
+ <property name='org.eclipse.equinox.p2.name' value='OSGi Jarsigning Example Bundle'/>
+ <property name='maven-groupId' value='org.eclipse.tycho.its.selfsignedcert'/>
+ <property name='maven-artifactId' value='jarsigning'/>
+ <property name='maven-version' value='0.0.1-SNAPSHOT'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='jarsigning' version='0.0.1.201109191414'/>
+ <provided namespace='osgi.bundle' name='jarsigning' version='0.0.1.201109191414'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
+ </provides>
+ <artifacts size='1'>
+ <artifact classifier='osgi.bundle' id='jarsigning' version='0.0.1.201109191414'/>
+ </artifacts>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='manifest'>
+ Bundle-SymbolicName: jarsigning&#xA;Bundle-Version: 0.0.1.201109191414
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='tooling.osgi.bundle.default' version='1.0.0' singleton='false'>
+ <hostRequirements size='1'>
+ <required namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' range='0.0.0' multiple='true' greedy='false'/>
+ </hostRequirements>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.type.fragment' value='true'/>
+ </properties>
+ <provides size='2'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='tooling.osgi.bundle.default' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.flavor' name='tooling' version='1.0.0'/>
+ </provides>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' range='0.0.0' multiple='true' greedy='false'/>
+ </requires>
+ <touchpoint id='null' version='0.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='4'>
+ <instruction key='install'>
+ installBundle(bundle:${artifact})
+ </instruction>
+ <instruction key='uninstall'>
+ uninstallBundle(bundle:${artifact})
+ </instruction>
+ <instruction key='unconfigure'>
+
+ </instruction>
+ <instruction key='configure'>
+ setStartLevel(startLevel:4);
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='toolingjarsigning.product.configuration' version='0.0.1.201109191414'>
+ <provides size='1'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='toolingjarsigning.product.configuration' version='0.0.1.201109191414'/>
+ </provides>
+ <touchpoint id='null' version='0.0.0'/>
+ </unit>
+ <unit id='tooling.org.eclipse.update.feature.default' version='1.0.0' singleton='false'>
+ <hostRequirements size='1'>
+ <required namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' range='0.0.0' optional='true' multiple='true' greedy='false'/>
+ </hostRequirements>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.type.fragment' value='true'/>
+ </properties>
+ <provides size='2'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='tooling.org.eclipse.update.feature.default' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.flavor' name='tooling' version='1.0.0'/>
+ </provides>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' range='0.0.0' optional='true' multiple='true' greedy='false'/>
+ </requires>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
+ <touchpoint id='null' version='0.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='2'>
+ <instruction key='install'>
+ installFeature(feature:${artifact},featureId:default,featureVersion:default)
+ </instruction>
+ <instruction key='uninstall'>
+ uninstallFeature(feature:${artifact},featureId:default,featureVersion:default)
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='jarsigning.feature.feature.jar' version='0.0.1.201109191414'>
+ <properties size='4'>
+ <property name='org.eclipse.equinox.p2.name' value='OSGi Jarsigning Example Feature'/>
+ <property name='maven-groupId' value='org.eclipse.tycho.its.selfsignedcert'/>
+ <property name='maven-artifactId' value='jarsigning.feature'/>
+ <property name='maven-version' value='0.0.1-SNAPSHOT'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='jarsigning.feature.feature.jar' version='0.0.1.201109191414'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' version='1.0.0'/>
+ <provided namespace='org.eclipse.update.feature' name='jarsigning.feature' version='0.0.1.201109191414'/>
+ </provides>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
+ <artifacts size='1'>
+ <artifact classifier='org.eclipse.update.feature' id='jarsigning.feature' version='0.0.1.201109191414'/>
+ </artifacts>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='zipped'>
+ true
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='jarsigning.product' version='0.0.1.201109191414'>
+ <update id='jarsigning.product' range='0.0.0' severity='0'/>
+ <properties size='3'>
+ <property name='org.eclipse.equinox.p2.name' value='Main Product'/>
+ <property name='lineUp' value='true'/>
+ <property name='org.eclipse.equinox.p2.type.group' value='true'/>
+ </properties>
+ <provides size='1'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='jarsigning.product' version='0.0.1.201109191414'/>
+ </provides>
+ <requires size='7'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='tooling.source.default' range='[1.0.0,1.0.0]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='a.jre.javase' range='[1.6.0,1.6.0]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='jarsigning.feature.feature.group' range='[0.0.1.201109191414,0.0.1.201109191414]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='tooling.osgi.bundle.default' range='[1.0.0,1.0.0]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='toolingjarsigning.product.configuration' range='[0.0.1.201109191414,0.0.1.201109191414]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='tooling.org.eclipse.update.feature.default' range='[1.0.0,1.0.0]'>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
+ </required>
+ <required namespace='org.eclipse.equinox.p2.iu' name='config.a.jre.javase' range='[1.6.0,1.6.0]'/>
+ </requires>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ </unit>
+ <unit id='config.a.jre.javase' version='1.6.0' singleton='false'>
+ <hostRequirements size='1'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='a.jre.javase' range='1.6.0'/>
+ </hostRequirements>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.type.fragment' value='true'/>
+ </properties>
+ <provides size='1'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='config.a.jre.javase' version='1.6.0'/>
+ </provides>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='a.jre.javase' range='1.6.0'/>
+ </requires>
+ <touchpoint id='org.eclipse.equinox.p2.native' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='install'>
+
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ </units>
+</repository>
diff --git a/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/selfsigned/features/jarsigning.feature_0.0.1.201109191414.jar b/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/selfsigned/features/jarsigning.feature_0.0.1.201109191414.jar
new file mode 100644
index 0000000..bb51e6b
--- /dev/null
+++ b/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/selfsigned/features/jarsigning.feature_0.0.1.201109191414.jar
Binary files differ
diff --git a/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/selfsigned/plugins/jarsigning_0.0.1.201109191414.jar b/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/selfsigned/plugins/jarsigning_0.0.1.201109191414.jar
new file mode 100644
index 0000000..e100e17
--- /dev/null
+++ b/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/selfsigned/plugins/jarsigning_0.0.1.201109191414.jar
Binary files differ
diff --git a/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/tampered_file/artifacts.xml b/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/tampered_file/artifacts.xml
new file mode 100644
index 0000000..1c4ff48
--- /dev/null
+++ b/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/tampered_file/artifacts.xml
@@ -0,0 +1,35 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<?artifactRepository version='1.1.0'?>
+<repository name='jarsigning.rcp' type='org.eclipse.equinox.p2.artifact.repository.simpleRepository' version='1'>
+ <properties size='2'>
+ <property name='p2.timestamp' value='1316441695413'/>
+ <property name='p2.compressed' value='true'/>
+ </properties>
+ <mappings size='3'>
+ <rule filter='(&amp; (classifier=osgi.bundle))' output='${repoUrl}/plugins/${id}_${version}.jar'/>
+ <rule filter='(&amp; (classifier=binary))' output='${repoUrl}/binary/${id}_${version}'/>
+ <rule filter='(&amp; (classifier=org.eclipse.update.feature))' output='${repoUrl}/features/${id}_${version}.jar'/>
+ </mappings>
+ <artifacts size='2'>
+ <artifact classifier='osgi.bundle' id='jarsigning' version='0.0.1.201109191414'>
+ <properties size='6'>
+ <property name='artifact.size' value='2087'/>
+ <property name='download.size' value='3499'/>
+ <property name='maven-groupId' value='org.eclipse.tycho.its.selfsignedcert'/>
+ <property name='maven-artifactId' value='jarsigning'/>
+ <property name='maven-version' value='0.0.1-SNAPSHOT'/>
+ </properties>
+ </artifact>
+ <artifact classifier='org.eclipse.update.feature' id='jarsigning.feature' version='0.0.1.201109191414'>
+ <properties size='7'>
+ <property name='artifact.size' value='2037'/>
+ <property name='download.size' value='3465'/>
+ <property name='download.md5' value='3a18adcf04421de451135a3b94ff497f'/>
+ <property name='maven-groupId' value='org.eclipse.tycho.its.selfsignedcert'/>
+ <property name='maven-artifactId' value='jarsigning.feature'/>
+ <property name='maven-version' value='0.0.1-SNAPSHOT'/>
+ <property name='download.contentType' value='application/zip'/>
+ </properties>
+ </artifact>
+ </artifacts>
+</repository>
diff --git a/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/tampered_file/content.xml b/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/tampered_file/content.xml
new file mode 100644
index 0000000..b395853
--- /dev/null
+++ b/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/tampered_file/content.xml
@@ -0,0 +1,402 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<?metadataRepository version='1.1.0'?>
+<repository name='jarsigning.rcp' type='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1'>
+ <properties size='2'>
+ <property name='p2.timestamp' value='1316441695446'/>
+ <property name='p2.compressed' value='true'/>
+ </properties>
+ <units size='11'>
+ <unit id='tooling.source.default' version='1.0.0' singleton='false'>
+ <hostRequirements size='1'>
+ <required namespace='org.eclipse.equinox.p2.eclipse.type' name='source' range='0.0.0' optional='true' multiple='true' greedy='false'/>
+ </hostRequirements>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.type.fragment' value='true'/>
+ </properties>
+ <provides size='2'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='tooling.source.default' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.flavor' name='tooling' version='1.0.0'/>
+ </provides>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.eclipse.type' name='source' range='0.0.0' optional='true' multiple='true' greedy='false'/>
+ </requires>
+ <touchpoint id='null' version='0.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='2'>
+ <instruction key='install'>
+ addSourceBundle(bundle:${artifact})
+ </instruction>
+ <instruction key='uninstall'>
+ removeSourceBundle(bundle:${artifact})
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='jarsigning.feature.feature.group' version='0.0.1.201109191414' singleton='false'>
+ <update id='jarsigning.feature.feature.group' range='[0.0.0,0.0.1.201109191414)' severity='0'/>
+ <properties size='5'>
+ <property name='org.eclipse.equinox.p2.name' value='OSGi Jarsigning Example Feature'/>
+ <property name='org.eclipse.equinox.p2.type.group' value='true'/>
+ <property name='maven-groupId' value='org.eclipse.tycho.its.selfsignedcert'/>
+ <property name='maven-artifactId' value='jarsigning.feature'/>
+ <property name='maven-version' value='0.0.1-SNAPSHOT'/>
+ </properties>
+ <provides size='1'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='jarsigning.feature.feature.group' version='0.0.1.201109191414'/>
+ </provides>
+ <requires size='2'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='jarsigning' range='[0.0.1.201109191414,0.0.1.201109191414]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='jarsigning.feature.feature.jar' range='[0.0.1.201109191414,0.0.1.201109191414]'>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
+ </required>
+ </requires>
+ <touchpoint id='null' version='0.0.0'/>
+ </unit>
+ <unit id='a.jre.javase' version='1.6.0' singleton='false'>
+ <provides size='159'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='a.jre.javase' version='1.6.0'/>
+ <provided namespace='java.package' name='javax.accessibility' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.activation' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.activity' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.annotation' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.annotation.processing' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.crypto' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.crypto.interfaces' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.crypto.spec' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.imageio' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.imageio.event' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.imageio.metadata' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.imageio.plugins.bmp' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.imageio.plugins.jpeg' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.imageio.spi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.imageio.stream' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.jws' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.jws.soap' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.lang.model' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.lang.model.element' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.lang.model.type' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.lang.model.util' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.loading' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.modelmbean' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.monitor' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.openmbean' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.relation' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.remote' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.remote.rmi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.timer' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.naming' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.naming.directory' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.naming.event' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.naming.ldap' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.naming.spi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.net' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.net.ssl' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.print' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.print.attribute' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.print.attribute.standard' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.print.event' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.rmi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.rmi.CORBA' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.rmi.ssl' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.script' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.auth' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.auth.callback' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.auth.kerberos' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.auth.login' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.auth.spi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.auth.x500' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.cert' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.sasl' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sound.midi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sound.midi.spi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sound.sampled' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sound.sampled.spi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sql' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sql.rowset' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sql.rowset.serial' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sql.rowset.spi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.border' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.colorchooser' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.event' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.filechooser' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.plaf' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.plaf.basic' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.plaf.metal' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.plaf.multi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.plaf.synth' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.table' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.text' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.text.html' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.text.html.parser' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.text.rtf' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.tree' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.undo' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.tools' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.transaction' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.transaction.xa' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.bind' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.bind.annotation' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.bind.annotation.adapters' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.bind.attachment' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.bind.helpers' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.bind.util' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.crypto' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.crypto.dom' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.crypto.dsig' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.crypto.dsig.dom' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.crypto.dsig.keyinfo' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.crypto.dsig.spec' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.datatype' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.namespace' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.parsers' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.soap' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.stream' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.stream.events' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.stream.util' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.transform' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.transform.dom' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.transform.sax' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.transform.stax' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.transform.stream' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.validation' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.ws' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.ws.handler' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.ws.handler.soap' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.ws.http' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.ws.soap' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.ws.spi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.ws.wsaddressing' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.xpath' version='0.0.0'/>
+ <provided namespace='java.package' name='org.ietf.jgss' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CORBA' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CORBA_2_3' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CORBA_2_3.portable' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CORBA.DynAnyPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CORBA.ORBPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CORBA.portable' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CORBA.TypeCodePackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CosNaming' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CosNaming.NamingContextExtPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CosNaming.NamingContextPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.Dynamic' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.DynamicAny' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.DynamicAny.DynAnyFactoryPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.DynamicAny.DynAnyPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.IOP' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.IOP.CodecFactoryPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.IOP.CodecPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.Messaging' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableInterceptor' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableInterceptor.ORBInitInfoPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableServer' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableServer.CurrentPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableServer.POAManagerPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableServer.POAPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableServer.portable' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableServer.ServantLocatorPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.SendingContext' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.stub.java.rmi' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.bootstrap' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.css' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.events' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.html' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.ls' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.ranges' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.stylesheets' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.traversal' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.views' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.xpath' version='0.0.0'/>
+ <provided namespace='java.package' name='org.xml.sax' version='0.0.0'/>
+ <provided namespace='java.package' name='org.xml.sax.ext' version='0.0.0'/>
+ <provided namespace='java.package' name='org.xml.sax.helpers' version='0.0.0'/>
+ </provides>
+ <touchpoint id='org.eclipse.equinox.p2.native' version='1.0.0'/>
+ </unit>
+ <unit id='201109191414.Default' version='1.0.0.0-1d4rCo-773553K5K5A5A'>
+ <properties size='3'>
+ <property name='org.eclipse.equinox.p2.name' value='Uncategorized'/>
+ <property name='org.eclipse.equinox.p2.description' value='Default category for otherwise uncategorized features'/>
+ <property name='org.eclipse.equinox.p2.type.category' value='true'/>
+ </properties>
+ <provides size='1'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='201109191414.Default' version='1.0.0.0-1d4rCo-773553K5K5A5A'/>
+ </provides>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='jarsigning.feature.feature.group' range='[0.0.1.201109191414,0.0.1.201109191414]'/>
+ </requires>
+ <touchpoint id='null' version='0.0.0'/>
+ </unit>
+ <unit id='jarsigning' version='0.0.1.201109191414' singleton='false'>
+ <update id='jarsigning' range='[0.0.0,0.0.1.201109191414)' severity='0'/>
+ <properties size='4'>
+ <property name='org.eclipse.equinox.p2.name' value='OSGi Jarsigning Example Bundle'/>
+ <property name='maven-groupId' value='org.eclipse.tycho.its.selfsignedcert'/>
+ <property name='maven-artifactId' value='jarsigning'/>
+ <property name='maven-version' value='0.0.1-SNAPSHOT'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='jarsigning' version='0.0.1.201109191414'/>
+ <provided namespace='osgi.bundle' name='jarsigning' version='0.0.1.201109191414'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
+ </provides>
+ <artifacts size='1'>
+ <artifact classifier='osgi.bundle' id='jarsigning' version='0.0.1.201109191414'/>
+ </artifacts>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='manifest'>
+ Bundle-SymbolicName: jarsigning&#xA;Bundle-Version: 0.0.1.201109191414
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='tooling.osgi.bundle.default' version='1.0.0' singleton='false'>
+ <hostRequirements size='1'>
+ <required namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' range='0.0.0' multiple='true' greedy='false'/>
+ </hostRequirements>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.type.fragment' value='true'/>
+ </properties>
+ <provides size='2'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='tooling.osgi.bundle.default' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.flavor' name='tooling' version='1.0.0'/>
+ </provides>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' range='0.0.0' multiple='true' greedy='false'/>
+ </requires>
+ <touchpoint id='null' version='0.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='4'>
+ <instruction key='install'>
+ installBundle(bundle:${artifact})
+ </instruction>
+ <instruction key='uninstall'>
+ uninstallBundle(bundle:${artifact})
+ </instruction>
+ <instruction key='unconfigure'>
+
+ </instruction>
+ <instruction key='configure'>
+ setStartLevel(startLevel:4);
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='toolingjarsigning.product.configuration' version='0.0.1.201109191414'>
+ <provides size='1'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='toolingjarsigning.product.configuration' version='0.0.1.201109191414'/>
+ </provides>
+ <touchpoint id='null' version='0.0.0'/>
+ </unit>
+ <unit id='tooling.org.eclipse.update.feature.default' version='1.0.0' singleton='false'>
+ <hostRequirements size='1'>
+ <required namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' range='0.0.0' optional='true' multiple='true' greedy='false'/>
+ </hostRequirements>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.type.fragment' value='true'/>
+ </properties>
+ <provides size='2'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='tooling.org.eclipse.update.feature.default' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.flavor' name='tooling' version='1.0.0'/>
+ </provides>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' range='0.0.0' optional='true' multiple='true' greedy='false'/>
+ </requires>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
+ <touchpoint id='null' version='0.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='2'>
+ <instruction key='install'>
+ installFeature(feature:${artifact},featureId:default,featureVersion:default)
+ </instruction>
+ <instruction key='uninstall'>
+ uninstallFeature(feature:${artifact},featureId:default,featureVersion:default)
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='jarsigning.feature.feature.jar' version='0.0.1.201109191414'>
+ <properties size='4'>
+ <property name='org.eclipse.equinox.p2.name' value='OSGi Jarsigning Example Feature'/>
+ <property name='maven-groupId' value='org.eclipse.tycho.its.selfsignedcert'/>
+ <property name='maven-artifactId' value='jarsigning.feature'/>
+ <property name='maven-version' value='0.0.1-SNAPSHOT'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='jarsigning.feature.feature.jar' version='0.0.1.201109191414'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' version='1.0.0'/>
+ <provided namespace='org.eclipse.update.feature' name='jarsigning.feature' version='0.0.1.201109191414'/>
+ </provides>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
+ <artifacts size='1'>
+ <artifact classifier='org.eclipse.update.feature' id='jarsigning.feature' version='0.0.1.201109191414'/>
+ </artifacts>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='zipped'>
+ true
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='jarsigning.product' version='0.0.1.201109191414'>
+ <update id='jarsigning.product' range='0.0.0' severity='0'/>
+ <properties size='3'>
+ <property name='org.eclipse.equinox.p2.name' value='Main Product'/>
+ <property name='lineUp' value='true'/>
+ <property name='org.eclipse.equinox.p2.type.group' value='true'/>
+ </properties>
+ <provides size='1'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='jarsigning.product' version='0.0.1.201109191414'/>
+ </provides>
+ <requires size='7'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='tooling.source.default' range='[1.0.0,1.0.0]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='a.jre.javase' range='[1.6.0,1.6.0]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='jarsigning.feature.feature.group' range='[0.0.1.201109191414,0.0.1.201109191414]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='tooling.osgi.bundle.default' range='[1.0.0,1.0.0]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='toolingjarsigning.product.configuration' range='[0.0.1.201109191414,0.0.1.201109191414]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='tooling.org.eclipse.update.feature.default' range='[1.0.0,1.0.0]'>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
+ </required>
+ <required namespace='org.eclipse.equinox.p2.iu' name='config.a.jre.javase' range='[1.6.0,1.6.0]'/>
+ </requires>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ </unit>
+ <unit id='config.a.jre.javase' version='1.6.0' singleton='false'>
+ <hostRequirements size='1'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='a.jre.javase' range='1.6.0'/>
+ </hostRequirements>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.type.fragment' value='true'/>
+ </properties>
+ <provides size='1'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='config.a.jre.javase' version='1.6.0'/>
+ </provides>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='a.jre.javase' range='1.6.0'/>
+ </requires>
+ <touchpoint id='org.eclipse.equinox.p2.native' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='install'>
+
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ </units>
+</repository>
diff --git a/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/tampered_file/features/jarsigning.feature_0.0.1.201109191414.jar b/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/tampered_file/features/jarsigning.feature_0.0.1.201109191414.jar
new file mode 100644
index 0000000..bb51e6b
--- /dev/null
+++ b/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/tampered_file/features/jarsigning.feature_0.0.1.201109191414.jar
Binary files differ
diff --git a/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/tampered_file/plugins/jarsigning_0.0.1.201109191414.jar b/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/tampered_file/plugins/jarsigning_0.0.1.201109191414.jar
new file mode 100644
index 0000000..d8335ff
--- /dev/null
+++ b/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/tampered_file/plugins/jarsigning_0.0.1.201109191414.jar
Binary files differ
diff --git a/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/wrong_checksum/artifacts.xml b/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/wrong_checksum/artifacts.xml
new file mode 100644
index 0000000..9cd6896
--- /dev/null
+++ b/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/wrong_checksum/artifacts.xml
@@ -0,0 +1,36 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<?artifactRepository version='1.1.0'?>
+<repository name='jarsigning.rcp' type='org.eclipse.equinox.p2.artifact.repository.simpleRepository' version='1'>
+ <properties size='2'>
+ <property name='p2.timestamp' value='1316441695413'/>
+ <property name='p2.compressed' value='true'/>
+ </properties>
+ <mappings size='3'>
+ <rule filter='(&amp; (classifier=osgi.bundle))' output='${repoUrl}/plugins/${id}_${version}.jar'/>
+ <rule filter='(&amp; (classifier=binary))' output='${repoUrl}/binary/${id}_${version}'/>
+ <rule filter='(&amp; (classifier=org.eclipse.update.feature))' output='${repoUrl}/features/${id}_${version}.jar'/>
+ </mappings>
+ <artifacts size='2'>
+ <artifact classifier='osgi.bundle' id='jarsigning' version='0.0.1.201109191414'>
+ <properties size='6'>
+ <property name='artifact.size' value='2087'/>
+ <property name='download.size' value='3499'/>
+ <property name='download.md5' value='dc387e4ed978d97b5405d1ead0d2c28f'/>
+ <property name='maven-groupId' value='org.eclipse.tycho.its.selfsignedcert'/>
+ <property name='maven-artifactId' value='jarsigning'/>
+ <property name='maven-version' value='0.0.1-SNAPSHOT'/>
+ </properties>
+ </artifact>
+ <artifact classifier='org.eclipse.update.feature' id='jarsigning.feature' version='0.0.1.201109191414'>
+ <properties size='7'>
+ <property name='artifact.size' value='2037'/>
+ <property name='download.size' value='3465'/>
+ <property name='download.md5' value='6d8517af2e71632614c505cb44ac5792'/>
+ <property name='maven-groupId' value='org.eclipse.tycho.its.selfsignedcert'/>
+ <property name='maven-artifactId' value='jarsigning.feature'/>
+ <property name='maven-version' value='0.0.1-SNAPSHOT'/>
+ <property name='download.contentType' value='application/zip'/>
+ </properties>
+ </artifact>
+ </artifacts>
+</repository>
diff --git a/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/wrong_checksum/content.xml b/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/wrong_checksum/content.xml
new file mode 100644
index 0000000..b395853
--- /dev/null
+++ b/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/wrong_checksum/content.xml
@@ -0,0 +1,402 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<?metadataRepository version='1.1.0'?>
+<repository name='jarsigning.rcp' type='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1'>
+ <properties size='2'>
+ <property name='p2.timestamp' value='1316441695446'/>
+ <property name='p2.compressed' value='true'/>
+ </properties>
+ <units size='11'>
+ <unit id='tooling.source.default' version='1.0.0' singleton='false'>
+ <hostRequirements size='1'>
+ <required namespace='org.eclipse.equinox.p2.eclipse.type' name='source' range='0.0.0' optional='true' multiple='true' greedy='false'/>
+ </hostRequirements>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.type.fragment' value='true'/>
+ </properties>
+ <provides size='2'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='tooling.source.default' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.flavor' name='tooling' version='1.0.0'/>
+ </provides>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.eclipse.type' name='source' range='0.0.0' optional='true' multiple='true' greedy='false'/>
+ </requires>
+ <touchpoint id='null' version='0.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='2'>
+ <instruction key='install'>
+ addSourceBundle(bundle:${artifact})
+ </instruction>
+ <instruction key='uninstall'>
+ removeSourceBundle(bundle:${artifact})
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='jarsigning.feature.feature.group' version='0.0.1.201109191414' singleton='false'>
+ <update id='jarsigning.feature.feature.group' range='[0.0.0,0.0.1.201109191414)' severity='0'/>
+ <properties size='5'>
+ <property name='org.eclipse.equinox.p2.name' value='OSGi Jarsigning Example Feature'/>
+ <property name='org.eclipse.equinox.p2.type.group' value='true'/>
+ <property name='maven-groupId' value='org.eclipse.tycho.its.selfsignedcert'/>
+ <property name='maven-artifactId' value='jarsigning.feature'/>
+ <property name='maven-version' value='0.0.1-SNAPSHOT'/>
+ </properties>
+ <provides size='1'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='jarsigning.feature.feature.group' version='0.0.1.201109191414'/>
+ </provides>
+ <requires size='2'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='jarsigning' range='[0.0.1.201109191414,0.0.1.201109191414]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='jarsigning.feature.feature.jar' range='[0.0.1.201109191414,0.0.1.201109191414]'>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
+ </required>
+ </requires>
+ <touchpoint id='null' version='0.0.0'/>
+ </unit>
+ <unit id='a.jre.javase' version='1.6.0' singleton='false'>
+ <provides size='159'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='a.jre.javase' version='1.6.0'/>
+ <provided namespace='java.package' name='javax.accessibility' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.activation' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.activity' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.annotation' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.annotation.processing' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.crypto' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.crypto.interfaces' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.crypto.spec' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.imageio' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.imageio.event' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.imageio.metadata' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.imageio.plugins.bmp' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.imageio.plugins.jpeg' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.imageio.spi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.imageio.stream' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.jws' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.jws.soap' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.lang.model' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.lang.model.element' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.lang.model.type' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.lang.model.util' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.loading' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.modelmbean' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.monitor' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.openmbean' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.relation' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.remote' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.remote.rmi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.management.timer' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.naming' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.naming.directory' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.naming.event' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.naming.ldap' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.naming.spi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.net' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.net.ssl' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.print' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.print.attribute' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.print.attribute.standard' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.print.event' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.rmi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.rmi.CORBA' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.rmi.ssl' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.script' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.auth' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.auth.callback' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.auth.kerberos' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.auth.login' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.auth.spi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.auth.x500' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.cert' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.security.sasl' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sound.midi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sound.midi.spi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sound.sampled' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sound.sampled.spi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sql' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sql.rowset' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sql.rowset.serial' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.sql.rowset.spi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.border' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.colorchooser' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.event' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.filechooser' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.plaf' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.plaf.basic' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.plaf.metal' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.plaf.multi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.plaf.synth' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.table' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.text' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.text.html' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.text.html.parser' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.text.rtf' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.tree' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.swing.undo' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.tools' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.transaction' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.transaction.xa' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.bind' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.bind.annotation' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.bind.annotation.adapters' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.bind.attachment' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.bind.helpers' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.bind.util' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.crypto' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.crypto.dom' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.crypto.dsig' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.crypto.dsig.dom' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.crypto.dsig.keyinfo' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.crypto.dsig.spec' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.datatype' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.namespace' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.parsers' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.soap' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.stream' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.stream.events' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.stream.util' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.transform' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.transform.dom' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.transform.sax' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.transform.stax' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.transform.stream' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.validation' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.ws' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.ws.handler' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.ws.handler.soap' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.ws.http' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.ws.soap' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.ws.spi' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.ws.wsaddressing' version='0.0.0'/>
+ <provided namespace='java.package' name='javax.xml.xpath' version='0.0.0'/>
+ <provided namespace='java.package' name='org.ietf.jgss' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CORBA' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CORBA_2_3' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CORBA_2_3.portable' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CORBA.DynAnyPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CORBA.ORBPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CORBA.portable' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CORBA.TypeCodePackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CosNaming' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CosNaming.NamingContextExtPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.CosNaming.NamingContextPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.Dynamic' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.DynamicAny' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.DynamicAny.DynAnyFactoryPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.DynamicAny.DynAnyPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.IOP' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.IOP.CodecFactoryPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.IOP.CodecPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.Messaging' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableInterceptor' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableInterceptor.ORBInitInfoPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableServer' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableServer.CurrentPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableServer.POAManagerPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableServer.POAPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableServer.portable' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.PortableServer.ServantLocatorPackage' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.SendingContext' version='0.0.0'/>
+ <provided namespace='java.package' name='org.omg.stub.java.rmi' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.bootstrap' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.css' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.events' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.html' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.ls' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.ranges' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.stylesheets' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.traversal' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.views' version='0.0.0'/>
+ <provided namespace='java.package' name='org.w3c.dom.xpath' version='0.0.0'/>
+ <provided namespace='java.package' name='org.xml.sax' version='0.0.0'/>
+ <provided namespace='java.package' name='org.xml.sax.ext' version='0.0.0'/>
+ <provided namespace='java.package' name='org.xml.sax.helpers' version='0.0.0'/>
+ </provides>
+ <touchpoint id='org.eclipse.equinox.p2.native' version='1.0.0'/>
+ </unit>
+ <unit id='201109191414.Default' version='1.0.0.0-1d4rCo-773553K5K5A5A'>
+ <properties size='3'>
+ <property name='org.eclipse.equinox.p2.name' value='Uncategorized'/>
+ <property name='org.eclipse.equinox.p2.description' value='Default category for otherwise uncategorized features'/>
+ <property name='org.eclipse.equinox.p2.type.category' value='true'/>
+ </properties>
+ <provides size='1'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='201109191414.Default' version='1.0.0.0-1d4rCo-773553K5K5A5A'/>
+ </provides>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='jarsigning.feature.feature.group' range='[0.0.1.201109191414,0.0.1.201109191414]'/>
+ </requires>
+ <touchpoint id='null' version='0.0.0'/>
+ </unit>
+ <unit id='jarsigning' version='0.0.1.201109191414' singleton='false'>
+ <update id='jarsigning' range='[0.0.0,0.0.1.201109191414)' severity='0'/>
+ <properties size='4'>
+ <property name='org.eclipse.equinox.p2.name' value='OSGi Jarsigning Example Bundle'/>
+ <property name='maven-groupId' value='org.eclipse.tycho.its.selfsignedcert'/>
+ <property name='maven-artifactId' value='jarsigning'/>
+ <property name='maven-version' value='0.0.1-SNAPSHOT'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='jarsigning' version='0.0.1.201109191414'/>
+ <provided namespace='osgi.bundle' name='jarsigning' version='0.0.1.201109191414'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/>
+ </provides>
+ <artifacts size='1'>
+ <artifact classifier='osgi.bundle' id='jarsigning' version='0.0.1.201109191414'/>
+ </artifacts>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='manifest'>
+ Bundle-SymbolicName: jarsigning&#xA;Bundle-Version: 0.0.1.201109191414
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='tooling.osgi.bundle.default' version='1.0.0' singleton='false'>
+ <hostRequirements size='1'>
+ <required namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' range='0.0.0' multiple='true' greedy='false'/>
+ </hostRequirements>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.type.fragment' value='true'/>
+ </properties>
+ <provides size='2'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='tooling.osgi.bundle.default' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.flavor' name='tooling' version='1.0.0'/>
+ </provides>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' range='0.0.0' multiple='true' greedy='false'/>
+ </requires>
+ <touchpoint id='null' version='0.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='4'>
+ <instruction key='install'>
+ installBundle(bundle:${artifact})
+ </instruction>
+ <instruction key='uninstall'>
+ uninstallBundle(bundle:${artifact})
+ </instruction>
+ <instruction key='unconfigure'>
+
+ </instruction>
+ <instruction key='configure'>
+ setStartLevel(startLevel:4);
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='toolingjarsigning.product.configuration' version='0.0.1.201109191414'>
+ <provides size='1'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='toolingjarsigning.product.configuration' version='0.0.1.201109191414'/>
+ </provides>
+ <touchpoint id='null' version='0.0.0'/>
+ </unit>
+ <unit id='tooling.org.eclipse.update.feature.default' version='1.0.0' singleton='false'>
+ <hostRequirements size='1'>
+ <required namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' range='0.0.0' optional='true' multiple='true' greedy='false'/>
+ </hostRequirements>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.type.fragment' value='true'/>
+ </properties>
+ <provides size='2'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='tooling.org.eclipse.update.feature.default' version='1.0.0'/>
+ <provided namespace='org.eclipse.equinox.p2.flavor' name='tooling' version='1.0.0'/>
+ </provides>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' range='0.0.0' optional='true' multiple='true' greedy='false'/>
+ </requires>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
+ <touchpoint id='null' version='0.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='2'>
+ <instruction key='install'>
+ installFeature(feature:${artifact},featureId:default,featureVersion:default)
+ </instruction>
+ <instruction key='uninstall'>
+ uninstallFeature(feature:${artifact},featureId:default,featureVersion:default)
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='jarsigning.feature.feature.jar' version='0.0.1.201109191414'>
+ <properties size='4'>
+ <property name='org.eclipse.equinox.p2.name' value='OSGi Jarsigning Example Feature'/>
+ <property name='maven-groupId' value='org.eclipse.tycho.its.selfsignedcert'/>
+ <property name='maven-artifactId' value='jarsigning.feature'/>
+ <property name='maven-version' value='0.0.1-SNAPSHOT'/>
+ </properties>
+ <provides size='3'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='jarsigning.feature.feature.jar' version='0.0.1.201109191414'/>
+ <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' version='1.0.0'/>
+ <provided namespace='org.eclipse.update.feature' name='jarsigning.feature' version='0.0.1.201109191414'/>
+ </provides>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
+ <artifacts size='1'>
+ <artifact classifier='org.eclipse.update.feature' id='jarsigning.feature' version='0.0.1.201109191414'/>
+ </artifacts>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='zipped'>
+ true
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ <unit id='jarsigning.product' version='0.0.1.201109191414'>
+ <update id='jarsigning.product' range='0.0.0' severity='0'/>
+ <properties size='3'>
+ <property name='org.eclipse.equinox.p2.name' value='Main Product'/>
+ <property name='lineUp' value='true'/>
+ <property name='org.eclipse.equinox.p2.type.group' value='true'/>
+ </properties>
+ <provides size='1'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='jarsigning.product' version='0.0.1.201109191414'/>
+ </provides>
+ <requires size='7'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='tooling.source.default' range='[1.0.0,1.0.0]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='a.jre.javase' range='[1.6.0,1.6.0]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='jarsigning.feature.feature.group' range='[0.0.1.201109191414,0.0.1.201109191414]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='tooling.osgi.bundle.default' range='[1.0.0,1.0.0]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='toolingjarsigning.product.configuration' range='[0.0.1.201109191414,0.0.1.201109191414]'/>
+ <required namespace='org.eclipse.equinox.p2.iu' name='tooling.org.eclipse.update.feature.default' range='[1.0.0,1.0.0]'>
+ <filter>
+ (org.eclipse.update.install.features=true)
+ </filter>
+ </required>
+ <required namespace='org.eclipse.equinox.p2.iu' name='config.a.jre.javase' range='[1.6.0,1.6.0]'/>
+ </requires>
+ <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/>
+ </unit>
+ <unit id='config.a.jre.javase' version='1.6.0' singleton='false'>
+ <hostRequirements size='1'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='a.jre.javase' range='1.6.0'/>
+ </hostRequirements>
+ <properties size='1'>
+ <property name='org.eclipse.equinox.p2.type.fragment' value='true'/>
+ </properties>
+ <provides size='1'>
+ <provided namespace='org.eclipse.equinox.p2.iu' name='config.a.jre.javase' version='1.6.0'/>
+ </provides>
+ <requires size='1'>
+ <required namespace='org.eclipse.equinox.p2.iu' name='a.jre.javase' range='1.6.0'/>
+ </requires>
+ <touchpoint id='org.eclipse.equinox.p2.native' version='1.0.0'/>
+ <touchpointData size='1'>
+ <instructions size='1'>
+ <instruction key='install'>
+
+ </instruction>
+ </instructions>
+ </touchpointData>
+ </unit>
+ </units>
+</repository>
diff --git a/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/wrong_checksum/features/jarsigning.feature_0.0.1.201109191414.jar b/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/wrong_checksum/features/jarsigning.feature_0.0.1.201109191414.jar
new file mode 100644
index 0000000..bb51e6b
--- /dev/null
+++ b/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/wrong_checksum/features/jarsigning.feature_0.0.1.201109191414.jar
Binary files differ
diff --git a/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/wrong_checksum/plugins/jarsigning_0.0.1.201109191414.jar b/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/wrong_checksum/plugins/jarsigning_0.0.1.201109191414.jar
new file mode 100644
index 0000000..e100e17
--- /dev/null
+++ b/tycho-bundles/org.eclipse.tycho.p2.tools.tests/resources/repositories/wrong_checksum/plugins/jarsigning_0.0.1.201109191414.jar
Binary files differ
diff --git a/tycho-bundles/org.eclipse.tycho.p2.tools.tests/src/main/java/org/eclipse/tycho/p2/tools/mirroring/MirrorApplicationServiceTest.java b/tycho-bundles/org.eclipse.tycho.p2.tools.tests/src/main/java/org/eclipse/tycho/p2/tools/mirroring/MirrorApplicationServiceTest.java
index ed2842f..7db0b87 100644
--- a/tycho-bundles/org.eclipse.tycho.p2.tools.tests/src/main/java/org/eclipse/tycho/p2/tools/mirroring/MirrorApplicationServiceTest.java
+++ b/tycho-bundles/org.eclipse.tycho.p2.tools.tests/src/main/java/org/eclipse/tycho/p2/tools/mirroring/MirrorApplicationServiceTest.java
@@ -120,7 +120,7 @@ public class MirrorApplicationServiceTest {
assertTrue(logger.warnings.size() > 0);
}
- static RepositoryReferences sourceRepos(String... repoIds) {
+ public static RepositoryReferences sourceRepos(String... repoIds) {
RepositoryReferences result = new RepositoryReferences();
for (String repoId : repoIds) {
result.addMetadataRepository(ResourceUtil.resolveTestResource("resources/repositories/" + repoId));
diff --git a/tycho-bundles/org.eclipse.tycho.p2.tools.tests/src/main/java/org/eclipse/tycho/p2/tools/verfier/VerifierServiceImplTest.java b/tycho-bundles/org.eclipse.tycho.p2.tools.tests/src/main/java/org/eclipse/tycho/p2/tools/verfier/VerifierServiceImplTest.java
new file mode 100644
index 0000000..d6fac3d
--- /dev/null
+++ b/tycho-bundles/org.eclipse.tycho.p2.tools.tests/src/main/java/org/eclipse/tycho/p2/tools/verfier/VerifierServiceImplTest.java
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * Copyright (c) 2011 SAP AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tycho.p2.tools.verfier;
+
+import static org.eclipse.tycho.p2.tools.mirroring.MirrorApplicationServiceTest.sourceRepos;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Locale;
+
+import org.eclipse.tycho.core.facade.MavenLogger;
+import org.eclipse.tycho.p2.tools.BuildContext;
+import org.eclipse.tycho.p2.tools.FacadeException;
+import org.eclipse.tycho.p2.tools.RepositoryReferences;
+import org.eclipse.tycho.p2.tools.TargetEnvironment;
+import org.eclipse.tycho.p2.tools.verifier.VerifierServiceImpl;
+import org.eclipse.tycho.p2.tools.verifier.facade.VerifierService;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
+
+@SuppressWarnings("boxing")
+public class VerifierServiceImplTest {
+
+ private static final List<TargetEnvironment> DEFAULT_ENVIRONMENTS = Collections
+ .singletonList(new TargetEnvironment("a", "b", "c"));
+
+ private MemoryLog logger = new MemoryLog();
+ private VerifierService subject = new VerifierServiceImpl();
+
+ @Rule
+ public TemporaryFolder tempFolder = new TemporaryFolder();
+
+ @Test
+ public void testValidFileRepository() throws Exception {
+ final RepositoryReferences repositories = sourceRepos("selfsigned");
+ assertEquals(true, verify(repositories));
+ }
+
+ @Test
+ public void testFileRepositoryWithWrongMd5Sum() throws Exception {
+ final RepositoryReferences repositories = sourceRepos("wrong_checksum");
+ assertEquals(false, verify(repositories));
+ assertTrue(firstErrorLine().contains("jarsigning"));
+ assertTrue(remainingErrorText().contains("md5 hash"));
+ }
+
+ @Test
+ public void testFileRepositoryWithTamperedArtifact() throws Exception {
+ final RepositoryReferences repositories = sourceRepos("tampered_file");
+ assertEquals(false, verify(repositories));
+ assertTrue(firstErrorLine().contains("osgi.bundle"));
+ assertTrue(firstErrorLine().contains("jarsigning"));
+ assertTrue(remainingErrorText().contains("dummy.class"));
+ assertTrue(remainingErrorText().contains("has been tampered"));
+ }
+
+ private String remainingErrorText() {
+ return logger.errors.subList(1, logger.errors.size()).toString().toLowerCase(Locale.ENGLISH);
+ }
+
+ private String firstErrorLine() {
+ return logger.errors.get(0).toLowerCase(Locale.ENGLISH);
+ }
+
+ private boolean verify(final RepositoryReferences repositories) throws FacadeException {
+ BuildContext context = new BuildContext(null, DEFAULT_ENVIRONMENTS, tempFolder.getRoot());
+
+ return subject.verify(repositories.getMetadataRepositories().get(0), repositories.getArtifactRepositories()
+ .get(0), context, logger);
+ }
+
+ static class MemoryLog implements MavenLogger {
+ List<String> warnings = new ArrayList<String>();
+ List<String> errors = new ArrayList<String>();
+
+ public void error(String message) {
+ errors.add(message);
+ }
+
+ public void warn(String message) {
+ warnings.add(message);
+ }
+
+ public void warn(String message, Throwable cause) {
+ warnings.add(message);
+ }
+
+ public void info(String message) {
+ }
+
+ public void debug(String message) {
+ }
+
+ public boolean isDebugEnabled() {
+ return false;
+ }
+
+ public boolean isExtendedDebugEnabled() {
+ return false;
+ }
+ }
+}
diff --git a/tycho-its/projects/jar-signing/feature/build.properties b/tycho-its/projects/jar-signing/feature/build.properties
new file mode 100644
index 0000000..64f93a9
--- /dev/null
+++ b/tycho-its/projects/jar-signing/feature/build.properties
@@ -0,0 +1 @@
+bin.includes = feature.xml
diff --git a/tycho-its/projects/jar-signing/feature/feature.xml b/tycho-its/projects/jar-signing/feature/feature.xml
new file mode 100644
index 0000000..b5d6b8c
--- /dev/null
+++ b/tycho-its/projects/jar-signing/feature/feature.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="jarsigning.feature"
+ label="OSGi Jarsigning Example Feature"
+ version="0.0.1.qualifier">
+
+ <plugin
+ id="jarsigning"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+</feature>
diff --git a/tycho-its/projects/jar-signing/feature/pom.xml b/tycho-its/projects/jar-signing/feature/pom.xml
new file mode 100644
index 0000000..bc27e71
--- /dev/null
+++ b/tycho-its/projects/jar-signing/feature/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>jarsigning.feature</artifactId>
+ <packaging>eclipse-feature</packaging>
+
+ <parent>
+ <groupId>org.eclipse.tycho.its.selfsignedcert</groupId>
+ <artifactId>parent</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+</project>
diff --git a/tycho-its/projects/jar-signing/keystore b/tycho-its/projects/jar-signing/keystore
new file mode 100644
index 0000000..1d9575e
--- /dev/null
+++ b/tycho-its/projects/jar-signing/keystore
Binary files differ
diff --git a/tycho-its/projects/jar-signing/plugin/META-INF/MANIFEST.MF b/tycho-its/projects/jar-signing/plugin/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..e08a209
--- /dev/null
+++ b/tycho-its/projects/jar-signing/plugin/META-INF/MANIFEST.MF
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: OSGi Jarsigning Example Bundle
+Bundle-SymbolicName: jarsigning
+Bundle-Version: 0.0.1.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/tycho-its/projects/jar-signing/plugin/build.properties b/tycho-its/projects/jar-signing/plugin/build.properties
new file mode 100644
index 0000000..ced5f40
--- /dev/null
+++ b/tycho-its/projects/jar-signing/plugin/build.properties
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = target/classes
+bin.includes = META-INF/,\
+ .
diff --git a/tycho-its/projects/jar-signing/plugin/pom.xml b/tycho-its/projects/jar-signing/plugin/pom.xml
new file mode 100644
index 0000000..344a69a
--- /dev/null
+++ b/tycho-its/projects/jar-signing/plugin/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>jarsigning</artifactId>
+ <packaging>eclipse-plugin</packaging>
+
+ <parent>
+ <groupId>org.eclipse.tycho.its.selfsignedcert</groupId>
+ <artifactId>parent</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+</project>
diff --git a/tycho-its/projects/jar-signing/plugin/src/Dummy.java b/tycho-its/projects/jar-signing/plugin/src/Dummy.java
new file mode 100644
index 0000000..6662fdf
--- /dev/null
+++ b/tycho-its/projects/jar-signing/plugin/src/Dummy.java
@@ -0,0 +1,2 @@
+public class Dummy {
+} \ No newline at end of file
diff --git a/tycho-its/projects/jar-signing/pom.xml b/tycho-its/projects/jar-signing/pom.xml
new file mode 100644
index 0000000..dcbb152
--- /dev/null
+++ b/tycho-its/projects/jar-signing/pom.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.eclipse.tycho.its.selfsignedcert</groupId>
+ <artifactId>parent</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>plugin</module>
+ <module>feature</module>
+ <module>rcp</module>
+ </modules>
+
+ <properties>
+ <keystore.path>${project.parent.basedir}/keystore</keystore.path>
+ <keystore.type>JKS</keystore.type>
+ <keystore.alias>dummy</keystore.alias>
+ <keystore.dname>CN=example.org,OU=Dummy,O=Dummy,L=Dummy,C=DE</keystore.dname>
+ <keystore.store.password>abcd1234</keystore.store.password>
+ <keystore.key.password>abcd1234</keystore.key.password>
+ <jarsigner.plugin.groupId>org.apache.maven.plugins</jarsigner.plugin.groupId>
+ <jarsigner.plugin.artifactId>maven-jarsigner-plugin</jarsigner.plugin.artifactId>
+ <jarsigner.plugin.version>1.2</jarsigner.plugin.version>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-maven-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <extensions>true</extensions>
+ </plugin>
+ <plugin>
+ <groupId>${jarsigner.plugin.groupId}</groupId>
+ <artifactId>${jarsigner.plugin.artifactId}</artifactId>
+ <version>${jarsigner.plugin.version}</version>
+ <executions>
+ <execution>
+ <id>sign</id>
+ <goals>
+ <goal>sign</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>verify</id>
+ <goals>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <certs>true</certs>
+ <verbose>true</verbose>
+ <storetype>${keystore.type}</storetype>
+ <keystore>${keystore.path}</keystore>
+ <alias>${keystore.alias}</alias>
+ <storepass>${keystore.store.password}</storepass>
+ <keypass>${keystore.key.password}</keypass>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <environments>
+ <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86</arch>
+ </environment>
+ </environments>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <repositories>
+ <repository>
+ <id>download.eclipse.org_releases_indigo</id>
+ <url>http://download.eclipse.org/releases/indigo/</url>
+ <layout>p2</layout>
+ </repository>
+ </repositories>
+</project>
diff --git a/tycho-its/projects/jar-signing/rcp/category.xml b/tycho-its/projects/jar-signing/rcp/category.xml
new file mode 100644
index 0000000..b878d88
--- /dev/null
+++ b/tycho-its/projects/jar-signing/rcp/category.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <feature url="features/jarsigning.feature_0.0.0.jar" id="jarsigning.feature" version="0.0.0"/>
+</site>
diff --git a/tycho-its/projects/jar-signing/rcp/main.product b/tycho-its/projects/jar-signing/rcp/main.product
new file mode 100644
index 0000000..268cd60
--- /dev/null
+++ b/tycho-its/projects/jar-signing/rcp/main.product
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?pde version="3.6"?>
+
+<product name="Main Product" uid="jarsigning.product" version="0.0.1.qualifier" useFeatures="true" includeLaunchers="false">
+
+ <features>
+ <feature id="jarsigning.feature"/>
+ </features>
+
+</product>
diff --git a/tycho-its/projects/jar-signing/rcp/pom.xml b/tycho-its/projects/jar-signing/rcp/pom.xml
new file mode 100644
index 0000000..4b47900
--- /dev/null
+++ b/tycho-its/projects/jar-signing/rcp/pom.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>jarsigning.rcp</artifactId>
+ <packaging>eclipse-repository</packaging>
+
+ <parent>
+ <groupId>org.eclipse.tycho.its.selfsignedcert</groupId>
+ <artifactId>parent</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-repository-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>verify-repository</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-repository-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>verify-repository</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <!-- commented out until director fix (340345) is available in tycho
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-director-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>materialize-products</id>
+ <goals>
+ <goal>materialize-products</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>archive-products</id>
+ <goals>
+ <goal>archive-products</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ -->
+ </plugins>
+ </build>
+</project>
diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/jarsigning/JarSigningTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/jarsigning/JarSigningTest.java
new file mode 100644
index 0000000..2a44587
--- /dev/null
+++ b/tycho-its/src/test/java/org/eclipse/tycho/test/jarsigning/JarSigningTest.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2011 SAP AG
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tycho.test.jarsigning;
+
+import org.apache.maven.it.Verifier;
+import org.eclipse.tycho.test.AbstractTychoIntegrationTest;
+import org.junit.Test;
+
+public class JarSigningTest extends AbstractTychoIntegrationTest {
+
+ @Test
+ public void testSigning() throws Exception {
+ Verifier verifier = getVerifier("jar-signing", false);
+
+ verifier.executeGoal("verify");
+ verifier.verifyErrorFreeLog();
+ verifier.verifyTextInLog("verified successfully");
+ // TODO activate director in pom.xml
+ }
+}
diff --git a/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/facade/internal/TychoP2RuntimeLocator.java b/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/facade/internal/TychoP2RuntimeLocator.java
index 74693f5..66d29dd 100644
--- a/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/facade/internal/TychoP2RuntimeLocator.java
+++ b/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/facade/internal/TychoP2RuntimeLocator.java
@@ -46,7 +46,8 @@ public class TychoP2RuntimeLocator implements EquinoxRuntimeLocator {
"org.eclipse.tycho.p2.metadata", "org.eclipse.tycho.p2.repository", "org.eclipse.tycho.p2.resolver.facade",
"org.eclipse.tycho.p2.target.facade", "org.eclipse.tycho.p2.tools",
"org.eclipse.tycho.p2.tools.director.facade", "org.eclipse.tycho.p2.tools.publisher.facade",
- "org.eclipse.tycho.p2.tools.mirroring.facade", "org.eclipse.tycho.repository.registry.facade" };
+ "org.eclipse.tycho.p2.tools.mirroring.facade", "org.eclipse.tycho.p2.tools.verifier.facade",
+ "org.eclipse.tycho.repository.registry.facade" };
@Requirement
private Logger logger;
diff --git a/tycho-p2/tycho-p2-repository-plugin/src/main/java/org/eclipse/tycho/plugins/p2/repository/VerifyIntegrityRepositoryMojo.java b/tycho-p2/tycho-p2-repository-plugin/src/main/java/org/eclipse/tycho/plugins/p2/repository/VerifyIntegrityRepositoryMojo.java
new file mode 100644
index 0000000..b84d597
--- /dev/null
+++ b/tycho-p2/tycho-p2-repository-plugin/src/main/java/org/eclipse/tycho/plugins/p2/repository/VerifyIntegrityRepositoryMojo.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2011 SAP AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * SAP AG - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tycho.plugins.p2.repository;
+
+import java.io.File;
+import java.net.URI;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.codehaus.plexus.logging.LogEnabled;
+import org.codehaus.plexus.logging.Logger;
+import org.eclipse.tycho.equinox.EquinoxServiceFactory;
+import org.eclipse.tycho.osgi.adapters.MavenLoggerAdapter;
+import org.eclipse.tycho.p2.tools.FacadeException;
+import org.eclipse.tycho.p2.tools.verifier.facade.VerifierService;
+
+/**
+ * @goal verify-repository
+ *
+ * @phase verify
+ */
+public class VerifyIntegrityRepositoryMojo extends AbstractRepositoryMojo implements LogEnabled {
+ private Logger logger;
+
+ /** @component */
+ private EquinoxServiceFactory p2;
+
+ public void execute() throws MojoExecutionException, MojoFailureException {
+ File repositoryFile = new File(getBuildDirectory(), getProject().getArtifactId() + ".zip");
+ logger.info("Verifying " + repositoryFile.toString());
+ VerifierService verifier = p2.getService(VerifierService.class);
+ URI repositoryUri = new File(getBuildDirectory(), "repository").toURI();
+ try {
+ if (!verifier
+ .verify(repositoryUri, repositoryUri, getBuildContext(), new MavenLoggerAdapter(logger, false))) {
+ throw new MojoFailureException("The repository is invalid.");
+ }
+ } catch (FacadeException e) {
+ throw new MojoExecutionException("Verification failed", e);
+ }
+ }
+
+ public void enableLogging(Logger logger) {
+ this.logger = logger;
+ }
+}