Shotgun ssl certificate validation failure

Hey, I think this has been discussed before, but could not find the relevant topic.

We are interacting with Shotgun from a Deadline event plugin, and getting an ssl validation error sometimes:

2020-04-09 11:06:59:    File "z:\_pipeline\shotgun_config\xx2\install\core\python\tank_vendor\shotgun_api3\shotgun.py", line 4072, in _send_form
2020-04-09 11:06:59:      resp = opener.open(url, params)
2020-04-09 11:06:59:    File "C:\Program Files\Thinkbox\Deadline10\bin\lib\urllib2.py", line 429, in open
2020-04-09 11:06:59:      response = self._open(req, data)
2020-04-09 11:06:59:    File "C:\Program Files\Thinkbox\Deadline10\bin\lib\urllib2.py", line 447, in _open
2020-04-09 11:06:59:      '_open', req)
2020-04-09 11:06:59:    File "C:\Program Files\Thinkbox\Deadline10\bin\lib\urllib2.py", line 407, in _call_chain
2020-04-09 11:06:59:      result = func(*args)
2020-04-09 11:06:59:    File "C:\Program Files\Thinkbox\Deadline10\bin\lib\urllib2.py", line 1241, in https_open
2020-04-09 11:06:59:      context=self._context)
2020-04-09 11:06:59:    File "C:\Program Files\Thinkbox\Deadline10\bin\lib\urllib2.py", line 1198, in do_open
2020-04-09 11:06:59:      raise URLError(err)

Apparently urllib2 is used from the Deadline libs. I insert the Shotgun paths in a specific location in sys.path for this purpose, but probably urllib2 has been loaded already, or something.

It is interesting, that when the task runs with (no worker) in the Worker Name field, it runs successfully, but when there is a specific worker, then it fails with the above error. Not even sure where it runs in the first case.

Any ideas? Do I have to copy urllib from the Shotgun distribution to solve this?

Any pointers are appreciated.