Skip to content

Commit

Permalink
Merge pull request #58 from lmoureaux/master
Browse files Browse the repository at this point in the history
Very bad (insecure!) workaround for certificate issues on HTCondor
  • Loading branch information
bbilin authored Apr 25, 2023
2 parents e9b6a7e + ba922dc commit 895012e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions remote/cmswebwrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import logging
import json
import os
import ssl
import time
try:
from http.client import HTTPSConnection
Expand All @@ -31,11 +32,15 @@ def __get_connection(self):
if self.cert_file is None or self.key_file is None:
raise Exception('Missing user certificate or user key')

# BUG: HTCondor nodes are missing the latest CA certificate
# See https://cern.service-now.com/service-portal?id=outage&n=OTG0076975
#context = ssl.create_default_context()
context = ssl._create_unverified_context()
context.load_cert_chain(self.cert_file)
return HTTPSConnection('cmsweb.cern.ch',
port=443,
cert_file=self.cert_file,
key_file=self.key_file,
timeout=120)
timeout=120,
context=context)

def get(self, path, cache=True):
"""
Expand Down

0 comments on commit 895012e

Please sign in to comment.