Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMykola Nikishov2016-04-21 19:59:26 +0000
committerMykola Nikishov2019-07-08 17:47:43 +0000
commit568ec2758ef480b7a69dc8572bf80fa8f1b281b2 (patch)
tree60b685ade900b9b5463fc7710d9362e1e4dab6c2 /bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository
parent2bcad99a06945190c7baff4268f9fc459bc34dfd (diff)
downloadrt.equinox.p2-568ec2758ef480b7a69dc8572bf80fa8f1b281b2.tar.gz
rt.equinox.p2-568ec2758ef480b7a69dc8572bf80fa8f1b281b2.tar.xz
rt.equinox.p2-568ec2758ef480b7a69dc8572bf80fa8f1b281b2.zip
Extend o.e.e.p2.artifact.repository.artifactChecksums extension point with attribute providerName to support custom MessageDigest implementations as per Java Security API. To get an instance of custom MessageDigest in ChecksumProducer's getMessageDigest(String, String), look for service object under java.security.Provider interface filtered by providerName property and pass it to java.security.MessageDigest's getInstance(String, Provider). Throws NoSuchProviderException if no such service was found. Bundle that contributes such implementation should register it with the Framework service registry under interface java.security.Provider. The registration properties of the service should contain property 'providerName' with value of type String as returned by implementation's java.security.Provider.getName(). The same value should be used for providerName attribute in artifactChecksums extension point. o.e.equinox.p2.artifact.checksums.bouncycastle bundle demonstrates how this works by adding support for Whirlpool and DSTU7564 message digests using the Bouncy Castle Crypto APIs [1]. It is not part of the distribution and used by unit tests only. [1] https://bouncycastle.org/ Change-Id: I0cfd06ceca6e1911d69bab09331399500a00dcee Signed-off-by: Mykola Nikishov <mn@mn.com.ua>
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository')
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Messages.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/messages.properties5
2 files changed, 4 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Messages.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Messages.java
index 9208be003..f4eba31a3 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Messages.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/Messages.java
@@ -70,6 +70,7 @@ public class Messages extends NLS {
public static String calculateChecksum_file;
public static String calculateChecksum_ok;
public static String calculateChecksum_error;
+ public static String calculateChecksum_providerError;
static {
// initialize resource bundles
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/messages.properties b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/messages.properties
index 2efde4def..fa54c3f8c 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/messages.properties
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/messages.properties
@@ -55,8 +55,9 @@ exception_unsupportedGetOutputStream=Cannot write artifacts to a composite repos
exception_unsupportedRemoveFromComposite = Cannot remove descriptors from a composite repository.
calculateChecksum_file=Calculating checksums for file {0}.
-calculateChecksum_ok=Calculated checksum using id={0} algorithm={1}: {2}.
-calculateChecksum_error=Error calculating checksum using id={0} algorithm={1}.
+calculateChecksum_ok=Calculated checksum using id={0} algorithm={1} provider={2}: {3}.
+calculateChecksum_error=Error calculating checksum using id={0} algorithm={1} provider={2}.
+calculateChecksum_providerError=Checksum provider id={0} algorithm={1} provider={2} error.
exception_unableToCreateParentDir = Unable to create parent directory.
folder_artifact_not_file_repo=Artifact {0} is a folder but the repository is an archive or remote location.

Back to the top