-
Notifications
You must be signed in to change notification settings - Fork 44
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
ssl support #712
base: master
Are you sure you want to change the base?
ssl support #712
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #712 +/- ##
==========================================
+ Coverage 95.85% 96.10% +0.24%
==========================================
Files 23 23
Lines 1714 1847 +133
Branches 198 112 -86
==========================================
+ Hits 1643 1775 +132
- Misses 46 49 +3
+ Partials 25 23 -2 ☔ View full report in Codecov by Sentry. |
Thanks, looking good. Just need to review the test failures and coverage. |
…test_runserver_with_ssl, pytest-datafiles requirements plugin
2.2.1 version of 'livereload.js' doesn't check browser's 'location.protocol' property and always uses 'ws' specification for handshake. So aux server reverted to http. |
One test still failing. I'd suggest moving the test to test_runserver_main.py as well, I don't think we need a dedicated ssl file for it. |
Windows tests are failing... Didn't even check that for this os... Ok, I'll check and correct them on VM. This may be problem with self-signed test certs... |
Tests for Linux, Linux PyPy, MacOS and Windows perform well in my local environment. |
if self.ssl_rootcert_file_path: | ||
try: | ||
client_ssl_context.load_verify_locations(self.ssl_rootcert_file_path) | ||
except FileNotFoundError as e: | ||
raise AdevConfigError('{}: {}'.format(e.strerror, self.ssl_rootcert_file_path)) | ||
except Exception: | ||
raise AdevConfigError('invalid root cert file: {}'.format(self.ssl_rootcert_file_path)) |
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.
Is it difficult to create a test for this code? Seems to be the only missing coverage now.
client_ssl_context.load_verify_locations(self.ssl_rootcert_file_path) | ||
except FileNotFoundError as e: | ||
raise AdevConfigError('{}: {}'.format(e.strerror, self.ssl_rootcert_file_path)) | ||
except Exception: |
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.
I also wonder about catching arbitrary exceptions. I'd assume the only other errors we should expect here are ssl.SSLError exceptions.
What do these changes do?
implements ssl support
Are there changes in behavior for the user?
no
Related issue number
Fixes #208
Checklist