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

cadata = bytearray()
    paths_checked = []
    if cafile:
        paths_checked = [cafile]
        with open(to_bytes(cafile, errors='surrogate_or_strict'), 'rb') as f:
            if HAS_SSLCONTEXT:
                for b_pem in extract_pem_certs(f.read()):
                    cadata.extend(
                        ssl.PEM_cert_to_DER_cert(
                            to_native(b_pem, errors='surrogate_or_strict')
                        )
                    )
        return cafile, cadata, paths_checked
    if not HAS_SSLCONTEXT:
        paths_checked.append('/etc/ssl/certs')
    system = to_text(platform.system(), errors='surrogate_or_strict')
    
    
    if system == u'Linux':
        paths_checked.append('/etc/pki/ca-trust/extracted/pem')
        paths_checked.append('/etc/pki/tls/certs')
        paths_checked.append('/usr/share/ca-certificates/cacert.org')
    elif system == u'FreeBSD':
        paths_checked.append('/usr/local/share/certs')
    elif system == u'OpenBSD':
        paths_checked.append('/etc/ssl')
    elif system == u'NetBSD':
        paths_checked.append('/etc/openssl/certs')