Skip to content

Commit 2e1f310

Browse files
committed
add custom ssl check
1 parent 5dc9899 commit 2e1f310

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

plogical/renew.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,17 @@ def SSLObtainer(self):
3737
if int(diff.days) >= 15:
3838
logging.writeToFile(
3939
'SSL exists for %s and is not ready to renew, skipping..' % (website.domain), 0)
40-
elif x509.get_issuer().get_components()[1][1] == 'Denial':
40+
elif x509.get_issuer().get_components()[1][1].decode('utf-8') == 'Denial':
4141
logging.writeToFile(
4242
'SSL exists for %s and ready to renew..' % (website.domain), 0)
4343
logging.writeToFile(
4444
'Renewing SSL for %s..' % (website.domain), 0)
4545

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

0 commit comments

Comments
 (0)