Hii
I tried to replicate what you see. To help debug I spun up an old web server that is only doing TLSv1.
Then, on a clean Debian 12 VM, initially the URL fails to fetch with curl, as expected:
(venv) vagrant@debian-12:~$ curl -Ikv
https://tlsv1.tienhuis.nl* Trying [2001:648:2ffc:1225:a800:4ff:fec1:7353]:443...
* Connected to
tlsv1.tienhuis.nl (2001:648:2ffc:1225:a800:4ff:fec1:7353) port 443 (#0)
* ALPN: offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.0 (IN), TLS handshake, Certificate (11):
* TLSv1.0 (IN), TLS handshake, Server key exchange (12):
* TLSv1.0 (OUT), TLS alert, internal error (592):
* OpenSSL/3.0.13: error:0A00014D:SSL routines::legacy sigalg disallowed or unsupported
* Closing connection 0
curl: (35) OpenSSL/3.0.13: error:0A00014D:SSL routines::legacy sigalg disallowed or unsupported
Likewise, this playbook:
---
- name: legacy test
hosts: localhost
- name: fetch URL
ansible.builtin.uri:
url:
https://tlsv1.tienhuis.nl validate_certs: false
register: out
- ansible.builtin.debug: var=out
also fails at the uri task:
TASK [fetch URL] *********************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "elapsed": 0, "msg": "Status code was -1 and not [200]: Request failed: <urlopen error [SSL] legacy sigalg disallowed or unsupported (_ssl.c:992)>", "redirected": false, "status": -1, "url": "
https://tlsv1.tienhuis.nl"}
Replacing /etc/ssl/openssl.cnf with the small version that you have
(venv) vagrant@debian-12:~$ cat /etc/ssl/openssl.cnf
makes curl work:
(venv) vagrant@debian-12:~$ curl -Ikv
https://tlsv1.tienhuis.nl* Trying [2001:648:2ffc:1225:a800:4ff:fec1:7353]:443...
* Connected to
tlsv1.tienhuis.nl (2001:648:2ffc:1225:a800:4ff:fec1:7353) port 443 (#0)
* ALPN: offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.0 (IN), TLS handshake, Certificate (11):
* TLSv1.0 (IN), TLS handshake, Server key exchange (12):
* TLSv1.0 (IN), TLS handshake, Server finished (14):
* TLSv1.0 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.0 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.0 (OUT), TLS handshake, Finished (20):
* TLSv1.0 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1 / ECDHE-RSA-AES256-SHA
* ALPN: server did not agree on a protocol. Uses default.
* Server certificate:
* subject: CN=
tlsv1.tienhuis.nl* start date: Aug 17 10:25:11 2024 GMT
* expire date: Jan 17 10:25:11 2038 GMT
* issuer: CN=
tlsv1.tienhuis.nl* SSL certificate verify result: self-signed certificate (18), continuing anyway.
* using HTTP/1.x
> HEAD / HTTP/1.1
> Host:
tlsv1.tienhuis.nl> User-Agent: curl/7.88.1
> Accept: */*
>
< HTTP/1.1 200 OK
BUT, it also makes the uri task in the ansible playbook work:
TASK [ansible.builtin.debug] *********************************************************************************************************
ok: [localhost] => {
"out": {
"accept_ranges": "bytes",
"changed": false,
"connection": "close",
"content_length": "10701",
"content_type": "text/html",
"cookies": {},
"cookies_string": "",
"date": "Sat, 17 Aug 2024 11:02:40 GMT",
"elapsed": 0,
"etag": "\"29cd-61fde5e24e55f\"",
"failed": false,
"last_modified": "Sat, 17 Aug 2024 10:16:22 GMT",
"msg": "OK (10701 bytes)",
"redirected": false,
"server": "Apache/2.4.10 (Debian)",
"status": 200,
"url": "
https://tlsv1.tienhuis.nl",
"vary": "Accept-Encoding"
}
}
This seems to indicate a local problem somewhere on your side....
FYI, on my control node:
(venv) vagrant@debian-12:~$ ansible --version
ansible [core 2.17.3]
config file = None
configured module search path = ['/home/vagrant/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/vagrant/venv/lib/python3.11/site-packages/ansible
ansible collection location = /home/vagrant/.ansible/collections:/usr/share/ansible/collections
executable location = /home/vagrant/venv/bin/ansible
python version = 3.11.2 (main, May 2 2024, 11:59:08) [GCC 12.2.0] (/home/vagrant/venv/bin/python3)
jinja version = 3.1.4
libyaml = True
(venv) vagrant@debian-12:~$ pip list
Package Version
------------ -------
ansible-core 2.17.3
cffi 1.17.0
cryptography 43.0.0
Jinja2 3.1.4
MarkupSafe 2.1.5
packaging 24.1
pip 24.2
pycparser 2.22
PyYAML 6.0.2
resolvelib 1.0.1
setuptools 66.1.1
wheel 0.44.0
(venv) vagrant@debian-12:~$ openssl version
OpenSSL 3.0.13 30 Jan 2024 (Library: OpenSSL 3.0.13 30 Jan 2024)
(venv) vagrant@debian-12:~$ uname -a
Linux debian-12 6.1.0-23-arm64 #1 SMP Debian 6.1.99-1 (2024-07-15) aarch64 GNU/Linux