Skip to content

Commit

Permalink
Merge pull request #23 from cbenhagen/ssl
Browse files Browse the repository at this point in the history
Allow ssl verification without cert file
  • Loading branch information
blakev committed Dec 26, 2018
2 parents 0ab0b0f + ce1e38e commit a7f4930
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions syncthing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,6 @@ class BaseAPI(object):
def __init__(self, api_key, host='localhost', port=8384,
timeout=DEFAULT_TIMEOUT, is_https=False, ssl_cert_file=None):

if is_https and not ssl_cert_file:
logger.warning('using https without specifying ssl_cert_file')

if ssl_cert_file:
if not os.path.exists(ssl_cert_file):
raise SyncthingError(
Expand All @@ -152,7 +149,6 @@ def __init__(self, api_key, host='localhost', port=8384,
self.port = port
self.ssl_cert_file = ssl_cert_file
self.timeout = timeout
self.verify = True if ssl_cert_file else False
self._headers = {
'X-API-Key': api_key
}
Expand Down Expand Up @@ -199,7 +195,6 @@ def _request(self, method, endpoint, data=None, headers=None, params=None,
data=json.dumps(data),
params=params,
timeout=self.timeout,
verify=self.verify,
cert=self.ssl_cert_file,
headers=headers
)
Expand Down

0 comments on commit a7f4930

Please sign in to comment.