aboutsummaryrefslogtreecommitdiff
path: root/lib/leap_cli/path.rb
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2012-11-01 01:07:27 -0700
committerelijah <elijah@riseup.net>2012-11-01 01:07:27 -0700
commit57287ae1d4151ec453ec9d33fafe4f1a4ced37e0 (patch)
treefe63a8de11c41d247fc3634277bc49c1ca7cd689 /lib/leap_cli/path.rb
parentf339e7b94ab8920fd1e271c50145b5d2d1a8ac9d (diff)
downloadleap_cli-57287ae1d4151ec453ec9d33fafe4f1a4ced37e0.tar.gz
leap_cli-57287ae1d4151ec453ec9d33fafe4f1a4ced37e0.tar.bz2
x.509 support -- added certificate authority creation and server cert creation
Diffstat (limited to 'lib/leap_cli/path.rb')
-rw-r--r--lib/leap_cli/path.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/leap_cli/path.rb b/lib/leap_cli/path.rb
index 9b4e3c9..aa20e17 100644
--- a/lib/leap_cli/path.rb
+++ b/lib/leap_cli/path.rb
@@ -23,7 +23,12 @@ module LeapCli; module Path
:hiera => 'hiera/#{arg}.yaml',
:node_ssh_pub_key => 'files/nodes/#{arg}/#{arg}_ssh_key.pub',
:known_hosts => 'files/ssh/known_hosts',
- :authorized_keys => 'files/ssh/authorized_keys'
+ :authorized_keys => 'files/ssh/authorized_keys',
+ :ca_key => 'files/ca/ca.key',
+ :ca_cert => 'files/ca/ca.crt',
+ :dh_params => 'files/ca/dh.pem',
+ :node_x509_key => 'files/nodes/#{arg}/#{arg}.key',
+ :node_x509_cert => 'files/nodes/#{arg}/#{arg}.crt'
}
#
@@ -132,7 +137,12 @@ module LeapCli; module Path
#
def self.named_path(name, provider_dir=Path.provider)
if name.is_a? Array
- name, arg = name
+ if name.length > 2
+ arg = name[1..-1]
+ name = name[0]
+ else
+ name, arg = name
+ end
else
arg = nil
end