| 2088 | |
| 2089 | @support.system_must_validate_cert |
| 2090 | def test_networked_trusted_by_default_cert(self): |
| 2091 | # Default settings: requires a valid cert from a trusted CA |
| 2092 | support.requires('network') |
| 2093 | with socket_helper.transient_internet('www.python.org'): |
| 2094 | h = client.HTTPSConnection('www.python.org', 443) |
| 2095 | h.request('GET', '/') |
| 2096 | resp = h.getresponse() |
| 2097 | content_type = resp.getheader('content-type') |
| 2098 | resp.close() |
| 2099 | h.close() |
| 2100 | self.assertIn('text/html', content_type) |
| 2101 | |
| 2102 | def test_networked_good_cert(self): |
| 2103 | # We feed the server's cert as a validating cert |