Closed erovira closed 5 months ago
I get the same error in my Fedora 40 machine:
❯ curl --verbose --header "Content-Type: application/json" --request POST --data "$body" "$url"
Note: Unnecessary use of -X or --request, POST is already inferred.
* Host www.bcu.gub.uy:443 was resolved.
* IPv6: (none)
* IPv4: 190.0.157.55
* Trying 190.0.157.55:443...
* Connected to www.bcu.gub.uy (190.0.157.55) port 443
* ALPN: curl offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
* CApath: none
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (OUT), TLS alert, unknown CA (560):
* SSL certificate problem: unable to get local issuer certificate
* Closing connection
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
Version info:
❯ cat /etc/fedora-release
Fedora release 40 (Forty)
❯ curl --version
curl 8.6.0 (x86_64-redhat-linux-gnu) libcurl/8.6.0 OpenSSL/3.2.1 zlib/1.3.0.zlib-ng libidn2/2.3.7 nghttp2/1.59.0
Release-Date: 2024-01-31
Protocols: file ftp ftps http https ipfs ipns
Features: alt-svc AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz SPNEGO SSL threadsafe UnixSockets
When trying to do a POST request to bcu.gub.uy from Ubuntu, both
curl
andwget
fail with the following messagesThe site is indeed secure, you can go to https://www.bcu.gub.uy and inspect the certificates yourself, but for some reason in Ubuntu, neither curl nor wget are able to download it and attach it to
/etc/ssl/certs/ca-certificates.crt
; which if we do manually fixes the issue.