106 lines
3.7 KiB
Diff
106 lines
3.7 KiB
Diff
From c8838c5839e04aae964505e56ccea524f577c862 Mon Sep 17 00:00:00 2001
|
|
From: Mat Booth <mat.booth@redhat.com>
|
|
Date: Wed, 10 Mar 2021 20:26:12 +0000
|
|
Subject: [PATCH] Avoid optional dependency on native tomcat APR library
|
|
|
|
---
|
|
pom.xml | 5 -----
|
|
sshd-core/pom.xml | 6 ------
|
|
.../sshd/agent/local/ProxyAgentFactory.java | 16 +---------------
|
|
sshd-osgi/pom.xml | 6 ------
|
|
4 files changed, 1 insertion(+), 32 deletions(-)
|
|
|
|
diff --git a/pom.xml b/pom.xml
|
|
index 8716930..0a2496b 100644
|
|
--- a/pom.xml
|
|
+++ b/pom.xml
|
|
@@ -417,11 +417,6 @@
|
|
<artifactId>mina-core</artifactId>
|
|
<version>2.0.21</version>
|
|
</dependency>
|
|
- <dependency>
|
|
- <groupId>tomcat</groupId>
|
|
- <artifactId>tomcat-apr</artifactId>
|
|
- <version>5.5.23</version>
|
|
- </dependency>
|
|
|
|
<dependency>
|
|
<groupId>net.i2p.crypto</groupId>
|
|
diff --git a/sshd-core/pom.xml b/sshd-core/pom.xml
|
|
index 5fc72b2..b06c00b 100644
|
|
--- a/sshd-core/pom.xml
|
|
+++ b/sshd-core/pom.xml
|
|
@@ -42,12 +42,6 @@
|
|
<version>${project.version}</version>
|
|
</dependency>
|
|
|
|
- <dependency>
|
|
- <groupId>tomcat</groupId>
|
|
- <artifactId>tomcat-apr</artifactId>
|
|
- <optional>true</optional>
|
|
- </dependency>
|
|
-
|
|
<dependency>
|
|
<groupId>org.bouncycastle</groupId>
|
|
<artifactId>bcpg-jdk15on</artifactId>
|
|
diff --git a/sshd-core/src/main/java/org/apache/sshd/agent/local/ProxyAgentFactory.java b/sshd-core/src/main/java/org/apache/sshd/agent/local/ProxyAgentFactory.java
|
|
index ffde9af..ee5b9c8 100644
|
|
--- a/sshd-core/src/main/java/org/apache/sshd/agent/local/ProxyAgentFactory.java
|
|
+++ b/sshd-core/src/main/java/org/apache/sshd/agent/local/ProxyAgentFactory.java
|
|
@@ -27,8 +27,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
|
import org.apache.sshd.agent.SshAgent;
|
|
import org.apache.sshd.agent.SshAgentFactory;
|
|
import org.apache.sshd.agent.SshAgentServer;
|
|
-import org.apache.sshd.agent.unix.AprLibrary;
|
|
-import org.apache.sshd.agent.unix.UnixAgentFactory;
|
|
import org.apache.sshd.common.FactoryManager;
|
|
import org.apache.sshd.common.PropertyResolver;
|
|
import org.apache.sshd.common.channel.ChannelFactory;
|
|
@@ -51,9 +49,7 @@ public class ProxyAgentFactory implements SshAgentFactory {
|
|
|
|
@Override
|
|
public List<ChannelFactory> getChannelForwardingFactories(FactoryManager manager) {
|
|
- return isPreferredUnixAgent(manager)
|
|
- ? UnixAgentFactory.DEFAULT_FORWARDING_CHANNELS
|
|
- : LocalAgentFactory.DEFAULT_FORWARDING_CHANNELS;
|
|
+ return LocalAgentFactory.DEFAULT_FORWARDING_CHANNELS;
|
|
}
|
|
|
|
@Override
|
|
@@ -104,16 +100,6 @@ public class ProxyAgentFactory implements SshAgentFactory {
|
|
}
|
|
|
|
public static boolean isPreferredUnixAgent(PropertyResolver resolver) {
|
|
- if (CoreModuleProperties.PREFER_UNIX_AGENT.getRequired(resolver)) {
|
|
- try {
|
|
- if (AprLibrary.getInstance() != null) {
|
|
- return true;
|
|
- }
|
|
- } catch (Exception ignore) {
|
|
- // ignored
|
|
- }
|
|
- }
|
|
-
|
|
return false;
|
|
}
|
|
}
|
|
diff --git a/sshd-osgi/pom.xml b/sshd-osgi/pom.xml
|
|
index cc37015..bf3c0c3 100644
|
|
--- a/sshd-osgi/pom.xml
|
|
+++ b/sshd-osgi/pom.xml
|
|
@@ -68,12 +68,6 @@
|
|
<optional>true</optional>
|
|
<scope>provided</scope>
|
|
</dependency>
|
|
- <dependency>
|
|
- <groupId>tomcat</groupId>
|
|
- <artifactId>tomcat-apr</artifactId>
|
|
- <optional>true</optional>
|
|
- <scope>provided</scope>
|
|
- </dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
--
|
|
2.28.0
|
|
|