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
automatically use bundled certificate it set to auto #6707
Conversation
… to 'auto' and seperate this from which port is specified
@printzlau, thanks for your PR! By analyzing the history of the files in this pull request, we identified @pvizeli, @balloob and @fabaff to be potential reviewers. |
Hi @printzlau, It seems you haven't yet signed a CLA. Please do so here. Once you do that we will be able to review and accept this pull request. Thanks! |
tests/components/mqtt/test_init.py
Outdated
def test_setup_uses_certificate_not_on_mqtts_port(hass): | ||
"""Test setup doesn't use bundled certificates when not mqtts port.""" | ||
def test_setup_does_not_use_certificate_on_mqtts_port(hass): | ||
"""Test setup doesn't use bundled certificates when certificate is not set.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (82 > 79 characters)
@@ -317,8 +317,8 @@ def async_setup(hass, config): | |||
certificate = os.path.join(os.path.dirname(__file__), | |||
'addtrustexternalcaroot.crt') | |||
|
|||
# When the port indicates mqtts, use bundled certificates from requests | |||
if certificate is None and port == 8883: | |||
# When the certificate is set to auto, use bundled certificates from requests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (81 > 79 characters)
@@ -119,7 +119,7 @@ def valid_discovery_topic(value): | |||
vol.Optional(CONF_PORT, default=DEFAULT_PORT): cv.port, | |||
vol.Optional(CONF_USERNAME): cv.string, | |||
vol.Optional(CONF_PASSWORD): cv.string, | |||
vol.Optional(CONF_CERTIFICATE): cv.isfile, | |||
vol.Optional(CONF_CERTIFICATE): vol.Any('auto',cv.isfile), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing whitespace after ','
Description:
Change the way that bundled certificates is automatically used.
From now on it will be specified by setting certificate to 'auto'.
The previous method of using the port set to 8883, will no longer effect the certificate.
Related issue (if applicable): fixes #6596
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#2295
Example entry for
configuration.yaml
(if applicable):Checklist:
tox
run successfully. Your PR cannot be merged unless tests pass