Class: As2::Config::Partner

Inherits:
Struct
  • Object
show all
Defined in:
lib/as2/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePartner

Returns a new instance of Partner.



16
17
18
19
20
# File 'lib/as2/config.rb', line 16

def initialize
  # set default.
  self.encryption_cipher = 'aes-256-cbc'
  self.base64_scheme = 'rfc4648'
end

Instance Attribute Details

#base64_schemeObject

Returns the value of attribute base64_scheme

Returns:

  • (Object)

    the current value of base64_scheme



15
16
17
# File 'lib/as2/config.rb', line 15

def base64_scheme
  @base64_scheme
end

#encryption_certificateObject

Returns the value of attribute encryption_certificate

Returns:

  • (Object)

    the current value of encryption_certificate



15
16
17
# File 'lib/as2/config.rb', line 15

def encryption_certificate
  @encryption_certificate
end

#encryption_cipherObject

Returns the value of attribute encryption_cipher

Returns:

  • (Object)

    the current value of encryption_cipher



15
16
17
# File 'lib/as2/config.rb', line 15

def encryption_cipher
  @encryption_cipher
end

#mdn_formatObject

Returns the value of attribute mdn_format

Returns:

  • (Object)

    the current value of mdn_format



15
16
17
# File 'lib/as2/config.rb', line 15

def mdn_format
  @mdn_format
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



15
16
17
# File 'lib/as2/config.rb', line 15

def name
  @name
end

#outbound_formatObject

Returns the value of attribute outbound_format

Returns:

  • (Object)

    the current value of outbound_format



15
16
17
# File 'lib/as2/config.rb', line 15

def outbound_format
  @outbound_format
end

#signing_certificateObject

Returns the value of attribute signing_certificate

Returns:

  • (Object)

    the current value of signing_certificate



15
16
17
# File 'lib/as2/config.rb', line 15

def signing_certificate
  @signing_certificate
end

#tls_verify_modeObject

Returns the value of attribute tls_verify_mode

Returns:

  • (Object)

    the current value of tls_verify_mode



15
16
17
# File 'lib/as2/config.rb', line 15

def tls_verify_mode
  @tls_verify_mode
end

#urlObject

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



15
16
17
# File 'lib/as2/config.rb', line 15

def url
  @url
end

Instance Method Details

#certificate=(certificate) ⇒ Object



57
58
59
60
61
# File 'lib/as2/config.rb', line 57

def certificate=(certificate)
  cert = As2::Config.build_certificate(certificate)
  self['encryption_certificate'] = cert
  self['signing_certificate'] = cert
end

#encryption_cipher_instanceObject



76
77
78
# File 'lib/as2/config.rb', line 76

def encryption_cipher_instance
  OpenSSL::Cipher.new(encryption_cipher)
end