bin/hammer in hammer_cli-0.9.0 vs bin/hammer in hammer_cli-0.10.0

- old
+ new

@@ -29,10 +29,20 @@ option ["--show-ids"], :flag, "Show ids of associated resources" option ["--csv"], :flag, "Output as CSV (same as --output=csv)" option ["--output"], "ADAPTER", "Set output format" option ["--csv-separator"], "SEPARATOR", "Character to separate the values" option ["--autocomplete"], "LINE", "Get list of possible endings" + option ["--verify-ssl"], "VERIFY_SSL", "Configure SSL verification of remote system" do |value| + bool_normalizer = HammerCLI::Options::Normalizers::Bool.new + bool_normalizer.format(value) + end + option ["--ssl-ca-file"], "CA_FILE", "Configure the file containing the CA certificates" + option ["--ssl-ca-path"], "CA_PATH", "Configure the directory containing the CA certificates" + option ["--ssl-client-cert"], "CERT_FILE", "Configure the client's public certificate" + option ["--ssl-client-key"], "KEY_FILE", "Configure the client's private key" + option ["--ssl-with-basic-auth"], :flag, "Use standard authentication in addition to client certificate authentication" + option ["--fetch-ca-cert"], "SERVER", "Fetch CA certificate from server and exit" end preparser = PreParser.new File.basename($0), {} begin preparser.parse ARGV @@ -74,11 +84,17 @@ :username => preparser.username, :password => preparser.password, :host => preparser.server, :interactive => preparser.interactive, :verbose => preparser.verbose? || preparser.debug?, - :reload_cache => preparser.reload_cache? + :reload_cache => preparser.reload_cache?, + :verify_ssl => preparser.verify_ssl, + :ssl_ca_file => preparser.ssl_ca_file, + :ssl_ca_path => preparser.ssl_ca_path, + :ssl_client_cert => preparser.ssl_client_cert, + :ssl_client_key => preparser.ssl_client_key, + :ssl_with_basic_auth => preparser.ssl_with_basic_auth? }}) if HammerCLI::Settings.get(:ui, :mark_translated) include HammerCLI::I18n::Debug end @@ -104,9 +120,14 @@ logger.info "Configuration from the file #{path} has been loaded" end # load hammer core require 'hammer_cli' + +if preparser.fetch_ca_cert + require 'hammer_cli/ca_cert_fetcher' + exit HammerCLI::CACertFetcher.fetch_ca_cert(preparser.fetch_ca_cert) +end # load modules set in config begin HammerCLI::Modules.load_all rescue => e