Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Arthorne2009-08-12 15:40:40 -0400
committerJohn Arthorne2009-08-12 15:40:40 -0400
commit8132e43c4cb2b9a72066cb13c0caf23ea5cae627 (patch)
tree5983eb16db757cd2cf43f1126f5fc3a497e15007 /bundles/org.eclipse.equinox.p2.touchpoint.eclipse
parent2a6150cecdf3bf6ce86eb638a7a72804c8fdd1b3 (diff)
downloadrt.equinox.p2-8132e43c4cb2b9a72066cb13c0caf23ea5cae627.tar.gz
rt.equinox.p2-8132e43c4cb2b9a72066cb13c0caf23ea5cae627.tar.xz
rt.equinox.p2-8132e43c4cb2b9a72066cb13c0caf23ea5cae627.zip
Bug 235526 [security] No prompt for installing unsigned content
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.touchpoint.eclipse')
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CheckTrustAction.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CheckTrustAction.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CheckTrustAction.java
index 6b97b9e9a..14baeae6c 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CheckTrustAction.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/actions/CheckTrustAction.java
@@ -21,6 +21,8 @@ import org.eclipse.equinox.internal.provisional.p2.engine.IProfile;
import org.eclipse.equinox.internal.provisional.p2.engine.ProvisioningAction;
import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
+import org.eclipse.equinox.internal.provisional.p2.query.Collector;
/**
* This action collects the set of bundle files on which the signature trust check
@@ -37,8 +39,11 @@ public class CheckTrustAction extends ProvisioningAction {
IInstallableUnit iu = (IInstallableUnit) parameters.get(EclipseTouchpoint.PARM_IU);
if (iu == null)
return null;
- Collection bundleFiles = (Collection) parameters.get(ActionConstants.PARM_ARTIFACT_FILES);
IProfile profile = (IProfile) parameters.get(ActionConstants.PARM_PROFILE);
+ //if the IU is already in the profile there is nothing to do
+ if (!profile.available(new InstallableUnitQuery(iu.getId(), iu.getVersion()), new Collector(), null).isEmpty())
+ return null;
+ Collection bundleFiles = (Collection) parameters.get(ActionConstants.PARM_ARTIFACT_FILES);
IArtifactKey[] artifacts = iu.getArtifacts();
if (artifacts == null)
return null;

Back to the top