Class: ItunesReceiptDecoder::Config
- Inherits:
-
Object
- Object
- ItunesReceiptDecoder::Config
- Defined in:
- lib/itunes_receipt_decoder/config.rb
Overview
ItunesReceiptDecoder::Config
Class Attribute Summary collapse
-
.certificate_path ⇒ Object
Set this to the path of the AppleIncRootCertificate.cer file.
Class Method Summary collapse
-
.certificate ⇒ Object
returns the OpenSSL X509 Certificate.
-
.certificate_store ⇒ Object
Returns the OpenSSL X509 Store for the certificate.
Class Attribute Details
.certificate_path ⇒ Object
Set this to the path of the AppleIncRootCertificate.cer file
10 11 12 |
# File 'lib/itunes_receipt_decoder/config.rb', line 10 def certificate_path @certificate_path end |
Class Method Details
.certificate ⇒ Object
returns the OpenSSL X509 Certificate
23 24 25 26 27 |
# File 'lib/itunes_receipt_decoder/config.rb', line 23 def self.certificate @certificate ||= OpenSSL::X509::Certificate.new( File.read(certificate_path) ) end |
.certificate_store ⇒ Object
Returns the OpenSSL X509 Store for the certificate
15 16 17 18 19 |
# File 'lib/itunes_receipt_decoder/config.rb', line 15 def self.certificate_store return @certificate_store if @certificate_store @certificate_store = OpenSSL::X509::Store.new @certificate_store.add_cert(certificate) end |