Class: PkiExpress::PadesSignatureExplorer

Inherits:
SignatureExplorer show all
Defined in:
lib/pki_express/pades_signature_explorer.rb

Instance Attribute Summary

Attributes inherited from SignatureExplorer

#validate

Attributes inherited from PkiExpressOperator

#culture, #offline, #signature_policy, #time_zone, #timestamp_authority, #trust_lacuna_test_root

Instance Method Summary collapse

Methods inherited from SignatureExplorer

#signature_file=, #signature_file_base64=, #signature_file_path=, #verify_and_add_common_options

Methods inherited from PkiExpressOperator

#add_file_reference, #add_trusted_root, finalize

Constructor Details

#initialize(config = PkiExpressConfig.new) ⇒ PadesSignatureExplorer

Returns a new instance of PadesSignatureExplorer.



4
5
6
# File 'lib/pki_express/pades_signature_explorer.rb', line 4

def initialize(config=PkiExpressConfig.new)
  super(config)
end

Instance Method Details

#openObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/pki_express/pades_signature_explorer.rb', line 8

def open()
  if @signature_file_path.nil?
    raise 'The signature file was not set'
  end

  args = [@signature_file_path]

  # Verify and add common options
  verify_and_add_common_options(args)

  # This operation can only be used on versions greater
  # than 1.3 of the PKI Express.
  @version_manager.require_version('1.3')

  # Invoke command.
  result = invoke(Commands::OPEN_PADES, args)

  # Parse output and return model.
  model = parse_output(result)
  PadesSignature.new(model)
end