Class: AppInfo::MobileProvision::DeveloperCertificate
- Defined in:
- lib/app_info/ipa/mobile_provision.rb
Overview
Developer Certificate
Instance Attribute Summary collapse
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
- #created_date ⇒ Object
- #expired_date ⇒ Object
-
#initialize(data) ⇒ DeveloperCertificate
constructor
A new instance of DeveloperCertificate.
- #name ⇒ Object
Constructor Details
#initialize(data) ⇒ DeveloperCertificate
Returns a new instance of DeveloperCertificate.
107 108 109 |
# File 'lib/app_info/ipa/mobile_provision.rb', line 107 def initialize(data) @raw = OpenSSL::X509::Certificate.new(data) end |
Instance Attribute Details
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
105 106 107 |
# File 'lib/app_info/ipa/mobile_provision.rb', line 105 def raw @raw end |
Instance Method Details
#created_date ⇒ Object
115 116 117 |
# File 'lib/app_info/ipa/mobile_provision.rb', line 115 def created_date @raw.not_after end |
#expired_date ⇒ Object
119 120 121 |
# File 'lib/app_info/ipa/mobile_provision.rb', line 119 def expired_date @raw.not_before end |
#name ⇒ Object
111 112 113 |
# File 'lib/app_info/ipa/mobile_provision.rb', line 111 def name @raw.subject.to_a.find { |name, _, _| name == 'CN' }[1] end |