Page MenuHomePhabricator

Certificate test can't fail as the certificate is valid
Closed, ResolvedPublic

Description

The tests.http_tests.HttpsCertificateTestCase.test_https_ignore_cert_error can't fail anymore because the website tested is using a valid certificate: https://www.ssllabs.com/ssltest/analyze.html?d=en.vikidia.org

With the requests change in T98439 it might be that we don't support connections to invalid certificates anymore.

Event Timeline

XZise created this task.Jun 2 2015, 6:05 PM
XZise raised the priority of this task from to Needs Triage.
XZise updated the task description. (Show Details)
XZise added a project: Pywikibot.
XZise added a subscriber: XZise.
Restricted Application added subscribers: Aklapper, Unknown Object (MLST). · View Herald TranscriptJun 2 2015, 6:05 PM

The easiest way to force an invalid cert error is by passing an empty cert bundle (which would make every site show up as having an invalid certificate).

XZise claimed this task.Jun 2 2015, 7:53 PM

Change 215507 had a related patch set uploaded (by XZise):
[FIX] http: Disable certificate validation

https://gerrit.wikimedia.org/r/215507

jayvdb set Security to None.
jayvdb moved this task from Backlog to requests on the Pywikibot-OAuth board.
jayvdb triaged this task as High priority.Jun 9 2015, 5:31 AM
jayvdb added a subscriber: jayvdb.
jayvdb added a comment.EditedJul 13 2015, 2:11 PM

We also have a test for invalid certificate, test_https_cert_error, which works well, using the still invalid cert for https://www.omegawiki.org/.

The purpose of test_https_ignore_cert_error and test_https_cert_invalid was that pywikibot's threading for httplib2 failed to raise the exception on the second request to the same host, as the connection was cached.

However now we are not using httplib2 threading, we may be able to retest with https://www.omegawiki.org/ . But the approach of https://gerrit.wikimedia.org/r/#/c/215507/ , testing with a dummy certificate, would be better.

Change 215507 merged by jenkins-bot:
[FIX] http: Disable certificate validation

https://gerrit.wikimedia.org/r/215507

jayvdb closed this task as Resolved.Aug 20 2015, 8:29 AM