Class: InternetSecurityEvent::X509CertificateStatus

Inherits:
X509Status
  • Object
show all
Defined in:
lib/internet_security_event/x509_certificate_status.rb

Direct Known Subclasses

TLSStatus

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from X509Status

build, #renewal_duration

Constructor Details

#initialize(certificate) ⇒ X509CertificateStatus

Returns a new instance of X509CertificateStatus.



9
10
11
12
13
# File 'lib/internet_security_event/x509_certificate_status.rb', line 9

def initialize(certificate)
  @certificate = certificate

  super()
end

Instance Attribute Details

#certificateObject (readonly)

Returns the value of attribute certificate.



7
8
9
# File 'lib/internet_security_event/x509_certificate_status.rb', line 7

def certificate
  @certificate
end

Instance Method Details

#descriptionObject



15
16
17
# File 'lib/internet_security_event/x509_certificate_status.rb', line 15

def description
  super('certificate')
end

#to_eObject



19
20
21
22
23
24
25
26
27
# File 'lib/internet_security_event/x509_certificate_status.rb', line 19

def to_e
  super.merge({
                subject:    certificate.subject.to_s,
                issuer:     certificate.issuer.to_s,
                serial:     certificate.serial.to_i,
                not_before: certificate.not_before.to_s,
                not_after:  certificate.not_after.to_s,
              })
end