Commits

ben...@pollen.nymphormation.net  committed b7d3ff2

certificate infos

  • Participants
  • Parent commits c2fd247

Comments (0)

Files changed (1)

File restclient/http.py

     def __init__(self, timeout=None):
         HTTPClient.__init__(self)
         self._credentials = {}
+
+        # path to certificate file
+        self.cabundle = None
+
         if pycurl is None:
             raise RuntimeError('Cannot find pycurl library')
 
             c.setopt(pycurl.FOLLOWLOCATION, 1)
             c.setopt(pycurl.MAXREDIRS, 5)
 
+            if self.cabundle:
+                c.setopt(pycurl.CAINFO, celf.cabundle)
+
             auth = self._get_credentials()
             user = auth.get('user', None)
             password = auth.get('password', None)