Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions certmitm/certtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ def generate_test_context(original_cert_chain_pem, hostname, working_dir, logger
certcontent = certf.read()
buffer = ""
for i in certcontent.split("\n"):
# Skip empty lines in certificate files
if not i.strip():
continue
if "CERTIFICATE" in i:
if buffer:
buffer = f"-----BEGIN CERTIFICATE-----\n{buffer}-----END CERTIFICATE-----\n"
Expand Down