|
30 | 30 |
|
31 | 31 | support.requires_working_socket(module=True) |
32 | 32 |
|
| 33 | +skip_libssl_fips_mode = unittest.skipIf( |
| 34 | + support.is_libssl_fips_mode(), |
| 35 | + "conservative skip due to OpenSSL FIPS mode possible algorithm nerfing", |
| 36 | +) |
| 37 | + |
33 | 38 | # XXX |
34 | 39 | # Request |
35 | 40 | # CacheFTPHandler (hard to write) |
@@ -1782,6 +1787,7 @@ def test_proxy_basic_auth(self): |
1782 | 1787 | "proxy.example.com:3128", |
1783 | 1788 | ) |
1784 | 1789 |
|
| 1790 | + @skip_libssl_fips_mode # Uses MD5 algorithm in challenge |
1785 | 1791 | def test_proxy_digest_auth(self): |
1786 | 1792 | # gh-60299: ProxyDigestAuthHandler must look up credentials using |
1787 | 1793 | # the proxy's authority |
@@ -1845,6 +1851,7 @@ def test_proxy_digest_auth_uri(self): |
1845 | 1851 | auth = http_handler.requests[1].get_header("Proxy-authorization") |
1846 | 1852 | self.assertIn('uri="%s"' % request_url, auth) |
1847 | 1853 |
|
| 1854 | + @skip_libssl_fips_mode # Uses MD5 algorithm in challenge |
1848 | 1855 | def test_digest_auth_uses_full_url(self): |
1849 | 1856 | # The non-proxy case must keep using the full request URL (not |
1850 | 1857 | # just the host) for the password lookup, so that sub-URI realm |
@@ -2355,12 +2362,6 @@ def test_parse_proxy(self): |
2355 | 2362 | self.assertRaises(ValueError, _parse_proxy, 'file:/ftp.example.com'), |
2356 | 2363 |
|
2357 | 2364 |
|
2358 | | -skip_libssl_fips_mode = unittest.skipIf( |
2359 | | - support.is_libssl_fips_mode(), |
2360 | | - "conservative skip due to OpenSSL FIPS mode possible algorithm nerfing", |
2361 | | -) |
2362 | | - |
2363 | | - |
2364 | 2365 | class TestDigestAuthAlgorithms(unittest.TestCase): |
2365 | 2366 | def setUp(self): |
2366 | 2367 | self.handler = AbstractDigestAuthHandler() |
|
0 commit comments