Skip to content

Commit

Permalink
bug fix: dns config reset
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Jan 19, 2024
1 parent 9b3e323 commit 6cfc2ad
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions plogical/virtualHostUtilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,11 @@ def OnBoardingHostName(Domain, tempStatusPath):

filePath = '/etc/letsencrypt/live/%s/fullchain.pem' % (Domain)

virtualHostUtilities.issueSSLForHostName(Domain, path)

x509 = OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM, open(filePath, 'r').read())
SSLProvider = x509.get_issuer().get_components()[1][1].decode('utf-8')

if SSLProvider == 'Denial':
virtualHostUtilities.issueSSLForHostName(Domain, path)

if SSLProvider == 'Denial':
message = 'Failed to issue Hostname SSL, either its DNS record is not propagated or the domain ie behind Cloudflare. [404]'
logging.CyberCPLogFileWriter.statusWriter(tempStatusPath, message)
Expand All @@ -167,11 +166,8 @@ def OnBoardingHostName(Domain, tempStatusPath):

logging.CyberCPLogFileWriter.statusWriter(tempStatusPath, 'Hostname SSL issued,50')

x509 = OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM, open(filePath, 'r').read())
SSLProvider = x509.get_issuer().get_components()[1][1].decode('utf-8')

if SSLProvider == 'Denial':
virtualHostUtilities.issueSSLForMailServer(Domain, path)
virtualHostUtilities.issueSSLForMailServer(Domain, path)

x509 = OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM, open(filePath, 'r').read())
SSLProvider = x509.get_issuer().get_components()[1][1].decode('utf-8')
Expand Down

0 comments on commit 6cfc2ad

Please sign in to comment.