]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/letsencrypt/files/default/bin/check-certificate
Fix new rubocop warnings
[chef.git] / cookbooks / letsencrypt / files / default / bin / check-certificate
index f3599a36f17b7a1d6d590131b576b377d095521e..73bd8a658c1731a2f15b835ddb2f9ef4e4b1050b 100755 (executable)
@@ -17,8 +17,8 @@ begin
   ssl.sync_close = true
   ssl.hostname = domains.first
   ssl.connect
-rescue StandardError => error
-  puts "Error connecting to #{host}: #{error.message}"
+rescue StandardError => e
+  puts "Error connecting to #{host}: #{e.message}"
 end
 
 if ssl
@@ -30,7 +30,7 @@ if ssl
     puts "Certificate #{domains.first} on #{host} expires at #{certificate.not_after}"
   end
 
-  subject_alt_name = certificate.extensions.find { |e| e.oid == "subjectAltName" }
+  subject_alt_name = certificate.extensions.find { |ext| ext.oid == "subjectAltName" }
 
   if subject_alt_name.nil?
     puts "Certificate #{domains.first} on #{host} has no subjectAltName"