Class: HTTPI::Auth::SSL
- Inherits:
-
Object
- Object
- HTTPI::Auth::SSL
- Defined in:
- lib/nfedobrasil/monkey_patches.rb
Instance Method Summary collapse
Instance Method Details
#cert ⇒ Object
42 43 44 45 46 47 48 |
# File 'lib/nfedobrasil/monkey_patches.rb', line 42 def cert if @pkcs12 @cert ||= @pkcs12.certificate else @cert ||= (OpenSSL::X509::Certificate.new File.read(cert_file) if cert_file) end end |
#cert_key ⇒ Object
50 51 52 53 54 55 56 |
# File 'lib/nfedobrasil/monkey_patches.rb', line 50 def cert_key if @pkcs12 @cert_key ||= @pkcs12.key else @cert_key ||= (OpenSSL::PKey.read(File.read(cert_key_file), cert_key_password) if cert_key_file) end end |
#plcs_file(file, password) ⇒ Object
38 39 40 |
# File 'lib/nfedobrasil/monkey_patches.rb', line 38 def plcs_file(file, password) @pkcs12 = OpenSSL::PKCS12.new(File.read(file), password) end |