Class: RubyEasyRSA::Commands::ExportP12

Inherits:
Base
  • Object
show all
Includes:
Mixins::GlobalConfig, Mixins::SSLConfig
Defined in:
lib/ruby_easy_rsa/commands/export_p12.rb

Instance Attribute Summary

Attributes inherited from Base

#binary

Instance Method Summary collapse

Methods inherited from Base

#do_after, #do_before, #execute, #initialize, #instantiate_builder, #stderr, #stdin, #stdout

Constructor Details

This class inherits a constructor from RubyEasyRSA::Commands::Base

Instance Method Details

#configure_command(builder, opts) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/ruby_easy_rsa/commands/export_p12.rb', line 15

def configure_command(builder, opts)
  filename_base = opts[:filename_base]
  include_ca = opts[:include_ca].nil? ? true : opts[:include_ca]
  include_key = opts[:include_key].nil? ? true : opts[:include_key]

  builder = super(builder, opts)
  builder = builder.with_subcommand('export-p12')
  builder = builder.with_argument(filename_base)
  builder = builder.with_argument('noca') unless include_ca
  builder = builder.with_argument('nokey') unless include_key
  builder
end