Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2011-08-11 19:40:38 -0400
committerPascal Rapicault2011-08-11 19:43:21 -0400
commit8d48b853b8717973339a9c70fb29013b39558b61 (patch)
tree3278b271e03bf86902d3fdc366175ab86a9f1628
parentaa82f551eda5fbead50fdc00d02368ca9e36809a (diff)
downloadrt.equinox.p2-8d48b853b8717973339a9c70fb29013b39558b61.tar.gz
rt.equinox.p2-8d48b853b8717973339a9c70fb29013b39558b61.tar.xz
rt.equinox.p2-8d48b853b8717973339a9c70fb29013b39558b61.zip
Bug 354192 - [repository] MD5 artifact check not done on artifact after
non-canoncial download
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
index 3d7c46757..b365b0376 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
@@ -54,6 +54,8 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
public static final boolean MD5_CHECK_ENABLED = !"false".equals(Activator.getContext().getProperty("eclipse.p2.MD5Check")); //$NON-NLS-1$//$NON-NLS-2$
+ public static final boolean MD5_ARTIFACT_CHECK_ENABLED = !"false".equals(Activator.getContext().getProperty("eclipse.p2.MD5ArtifactCheck")); //$NON-NLS-1$//$NON-NLS-2$
+
public static final String CONTENT_FILENAME = "artifacts"; //$NON-NLS-1$
/**
@@ -425,6 +427,8 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
private synchronized OutputStream addPostSteps(ProcessingStepHandler handler, IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor) {
ArrayList<ProcessingStep> steps = new ArrayList<ProcessingStep>();
steps.add(new SignatureVerifier());
+ if (MD5_ARTIFACT_CHECK_ENABLED && descriptor.getProperty(IArtifactDescriptor.ARTIFACT_MD5) != null)
+ steps.add(new MD5Verifier(descriptor.getProperty(IArtifactDescriptor.ARTIFACT_MD5)));
if (steps.isEmpty())
return destination;
ProcessingStep[] stepArray = steps.toArray(new ProcessingStep[steps.size()]);

Back to the top