Skip to content

Commit

Permalink
Merge pull request #904 from MetOffice/903_tls_certificate_strict_che…
Browse files Browse the repository at this point in the history
…cking

Disable strict checking that TLS certificates are well formed
  • Loading branch information
jfrost-mo authored Nov 12, 2024
2 parents f926b41 + fa75d84 commit bf035cc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/CSET/_workflow_utils/fetch_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ def get_file(self, file_path: str, output_dir: str) -> bool:
True if files were transferred, otherwise False.
"""
ctx = ssl.create_default_context()
# Needed to enable compatibility with malformed iBoss TLS certificates.
ctx.verify_flags &= ~ssl.VERIFY_X509_STRICT
save_path = (
f"{output_dir.removesuffix('/')}/"
+ urllib.parse.urlparse(file_path).path.split("/")[-1]
Expand Down

0 comments on commit bf035cc

Please sign in to comment.