Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rtacconi/ec8786c07bfeeae770edcca8193b85db to your computer and use it in GitHub Desktop.
Save rtacconi/ec8786c07bfeeae770edcca8193b85db to your computer and use it in GitHub Desktop.
require "openssl"
class Chef
class Recipe
def self.certificate_expired?(path)
OpenSSL::X509::Certificate.new(File.open(path, "rb").read).not_after <= Time.now
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment