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
37 38 39 40 41 42 43 |
# File 'lib/nfedobrasil/monkey_patches.rb', line 37 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
45 46 47 48 49 50 51 |
# File 'lib/nfedobrasil/monkey_patches.rb', line 45 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
33 34 35 |
# File 'lib/nfedobrasil/monkey_patches.rb', line 33 def plcs_file(file, password) @pkcs12 = OpenSSL::PKCS12.new(File.read(file), password) end |