Skip to content

Commit

Permalink
setup certificate as a fullchain if intermediate chain is not required
Browse files Browse the repository at this point in the history
  • Loading branch information
saurabh6790 committed Aug 20, 2024
1 parent 9fa2e36 commit 29e64ba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions press/press/doctype/tls_certificate/tls_certificate.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ def configure_full_chain(self):
if self.certificate and self.intermediate_chain:
self.full_chain = f"{self.certificate}\n{self.intermediate_chain}"

if not self.intermediate_chain:
self.full_chain = self.certificate

def _extract_certificate_details(self):
x509 = OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM, self.certificate)
self.decoded_certificate = OpenSSL.crypto.dump_certificate(
Expand Down

0 comments on commit 29e64ba

Please sign in to comment.