Skip to content
Permalink
Browse files
add custom ssl check
  • Loading branch information
usmannasir committed Feb 7, 2020
1 parent 5dc9899 commit 2e1f3109f5ce57c83c98755a8e29709b57a00890
Showing 1 changed file with 4 additions and 1 deletion.
@@ -37,14 +37,17 @@ def SSLObtainer(self):
if int(diff.days) >= 15:
logging.writeToFile(
'SSL exists for %s and is not ready to renew, skipping..' % (website.domain), 0)
elif x509.get_issuer().get_components()[1][1] == 'Denial':
elif x509.get_issuer().get_components()[1][1].decode('utf-8') == 'Denial':
logging.writeToFile(
'SSL exists for %s and ready to renew..' % (website.domain), 0)
logging.writeToFile(
'Renewing SSL for %s..' % (website.domain), 0)

virtualHostUtilities.issueSSL(website.domain, '/home/%s/public_html' % (website.domain),
website.adminEmail)
elif x509.get_issuer().get_components()[1][1].decode('utf-8') != "Let's Encrypt":
logging.writeToFile(
'Custom SSL exists for %s and ready to renew..' % (website.domain), 1)
else:
logging.writeToFile(
'SSL exists for %s and ready to renew..' % (website.domain), 0)

0 comments on commit 2e1f310

Please sign in to comment.