### Summary

In Python 3.12 the deprecated `key_file`, `cert_file` and `check_hostname` parameters have been [removed](https://docs.python.org/3.12/library/http.client.html#http.client.HTTPSConnection).

There is code which still attempts to set these, such as:

https://github.com/ansible/ansible/blob/0371ea08d6de55635ffcbf94da5ddec0cd809495/lib/ansible/module_utils/urls.py#L604-L608

Which results in an error under Python 3.12:

```
>       return httplib.HTTPSConnection(host, **kwargs)
E       TypeError: HTTPSConnection.__init__() got an unexpected keyword argument 'cert_file'
```

### Issue Type

Feature Idea

### Component Name

module_utils/urls.py

PROTOCOL = ssl.PROTOCOL_TLSv1
if not HAS_SSLCONTEXT and HAS_SSL:
    try:
        import ctypes
        import ctypes.util
    except ImportError:
        
        pass
    else:
        libssl_name = ctypes.util.find_library('ssl')
        libssl = ctypes.CDLL(libssl_name)
        for method in ('TLSv1_1_method', 'TLSv1_2_method'):
            try:
                libssl[method]  
                
                
                PROTOCOL = ssl.PROTOCOL_SSLv23
                break
            except AttributeError:
                pass
        del libssl
_BUNDLED_METADATA = {"pypi_name": "backports.ssl_match_hostname", "version": "3.7.0.1"}
LOADED_VERIFY_LOCATIONS = set()  
HAS_MATCH_HOSTNAME = True
try:
    from ssl import match_hostname, CertificateError
except ImportError:
    try:
        from backports.ssl_match_hostname import match_hostname, CertificateError  
    except ImportError: