File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ module Utils # rubocop:disable Metrics/ModuleLength
3737 # @param cert [OpenSSL::X509::Certificate|String] The x509 certificate.
3838 # @return [true|false] Whether the certificate is expired.
3939 def is_cert_expired ( cert )
40- cert = build_cert_object ( cert ) if cert . is_a? ( String )
40+ cert = build_cert_object ( cert )
4141 cert . not_after < Time . now
4242 end
4343
@@ -46,7 +46,7 @@ def is_cert_expired(cert)
4646 # @param cert [OpenSSL::X509::Certificate|String] The x509 certificate.
4747 # @return [true|false] Whether the certificate is currently active.
4848 def is_cert_active ( cert )
49- cert = build_cert_object ( cert ) if cert . is_a? ( String )
49+ cert = build_cert_object ( cert )
5050 now = Time . now
5151 cert . not_before <= now && cert . not_after >= now
5252 end
You can’t perform that action at this time.
0 commit comments