Skip to content

SSL certificate problem: certificate has expired (not really)

I tried ghcup tui and it failed with a message about cert expiry.

Has the SSL cert really expired? Checking the link https://www.haskell.org/ghcup/data/ghcup-0.0.6.yaml manually, I see it looks good:

Expires: Monday, 29 November 2021 at 2:30:10 AM

> ghcup --version
The GHCup Haskell installer, version v0.1.16.2
> sw_vers
ProductName:	Mac OS X
ProductVersion:	10.14.6
BuildVersion:	18G9323

Here's the problem I encountered:

> ghcup tui
[ Info  ] downloading: https://www.haskell.org/ghcup/data/ghcup-0.0.6.yaml as file /Users/pdejoux/.ghcup/cache/ghcup-0.0.6.yaml
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (60) SSL certificate problem: certificate has expired
More details here: https://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.
HTTPS-proxy has similar options --proxy-cacert and --proxy-insecure.
[ Warn  ] Could not get download info, trying cached version (this may not be recent!)
[ Error ] JSON decoding failed with: YAML exception:
[ ...   ] Yaml file not found: /Users/pdejoux/.ghcup/cache/ghcup-0.0.6.yaml
[ ...   ] Consider removing "/Users/pdejoux/.ghcup/cache/ghcup-0.0.6.yaml" manually.

Checking the cache:

> pwd
/Users/pdejoux/.ghcup/cache
> ls
ghcup-0.0.2.json  ghcup-0.0.2.yaml  ghcup-0.0.3.yaml  ghcup-0.0.4.yaml  ghcup-0.0.5.yaml

Can't upgrade either for the same reason.

> ghcup upgrade
[ Info  ] downloading: https://www.haskell.org/ghcup/data/ghcup-0.0.6.yaml as file /Users/pdejoux/.ghcup/cache/ghcup-0.0.6.yaml
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (60) SSL certificate problem: certificate has expired
More details here: https://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.
HTTPS-proxy has similar options --proxy-cacert and --proxy-insecure.
[ Warn  ] Could not get download info, trying cached version (this may not be recent!)
[ Error ] JSON decoding failed with: YAML exception:
[ ...   ] Yaml file not found: /Users/pdejoux/.ghcup/cache/ghcup-0.0.6.yaml
[ ...   ] Consider removing "/Users/pdejoux/.ghcup/cache/ghcup-0.0.6.yaml" manually.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information