Optionally disable ssl certificate validity check.#9181
Conversation
| self.add_event_handler('failed_auth', self.check_credentials) | ||
| self.add_event_handler('session_start', self.start) | ||
| if not verify_certificate: | ||
| self.add_event_handler('ssl_invalid_cert', self.discard_ssl_invalid_cert) |
There was a problem hiding this comment.
line too long (89 > 79 characters)
|
|
||
|
|
||
| def send_message(sender, password, recipient, use_tls, message): | ||
| def send_message(sender, password, recipient, use_tls, verify_certificate, message): |
There was a problem hiding this comment.
line too long (84 > 79 characters)
| self.add_event_handler('session_start', self.start) | ||
| if not verify_certificate: | ||
| self.add_event_handler('ssl_invalid_cert', | ||
| self.discard_ssl_invalid_cert) |
There was a problem hiding this comment.
continuation line under-indented for visual indent
| self.add_event_handler('failed_auth', self.check_credentials) | ||
| self.add_event_handler('session_start', self.start) | ||
| if not verify_certificate: | ||
| self.add_event_handler('ssl_invalid_cert', |
|
|
||
| def send_message(sender, password, recipient, use_tls, message): | ||
| def send_message(sender, password, recipient, use_tls, | ||
| verify_certificate, message): |
There was a problem hiding this comment.
continuation line under-indented for visual indent
|
|
||
|
|
||
| def send_message(sender, password, recipient, use_tls, message): | ||
| def send_message(sender, password, recipient, use_tls, |
|
Well the CI is failing because of "R: 99, 8: Method could be a function (no-self-use)". But if I remove the unused parameters, the code throw an exception/error in the logs because the code is calling the function with two parameters but the function definition don't have any parameters. Even if an error is displaying in the logs, the code "work" in the sense that it allow to connect to a server using a self-signed certificate. Probably a very simple issue, but my Python skills are not very high. I would appreciate some help! :) Thanks! |
|
@ohmer1 Try to add |
Description:
Optionally disable SSL certificate validity check. Allow to connect to a TLS enabled server using a self signed certificate. By default, the verification is still done. The user need to add the parameter
verify: falseto disable the certificate validity check.Example entry for
configuration.yaml(if applicable):Checklist:
If user exposed functionality or configuration variables are added/changed: