jenkins-bot has submitted this change and it was merged.

Change subject: [IMPROV] Update SSL3_GET_SERVER_CERTIFICATE
......................................................................


[IMPROV] Update SSL3_GET_SERVER_CERTIFICATE

Support for requests with ndg-httpsclient installed

Change-Id: Id39ebec369e35dc434e439b273acda0153201f7c
---
M pywikibot/comms/http.py
1 file changed, 3 insertions(+), 9 deletions(-)

Approvals:
  John Vandenberg: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/comms/http.py b/pywikibot/comms/http.py
index 6c35fe3..9a9fdf3 100644
--- a/pywikibot/comms/http.py
+++ b/pywikibot/comms/http.py
@@ -46,15 +46,9 @@
 from pywikibot.tools import deprecate_arg
 import pywikibot.version
 
-if sys.version_info[:3] >= (2, 7, 9):
-    # Python 2.7.9 includes a backport of the ssl module from Python 3
-    # https://www.python.org/dev/peps/pep-0466/
-    SSL_CERT_VERIFY_FAILED_MSG = "SSL: CERTIFICATE_VERIFY_FAILED"
-else:
-    # The OpenSSL error code for
-    #   certificate verify failed
-    # cf. `openssl errstr 14090086`
-    SSL_CERT_VERIFY_FAILED_MSG = ":14090086:"
+# The error message for failed SSL certificate verification
+# 'certificate verify failed' is a commonly detectable string
+SSL_CERT_VERIFY_FAILED_MSG = 'certificate verify failed'
 
 _logger = "comm.http"
 

-- 
To view, visit https://gerrit.wikimedia.org/r/224401
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id39ebec369e35dc434e439b273acda0153201f7c
Gerrit-PatchSet: 4
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: VcamX <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: VcamX <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to