We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e3a81cd commit c5ac21aCopy full SHA for c5ac21a
1 file changed
lib/ruby_saml/utils.rb
@@ -37,7 +37,7 @@ module Utils # rubocop:disable Metrics/ModuleLength
37
# @param cert [OpenSSL::X509::Certificate|String] The x509 certificate.
38
# @return [true|false] Whether the certificate is expired.
39
def is_cert_expired(cert)
40
- cert = build_cert_object(cert) if cert.is_a?(String)
+ cert = build_cert_object(cert)
41
cert.not_after < Time.now
42
end
43
@@ -46,7 +46,7 @@ def is_cert_expired(cert)
46
47
# @return [true|false] Whether the certificate is currently active.
48
def is_cert_active(cert)
49
50
now = Time.now
51
cert.not_before <= now && cert.not_after >= now
52
0 commit comments