summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins
diff options
context:
space:
mode:
authorSol Jerome <sol.jerome@gmail.com>2011-10-20 13:55:27 -0500
committerSol Jerome <sol.jerome@gmail.com>2011-10-20 13:56:06 -0500
commit163bffd22c5a8188376a4b94d539074029febbbc (patch)
tree3dcde5c6e8c0cd71f96132b792a71f1222f83bbb /src/lib/Server/Plugins
parent8f78b4c7947e84062fc01e79939b159014dbe6d4 (diff)
downloadbcfg2-163bffd22c5a8188376a4b94d539074029febbbc.tar.gz
bcfg2-163bffd22c5a8188376a4b94d539074029febbbc.tar.bz2
bcfg2-163bffd22c5a8188376a4b94d539074029febbbc.zip
SSHbase: ECDSA key support from ticket #1063
Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
Diffstat (limited to 'src/lib/Server/Plugins')
-rw-r--r--src/lib/Server/Plugins/SSHbase.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/lib/Server/Plugins/SSHbase.py b/src/lib/Server/Plugins/SSHbase.py
index 8d1588767..e4a9be44c 100644
--- a/src/lib/Server/Plugins/SSHbase.py
+++ b/src/lib/Server/Plugins/SSHbase.py
@@ -26,9 +26,9 @@ class SSHbase(Bcfg2.Server.Plugin.Plugin,
(hostname)
ssh_host_key.pub.H_(hostname) -> the v1 host public key
for (hostname)
- ssh_host_(dr)sa_key.H_(hostname) -> the v2 ssh host
+ ssh_host_(ec)(dr)sa_key.H_(hostname) -> the v2 ssh host
private key for (hostname)
- ssh_host_(dr)sa_key.pub.H_(hostname) -> the v2 ssh host
+ ssh_host_(ec)(dr)sa_key.pub.H_(hostname) -> the v2 ssh host
public key for (hostname)
ssh_known_hosts -> the current known hosts file. this
is regenerated each time a new key is generated.
@@ -39,15 +39,18 @@ class SSHbase(Bcfg2.Server.Plugin.Plugin,
__author__ = 'bcfg-dev@mcs.anl.gov'
pubkeys = ["ssh_host_dsa_key.pub.H_%s",
+ "ssh_host_ecdsa_key.pub.H_%s",
"ssh_host_rsa_key.pub.H_%s",
"ssh_host_key.pub.H_%s"]
hostkeys = ["ssh_host_dsa_key.H_%s",
"ssh_host_rsa_key.H_%s",
"ssh_host_key.H_%s"]
keypatterns = ["ssh_host_dsa_key",
+ "ssh_host_ecdsa_key",
"ssh_host_rsa_key",
"ssh_host_key",
"ssh_host_dsa_key.pub",
+ "ssh_host_ecdsa_key.pub",
"ssh_host_rsa_key.pub",
"ssh_host_key.pub"]
@@ -67,8 +70,10 @@ class SSHbase(Bcfg2.Server.Plugin.Plugin,
self.Entries = {'Path':
{'/etc/ssh/ssh_known_hosts': self.build_skn,
'/etc/ssh/ssh_host_dsa_key': self.build_hk,
+ '/etc/ssh/ssh_host_ecdsa_key': self.build_hk,
'/etc/ssh/ssh_host_rsa_key': self.build_hk,
'/etc/ssh/ssh_host_dsa_key.pub': self.build_hk,
+ '/etc/ssh/ssh_host_ecdsa_key.pub': self.build_hk,
'/etc/ssh/ssh_host_rsa_key.pub': self.build_hk,
'/etc/ssh/ssh_host_key': self.build_hk,
'/etc/ssh/ssh_host_key.pub': self.build_hk}}
@@ -263,6 +268,9 @@ class SSHbase(Bcfg2.Server.Plugin.Plugin,
elif filename == 'ssh_host_dsa_key':
hostkey = 'ssh_host_dsa_key.H_%s' % client
keytype = 'dsa'
+ elif filename == 'ssh_host_ecdsa_key':
+ hostkey = 'ssh_host_ecdsa_key.H_%s' % client
+ keytype = 'ecdsa'
elif filename == 'ssh_host_key':
hostkey = 'ssh_host_key.H_%s' % client
keytype = 'rsa1'