Class: ICSP::Commands::VerifySignature
Instance Attribute Summary
Attributes inherited from BaseCommand
#arguments, #config, #options, #prompt
Instance Method Summary
collapse
Methods inherited from BaseCommand
#initialize
Instance Method Details
#cryptcp ⇒ Object
6
7
8
|
# File 'lib/commands/verify_signature.rb', line 6
def cryptcp
@cryptcp ||= @config.cryptcp
end
|
#execute ⇒ Object
10
11
12
13
14
15
16
17
18
19
|
# File 'lib/commands/verify_signature.rb', line 10
def execute
input_file = arguments.first
thumbprint = selected_certificate
result = ::ICSP::Shell.new("#{cryptcp} -vsignf -thumbprint '#{thumbprint}' #{input_file}",
convert_to_utf8: false, fork: false).execute
exit(result.exit_code) unless result.ok
puts result
end
|
#selected_certificate ⇒ Object
21
22
23
|
# File 'lib/commands/verify_signature.rb', line 21
def selected_certificate
::ICSP::Commands::Certificate::List.new(config: config, options: options, arguments: arguments).select
end
|