karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject karaf git commit: [KARAF-4821]enable to configure the external moduli-url for the sshd server
Date Fri, 11 Nov 2016 03:15:19 GMT
Repository: karaf
Updated Branches:
  refs/heads/master d6c3fcf31 -> b492b9d2d


[KARAF-4821]enable to configure the external moduli-url for the sshd server


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/b492b9d2
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/b492b9d2
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/b492b9d2

Branch: refs/heads/master
Commit: b492b9d2d54f966e4799e953b804a2f205df260c
Parents: d6c3fcf
Author: Freeman Fang <freeman.fang@gmail.com>
Authored: Fri Nov 11 11:15:08 2016 +0800
Committer: Freeman Fang <freeman.fang@gmail.com>
Committed: Fri Nov 11 11:15:08 2016 +0800

----------------------------------------------------------------------
 .../src/main/resources/resources/etc/org.apache.karaf.shell.cfg | 5 +++++
 .../ssh/src/main/java/org/apache/karaf/shell/ssh/Activator.java | 4 ++++
 2 files changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/b492b9d2/assemblies/features/base/src/main/resources/resources/etc/org.apache.karaf.shell.cfg
----------------------------------------------------------------------
diff --git a/assemblies/features/base/src/main/resources/resources/etc/org.apache.karaf.shell.cfg
b/assemblies/features/base/src/main/resources/resources/etc/org.apache.karaf.shell.cfg
index e996b1b..dff3171 100644
--- a/assemblies/features/base/src/main/resources/resources/etc/org.apache.karaf.shell.cfg
+++ b/assemblies/features/base/src/main/resources/resources/etc/org.apache.karaf.shell.cfg
@@ -112,5 +112,10 @@ hostKeyFormat = simple
 #
 # kexAlgorithms = diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
 
+#
+# Override moduli-url.
+# Default: moduli-url not specified to use the internal one from SSHD
+#
+# moduli-url = external moduli-url users wanna use 
 
 completionMode = GLOBAL

http://git-wip-us.apache.org/repos/asf/karaf/blob/b492b9d2/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/Activator.java
----------------------------------------------------------------------
diff --git a/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/Activator.java b/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/Activator.java
index 9198cfc..d28440d 100644
--- a/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/Activator.java
+++ b/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/Activator.java
@@ -153,6 +153,7 @@ public class Activator extends BaseActivator implements ManagedService
{
         String ciphers        = getString("ciphers", "aes128-ctr,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc");
         String kexAlgorithms  = getString("kexAlgorithms", "diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1");
         String welcomeBanner  = getString("welcomeBanner", null);
+        String moduliUrl      = getString("moduli-url", null);
 
         AbstractGeneratorHostKeyProvider keyPairProvider;
         if ("simple".equalsIgnoreCase(hostKeyFormat)) {
@@ -194,6 +195,9 @@ public class Activator extends BaseActivator implements ManagedService
{
         server.setUserAuthFactories(authFactoriesFactory.getFactories());
         server.setAgentFactory(agentFactory);
         server.getProperties().put(SshServer.IDLE_TIMEOUT, Long.toString(sshIdleTimeout));
+        if (moduliUrl != null) {
+            server.getProperties().put(SshServer.MODULI_URL, moduliUrl);
+        }
         if (welcomeBanner != null) {
             server.getProperties().put(SshServer.WELCOME_BANNER, welcomeBanner);
         } 


Mime
View raw message