Class: Transbank::Webpay::Vault
- Inherits:
-
Object
- Object
- Transbank::Webpay::Vault
- Defined in:
- lib/transbank/webpay/vault.rb
Class Method Summary collapse
Class Method Details
.cert ⇒ Object
6 7 8 |
# File 'lib/transbank/webpay/vault.rb', line 6 def cert @cert ||= OpenSSL::X509::Certificate.new open(Transbank::Webpay.configuration.cert_path) end |
.private_key ⇒ Object
10 11 12 |
# File 'lib/transbank/webpay/vault.rb', line 10 def private_key @private_key ||= OpenSSL::PKey::RSA.new open(Transbank::Webpay.configuration.key_path) end |
.pub_key ⇒ Object
21 22 23 |
# File 'lib/transbank/webpay/vault.rb', line 21 def pub_key server_cert.public_key end |
.server_cert ⇒ Object
14 15 16 17 18 19 |
# File 'lib/transbank/webpay/vault.rb', line 14 def server_cert @server_cert ||= begin path = Transbank::Webpay.configuration.server_cert_path OpenSSL::X509::Certificate.new File.read(path) end end |