mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 08:52:04 +02:00
fixed codeclimate errors
This commit is contained in:
parent
f4e0084895
commit
e7e3278267
44 changed files with 118 additions and 150 deletions
|
@ -67,9 +67,7 @@ class Certificate < ApplicationRecord
|
|||
|
||||
@cached_status = SIGNED
|
||||
|
||||
if parsed_crt.not_before > Time.zone.now.utc && parsed_crt.not_after < Time.zone.now.utc
|
||||
@cached_status = EXPIRED
|
||||
end
|
||||
@cached_status = EXPIRED if parsed_crt.not_before > Time.zone.now.utc && parsed_crt.not_after < Time.zone.now.utc
|
||||
|
||||
crl = OpenSSL::X509::CRL.new(File.open("#{ENV['crl_dir']}/crl.pem").read)
|
||||
return @cached_status unless crl.revoked.map(&:serial).include?(parsed_crt.serial)
|
||||
|
@ -104,7 +102,7 @@ class Certificate < ApplicationRecord
|
|||
end
|
||||
logger.error(err)
|
||||
puts "Certificate sign issue: #{err.inspect}" if Rails.env.test?
|
||||
return false
|
||||
false
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue