Class: AppPermissionStatistics::MobileProvision::DeveloperCertificate

Inherits:
Object
  • Object
show all
Defined in:
lib/app_permission_statistics/mobile_provision.rb

Overview

Developer Certificate

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#rawObject (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_dateObject



308
309
310
# File 'lib/app_permission_statistics/mobile_provision.rb', line 308

def created_date
  @raw.not_after
end

#expired_dateObject



312
313
314
# File 'lib/app_permission_statistics/mobile_provision.rb', line 312

def expired_date
  @raw.not_before
end

#nameObject



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