Class: RestPki::SignatureStarter

Inherits:
Object
  • Object
show all
Defined in:
lib/rest_pki/signature_starter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(restpki_client) ⇒ SignatureStarter

Returns a new instance of SignatureStarter.



7
8
9
10
11
12
13
14
15
16
# File 'lib/rest_pki/signature_starter.rb', line 7

def initialize(restpki_client)
    @restpki_client = restpki_client
    @signer_certificate_base64 = nil
    @signature_policy_id = nil
    @security_context_id = nil
    @callback_argument = nil
    @done = false
    @certificate = nil
    @ignore_revocation_status_unknown = false
end

Instance Attribute Details

#callback_argumentObject

Returns the value of attribute callback_argument.



5
6
7
# File 'lib/rest_pki/signature_starter.rb', line 5

def callback_argument
  @callback_argument
end

#ignore_revocation_status_unknownObject

Returns the value of attribute ignore_revocation_status_unknown.



5
6
7
# File 'lib/rest_pki/signature_starter.rb', line 5

def ignore_revocation_status_unknown
  @ignore_revocation_status_unknown
end

#security_context_idObject

Returns the value of attribute security_context_id.



5
6
7
# File 'lib/rest_pki/signature_starter.rb', line 5

def security_context_id
  @security_context_id
end

#signature_policy_idObject

Returns the value of attribute signature_policy_id.



5
6
7
# File 'lib/rest_pki/signature_starter.rb', line 5

def signature_policy_id
  @signature_policy_id
end

Instance Method Details

#certificateObject



18
19
20
21
22
23
# File 'lib/rest_pki/signature_starter.rb', line 18

def certificate
    unless @done
        raise 'The field "certificate_info" can only be accessed after calling one of the start methods'
    end
    @certificate
end

#signer_certificate=(content_raw) ⇒ Object



29
30
31
# File 'lib/rest_pki/signature_starter.rb', line 29

def signer_certificate=(content_raw)
    @signer_certificate_base64 = Base64.encode64(content_raw)
end

#signer_certificate_base64=(content_base64) ⇒ Object



25
26
27
# File 'lib/rest_pki/signature_starter.rb', line 25

def signer_certificate_base64=(content_base64)
    @signer_certificate_base64 = content_base64
end

#startObject



37
38
39
# File 'lib/rest_pki/signature_starter.rb', line 37

def start
    raise "#{self.class.name}#start is an abstract method."
end

#start_with_webpkiObject



33
34
35
# File 'lib/rest_pki/signature_starter.rb', line 33

def start_with_webpki
    raise "#{self.class.name}#start_with_webpki is an abstract method."
end