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

dir_contents = os.listdir(path)
        for f in dir_contents:
            full_path = os.path.join(path, f)
            if os.path.isfile(full_path) and os.path.splitext(f)[1] in ('.crt', '.pem'):
                try:
                    if full_path not in LOADED_VERIFY_LOCATIONS:
                        with open(full_path, 'rb') as cert_file:
                            b_cert = cert_file.read()
                        if HAS_SSLCONTEXT:
                            try:
                                for b_pem in extract_pem_certs(b_cert):
                                    cadata.extend(
                                        ssl.PEM_cert_to_DER_cert(
                                            to_native(b_pem, errors='surrogate_or_strict')
                                        )
                                    )
                            except Exception:
                                continue
                        else:
                            os.write(tmp_fd, b_cert)
                            os.write(tmp_fd, b'\n')
                except (OSError, IOError):
                    pass
    if HAS_SSLCONTEXT:
        default_verify_paths = ssl.get_default_verify_paths()
        paths_checked[:0] = [default_verify_paths.capath]
    else:
        os.close(tmp_fd)
    return (tmp_path, cadata, paths_checked)
class SSLValidationHandler(urllib_request.BaseHandler):