From 568ec2758ef480b7a69dc8572bf80fa8f1b281b2 Mon Sep 17 00:00:00 2001 From: Mykola Nikishov Date: Thu, 21 Apr 2016 22:59:26 +0300 Subject: Bug 541781 - Support dynamically registered MessageDigest implementations 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 --- pom.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pom.xml') diff --git a/pom.xml b/pom.xml index 375951639..48d874851 100644 --- a/pom.xml +++ b/pom.xml @@ -1,6 +1,6 @@