uri module and 2-way TLS

Hi there,

there seems to be a problem getting the uri module to play nicely with two way TLS. I have managed to make client validation OR server validation work, but not both at the same time, which seems strange. The same setup works without problem with cURL, as demonstrated below. If you have some experience with the uri module and TLS, maybe you can help.

THE SETUP

I have set up Apache httpd to accept TLS connections on localhost, with a self signed root certificate issued for 127.0.0.1, an intermediate CA certificate, a server and a client cert. I can test this setup with cURL, and everything works fine, see below.

The file host.127.0.0.1.cert.pem contains three certificates: the root, the intermediate, and the server cert.
The file ca.chain.pem contains two certificates: the root and the intermediate.
The file client.SomeUser.cert.pem contains a single certificate: the client cert

As you can see from the output below, I’m running python version = 3.7.0

From httpd.conf:

A bit late now but this will be fixed by https://github.com/ansible/ansible/issues/54589