diff --git a/sentinel5dl/__init__.py b/sentinel5dl/__init__.py index 0be61eb..1a0804a 100644 --- a/sentinel5dl/__init__.py +++ b/sentinel5dl/__init__.py @@ -22,6 +22,8 @@ logger = logging.getLogger(__name__) +ca_info = None + def __md5(filename): '''Generate the md5 sum of a file @@ -79,6 +81,10 @@ def __http_request(path, filename=None): curl.setopt(curl.USERPWD, f'{USER}:{PASS}') curl.setopt(curl.WRITEDATA, f) curl.setopt(curl.FAILONERROR, True) + + if ca_info: + curl.setopt(pycurl.CAINFO, ca_info) + curl.perform() curl.close() if not filename: diff --git a/sentinel5dl/__main__.py b/sentinel5dl/__main__.py index 736b458..6d0f766 100644 --- a/sentinel5dl/__main__.py +++ b/sentinel5dl/__main__.py @@ -8,6 +8,7 @@ :license: MIT ''' +import certifi import logging import sentinel5dl @@ -20,6 +21,8 @@ def main(): logger = logging.getLogger(sentinel5dl.__name__) logger.setLevel(logging.INFO) + sentinel5dl.ca_info = certifi.where() + # Search for Sentinel-5 products result = search( polygon='POLYGON((7.88574278354645 49.347193400927495,'