### 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

use_proxy=None, force=False, last_mod_time=None, timeout=10,
              use_gssapi=False, unix_socket=None, ca_path=None, cookies=None, unredirected_headers=None,
              decompress=True, ciphers=None, use_netrc=True):
    """Sends a request via HTTP(S) or FTP (needs the module as parameter)
    :arg module: The AnsibleModule (used to get username, password etc. (s.b.).
    :arg url:             The url to use.
    :kwarg data:          The data to be sent (in case of POST/PUT).
    :kwarg headers:       A dict with the request headers.
    :kwarg method:        "POST", "PUT", etc.
    :kwarg use_proxy:     (optional) whether or not to use proxy (Default: True)
    :kwarg boolean force: If True: Do not get a cached copy (Default: False)
    :kwarg last_mod_time: Default: None
    :kwarg int timeout:   Default: 10
    :kwarg boolean use_gssapi:   Default: False
    :kwarg unix_socket: (optional) String of file system path to unix socket file to use when establishing
        connection to the provided url
    :kwarg ca_path: (optional) String of file system path to CA cert bundle to use
    :kwarg cookies: (optional) CookieJar object to send with the request
    :kwarg unredirected_headers: (optional) A list of headers to not attach on a redirected request
    :kwarg decompress: (optional) Whether to attempt to decompress gzip content-encoded responses