Class: AppInfo::MobileProvision::DeveloperCertificate
- Defined in:
- lib/app_info/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.
243 244 245 |
# File 'lib/app_info/mobile_provision.rb', line 243 def initialize(data) @raw = OpenSSL::X509::Certificate.new(data) end |
Instance Attribute Details
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
241 242 243 |
# File 'lib/app_info/mobile_provision.rb', line 241 def raw @raw end |
Instance Method Details
#created_date ⇒ Object
251 252 253 |
# File 'lib/app_info/mobile_provision.rb', line 251 def created_date @raw.not_after end |
#expired_date ⇒ Object
255 256 257 |
# File 'lib/app_info/mobile_provision.rb', line 255 def expired_date @raw.not_before end |
#name ⇒ Object
247 248 249 |
# File 'lib/app_info/mobile_provision.rb', line 247 def name @raw.subject.to_a.find { |name, _, _| name == 'CN' }[1].force_encoding('UTF-8') end |