Skip to content

Commit c5ac21a

Browse files
committed
Remove unnecessary string check
1 parent e3a81cd commit c5ac21a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ruby_saml/utils.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)