catch CertificateError in tls verification #3166
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3166 +/- ##
==========================================
+ Coverage 82.11% 82.12% +<.01%
==========================================
Files 228 228
Lines 9588 9593 +5
Branches 1385 1385
==========================================
+ Hits 7873 7878 +5
Misses 1456 1456
Partials 259 259
|
The tests only fails when "TOXENV=jessie", I'll see how to fix that. |
Oops, sorry about that^, misclicked the reviewers tag. |
LGTM. We can release it as 1.4.x bugfix. |
@@ -65,7 +73,7 @@ def _identityVerifyingInfoCallback(self, connection, where, ret): | |||
elif where & SSL_CB_HANDSHAKE_DONE: | |||
try: | |||
verifyHostname(connection, self._hostnameASCII) | |||
except VerificationError as e: | |||
except verification_errors as e: |
kmike
Mar 13, 2018
Member
Could you please update docstring of ScrapyClientTLSOptions? It mentions VerificationError and ValueError, but not CertificateError.
Could you please update docstring of ScrapyClientTLSOptions? It mentions VerificationError and ValueError, but not CertificateError.
lucywang000
Mar 14, 2018
Author
Member
+1 & done
+1 & done
Thanks @lucywang000! |
thanks! |
Thanks everyone for the reviews ! |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
This should fix #3029 (downlader errors when certificate is issued for ips instead of domains)