Class: PayPal::SDK::Core::Credential::Certificate
- Defined in:
- lib/paypal-sdk/core/credential/certificate.rb
Overview
Certificate class for SSL Certificate authentication
Instance Attribute Summary collapse
-
#cert_path ⇒ Object
readonly
Returns the value of attribute cert_path.
Attributes inherited from Base
#app_id, #device_ipaddress, #password, #sandbox_email_address, #username
Instance Method Summary collapse
-
#cert ⇒ Object
Return SSL certificate.
-
#initialize(config) ⇒ Certificate
constructor
A new instance of Certificate.
-
#key ⇒ Object
Return SSL certificate key.
Methods inherited from Base
Constructor Details
#initialize(config) ⇒ Certificate
Returns a new instance of Certificate.
9 10 11 12 |
# File 'lib/paypal-sdk/core/credential/certificate.rb', line 9 def initialize(config) super @cert_path = config.cert_path end |
Instance Attribute Details
#cert_path ⇒ Object (readonly)
Returns the value of attribute cert_path.
7 8 9 |
# File 'lib/paypal-sdk/core/credential/certificate.rb', line 7 def cert_path @cert_path end |
Instance Method Details
#cert ⇒ Object
Return SSL certificate
15 16 17 |
# File 'lib/paypal-sdk/core/credential/certificate.rb', line 15 def cert @cert ||= OpenSSL::X509::Certificate.new(cert_content) end |
#key ⇒ Object
Return SSL certificate key
20 21 22 |
# File 'lib/paypal-sdk/core/credential/certificate.rb', line 20 def key @key = OpenSSL::PKey::RSA.new(cert_content) end |