Created
March 24, 2017 12:52
-
-
Save rtacconi/ec8786c07bfeeae770edcca8193b85db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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