From 29e64ba82e427dda61753373d1eb6e6989d74629 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Tue, 20 Aug 2024 13:30:03 +0530 Subject: [PATCH] setup certificate as a fullchain if intermediate chain is not required --- press/press/doctype/tls_certificate/tls_certificate.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/press/press/doctype/tls_certificate/tls_certificate.py b/press/press/doctype/tls_certificate/tls_certificate.py index 5c978000e7d..1ad174dc2b8 100644 --- a/press/press/doctype/tls_certificate/tls_certificate.py +++ b/press/press/doctype/tls_certificate/tls_certificate.py @@ -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(