This is an automated email from the ASF dual-hosted git repository.
robbie pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/main by this push:
new bf1ea41287 ARTEMIS-4710 Keep pem-keystore dependencies as is; make it
really optional
bf1ea41287 is described below
commit bf1ea4128775c97e6c6fc6a0ab6921feaf8197d5
Author: Alexey Markevich <[email protected]>
AuthorDate: Tue Apr 2 10:34:59 2024 +0200
ARTEMIS-4710 Keep pem-keystore dependencies as is; make it really
optional
The latest version already uses bcprov-jdk18on.
Avoid global imports to be able to exclude dependency when not used.
---
artemis-core-client/pom.xml | 9 ---------
.../activemq/artemis/core/remoting/impl/ssl/SSLSupport.java | 4 ++--
artemis-pom/pom.xml | 11 -----------
3 files changed, 2 insertions(+), 22 deletions(-)
diff --git a/artemis-core-client/pom.xml b/artemis-core-client/pom.xml
index 844d97879b..94dce4ab12 100644
--- a/artemis-core-client/pom.xml
+++ b/artemis-core-client/pom.xml
@@ -124,15 +124,6 @@
<groupId>de.dentrassi.crypto</groupId>
<artifactId>pem-keystore</artifactId>
</dependency>
- <!-- bcprov-jdk18on replaces bcprov-jdk15on excluded pem-keystore -->
- <dependency>
- <groupId>org.bouncycastle</groupId>
- <artifactId>bcprov-jdk18on</artifactId>
- </dependency>
- <dependency>
- <groupId>org.bouncycastle</groupId>
- <artifactId>bcpkix-jdk18on</artifactId>
- </dependency>
<!-- The johnzon-core and json-api contents are repackaged in -commons,
However maven can still need them during tests, which run against
diff --git
a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/SSLSupport.java
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/SSLSupport.java
index b2d710b926..eb4d04cdbe 100644
---
a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/SSLSupport.java
+++
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/SSLSupport.java
@@ -47,7 +47,6 @@ import java.security.cert.X509CertSelector;
import java.security.cert.X509Certificate;
import java.util.Collection;
-import de.dentrassi.crypto.pem.PemKeyStoreProvider;
import io.netty.handler.ssl.SslContext;
import io.netty.handler.ssl.SslContextBuilder;
import io.netty.handler.ssl.SslProvider;
@@ -356,7 +355,8 @@ public class SSLSupport {
public static void checkPemProviderLoaded(String keystoreType) {
if (keystoreType != null && keystoreType.startsWith("PEM")) {
if (Security.getProvider("PEM") == null) {
- Security.insertProviderAt(new PemKeyStoreProvider(),
Integer.parseInt(System.getProperty("artemis.pemProvider.insertAt", "0")));
+ Security.insertProviderAt(new
de.dentrassi.crypto.pem.PemKeyStoreProvider(),
+
Integer.parseInt(System.getProperty("artemis.pemProvider.insertAt", "0")));
}
}
}
diff --git a/artemis-pom/pom.xml b/artemis-pom/pom.xml
index f77816cc97..b88725e03b 100644
--- a/artemis-pom/pom.xml
+++ b/artemis-pom/pom.xml
@@ -162,17 +162,6 @@
<artifactId>pem-keystore</artifactId>
<version>${pem-keystore.version}</version>
<!-- Eclipse Public License - v 1.0 -->
- <exclusions>
- <!-- exclude bcprov-jdk15on to avoid conflicts with
bcprov-jdk18on -->
- <exclusion>
- <groupId>org.bouncycastle</groupId>
- <artifactId>bcprov-jdk15on</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.bouncycastle</groupId>
- <artifactId>bcpkix-jdk15on</artifactId>
- </exclusion>
- </exclusions>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>