lib/ronin/cli/commands/cert_gen.rb in ronin-2.0.0 vs lib/ronin/cli/commands/cert_gen.rb in ronin-2.0.1
- old
+ new
@@ -101,12 +101,12 @@
},
desc: 'The Common Name (CN) for the certificate'
option :subject_alt_name, short: '-A',
value: {
- type: /[a-z0-9:\._-]+/,
- usage: 'HOST|IP'
+ type: /[a-z0-9:\._-]+/,
+ usage: 'HOST|IP'
},
desc: 'Adds HOST or IP to subjectAltName' do |value|
@subject_alt_names << value
end
@@ -275,11 +275,11 @@
#
def not_after
@not_after ||= if options[:not_after]
Time.parse(options[:not_after])
else
- not_before+Support::Crypto::Cert::ONE_YEAR
+ not_before + Support::Crypto::Cert::ONE_YEAR
end
end
#
# The `--key-type` key class.
@@ -376,10 +376,10 @@
# Builds the `subjectAltName` extension.
#
# @return [String, nil]
#
def subject_alt_name_ext
- if !@subject_alt_names.empty?
+ unless @subject_alt_names.empty?
@subject_alt_names.map { |name|
if name =~ IP_REGEXP
"IP: #{name}"
else
"DNS: #{name}"