8000 Remove broken disable verify ssl synology by balloob · Pull Request #4269 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Remove broken disable verify ssl synology #4269

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 7, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions homeassistant/components/camera/synology.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@
@asyncio.coroutine
def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
"""Setup a Synology IP Camera."""
if not config.get(CONF_VERIFY_SSL):
_LOGGER.warning('SSL verification currently cannot be disabled. '
'See https://goo.gl/1h1119')

# Determine API to use for authentication
syno_api_url = SYNO_API_URL.format(
config.get(CONF_URL), WEBAPI_PATH, QUERY_CGI)
Expand All @@ -72,7 +76,6 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
query_req = yield from hass.websession.get(
syno_api_url,
params=query_payload,
verify_ssl=config.get(CONF_VERIFY_SSL)
)
except asyncio.TimeoutError:
_LOGGER.error("Timeout on %s", syno_api_url)
Expand Down Expand Up @@ -113,7 +116,6 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
camera_req = yield from hass.websession.get(
syno_camera_url,
params=camera_payload,
verify_ssl=config.get(CONF_VERIFY_SSL),
cookies={'id': session_id}
)
except asyncio.TimeoutError:
Expand Down Expand Up @@ -165,7 +167,6 @@ def get_session_id(hass, username, password, login_url, valid_cert):
auth_req = yield from hass.websession.get(
login_url,
params=auth_payload,
verify_ssl=valid_cert
)
except asyncio.TimeoutError:
_LOGGER.error("Timeout on %s", login_url)
Expand Down Expand Up @@ -233,7 +234,6 @@ def async_camera_image(self):
response = yield from self.hass.websession.get(
image_url,
params=image_payload,
verify_ssl=self._valid_cert,
cookies={'id': self._session_id}
)
except asyncio.TimeoutError:
Expand Down Expand Up @@ -263,7 +263,6 @@ def handle_async_mjpeg_stream(self, request):
stream = yield from self.hass.websession.get(
streaming_url,
payload=streaming_payload,
verify_ssl=self._valid_cert,
cookies={'id': self._session_id}
)
except asyncio.TimeoutError:
Expand Down
0