From 50401bed983cfe707989554d48ce81e420e5b4f0 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 08:57:40 -0700 Subject: [PATCH] Updates Bouncy Castle to 1.78.1. Update any projects that attempt to use Bouncy Castle jdk15on dependencies with the jdk18on dependency instead. This will prevent any of the older jdk15on dependencies from getting into our classpath. In particular, this was coming from hadoop-common. (#4871) (#4873) Signed-off-by: David Venable (cherry picked from commit 0a26f59fe062f8afa9f28a447206884b6a2e1e9a) Co-authored-by: David Venable --- build.gradle | 4 ++++ settings.gradle | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 83323ae3f0..10c8e02b7a 100644 --- a/build.gradle +++ b/build.gradle @@ -226,6 +226,10 @@ subprojects { } } else if (details.requested.group == 'log4j' && details.requested.name == 'log4j') { details.useTarget group: 'org.apache.logging.log4j', name: 'log4j-1.2-api', version: '2.17.1' + } else if (details.requested.group == 'org.bouncycastle' && details.requested.name.endsWith('-jdk15on')) { + def java8Name = details.requested.name.replace('-jdk15on', '-jdk18on') + details.useTarget group: 'org.bouncycastle', name: java8Name, version: libs.bouncycastle.bcprov.get().version + details.because 'Use only the Java 8 artifacts of BouncyCastle' } } } diff --git a/settings.gradle b/settings.gradle index b841584cbf..73f7f35f8d 100644 --- a/settings.gradle +++ b/settings.gradle @@ -49,7 +49,7 @@ dependencyResolutionManagement { version('spring', '5.3.28') library('spring-core', 'org.springframework', 'spring-core').versionRef('spring') library('spring-context', 'org.springframework', 'spring-context').versionRef('spring') - version('bouncycastle', '1.76') + version('bouncycastle', '1.78.1') library('bouncycastle-bcprov', 'org.bouncycastle', 'bcprov-jdk18on').versionRef('bouncycastle') library('bouncycastle-bcpkix', 'org.bouncycastle', 'bcpkix-jdk18on').versionRef('bouncycastle') version('guava', '32.1.2-jre')