I'm working on a script which depends on a remote API endpoint which I do not control.
Today, my script stopped working, because the endpoint's SSL certificate expired today and they haven't yet fixed it. Running curl -v
, I get the following output:
wug@server:~$ curl -v -G -m5 [redacted]
* Connecting to hostname: 10.12.112.1
* Trying 10.12.112.1:19999...
* TCP_NODELAY set
* Connected to 10.12.112.1 (10.12.112.1) port 19999 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /[redact]/ca.rsa.4096.crt
CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (OUT), TLS alert, certificate expired (557):
* SSL certificate problem: certificate has expired
* Closing connection 0
curl: (60) SSL certificate problem: certificate has expired
More details here: https://curl.haxx.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.
I'm annoyed about this, but it's outside my control. Security is a concern here, so I don't want to disable all TLS verification with curl -k
. Ideally, I would pass a parameter which instructs curl to selectively ignore errors about expired certificates (which appears to be TLS 1.3 error 557). Is it possible to do this? If not, can wget
do it?