Class: AppPermissionStatistics::MobileProvision::DeveloperCertificate
- Defined in:
- lib/app_permission_statistics/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.
300 301 302 |
# File 'lib/app_permission_statistics/mobile_provision.rb', line 300 def initialize(data) @raw = OpenSSL::X509::Certificate.new(data) end |
Instance Attribute Details
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
298 299 300 |
# File 'lib/app_permission_statistics/mobile_provision.rb', line 298 def raw @raw end |
Instance Method Details
#created_date ⇒ Object
308 309 310 |
# File 'lib/app_permission_statistics/mobile_provision.rb', line 308 def created_date @raw.not_after end |
#expired_date ⇒ Object
312 313 314 |
# File 'lib/app_permission_statistics/mobile_provision.rb', line 312 def expired_date @raw.not_before end |
#name ⇒ Object
304 305 306 |
# File 'lib/app_permission_statistics/mobile_provision.rb', line 304 def name @raw.subject.to_a.find { |name, _, _| name == 'CN' }[1].force_encoding('UTF-8') end |