diff options
author | elijah <elijah@riseup.net> | 2012-11-14 23:55:47 -0800 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2012-11-14 23:55:47 -0800 |
commit | 41ff80b4aeb20b762e5f64ebb2508496be8f04ba (patch) | |
tree | a0648e37a7fae298b7eeeb1470d198fee3ef6c06 /lib/leap_cli/commands/ca.rb | |
parent | 5bafe7947a20b1d6208577ad6151053701243382 (diff) |
only generate cert of x509.user == true
Diffstat (limited to 'lib/leap_cli/commands/ca.rb')
-rw-r--r-- | lib/leap_cli/commands/ca.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/leap_cli/commands/ca.rb b/lib/leap_cli/commands/ca.rb index 59eb620..830b468 100644 --- a/lib/leap_cli/commands/ca.rb +++ b/lib/leap_cli/commands/ca.rb @@ -51,6 +51,8 @@ module LeapCli; module Commands assert_files_exist! :ca_cert, :ca_key, :msg => 'Run init-ca to create them' assert_config! 'provider.ca.server_certificates.bit_size' assert_config! 'provider.ca.server_certificates.life_span' + assert_config! 'common.x509.use' + if args.first == 'all' || args.empty? manager.each_node do |node| if cert_needs_updating?(node) @@ -118,6 +120,8 @@ module LeapCli; module Commands end def generate_cert_for_node(node) + return if node.x509.use == false + cert = CertificateAuthority::Certificate.new # set subject |