lib/cert_checker.rb in cert_checker-0.1.0 vs lib/cert_checker.rb in cert_checker-0.1.1
- old
+ new
@@ -44,11 +44,11 @@
end
end
# @return [status_symbol, host, issuer, expired_at, desc]
def check(host, *args)
- cert, verify_result, cert_chain, err_str = verify(host, *args)
- return ['failed', host, nil, nil, nil] unless cert
+ cert, verify_result, _cert_chain, err_str = verify(host, *args)
+ return [:failed, host, nil, nil, nil] unless cert
status_sym = :unverifiable unless verify_result
issuer = get_cert_issuer_name(cert)
expired_at = cert.not_after
valid_days = ((cert.not_after - Time.now) / ONE_DAY).floor