Skip to content

Commit

Permalink
[Infrastructure] Disable TSL cert verification for link checker
Browse files Browse the repository at this point in the history
  • Loading branch information
tassadarius committed Jul 31, 2023
1 parent 2bdbb1a commit 70fae93
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion org.jcryptool.releng/helper/link_availability_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import multiprocessing
import os
import re
import ssl
import socket
import sys
from abc import ABC
Expand Down Expand Up @@ -97,7 +98,12 @@ def send_request(context: PingContext) -> PingContext:
"""Send a request and save the return status code and possible errors."""
req = Request(context.url, headers={"User-Agent": DefaultSettings.USER_AGENT.value})
try:
_response = urlopen(req, timeout=context.timeout)
# There were cert issues, so disable cert checking completely
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE

_response = urlopen(req, timeout=context.timeout, context=ctx)
context.status = Status.OK
context.http_code = _response.getcode()
context.error_reason = None
Expand Down

0 comments on commit 70fae93

Please sign in to comment.