Opened 3 years ago
Last modified 2 years ago
#63829 new defect
mpstats submit failed cause DST Root CA X3 Expiration
Reported by: | laggardkernel (laggardkernel) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ballapete (Peter "Pete" Dyballa) | |
Port: | mpstats |
Description (last modified by laggardkernel (laggardkernel))
It seems mpstats
is using the system curl. DST Root CA X3 from lets encrypt expired (more than 1 month ago). curl post to macports.org just fails.
https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/
As planned, the DST Root CA X3 cross-sign has expired, and we’re now using our own ISRG Root X1 for trust on almost all devices.
/opt/local/libexec/mpstats submit Submitting data to https://ports.macports.org/statistics/submit/ ... Error: Peer certificate cannot be authenticated with given CA certificates while executing "curl post "submission\[data\]=$json" $stats_url"
❯ /usr/bin/curl https://ports.macports.org/statistics/submit/ 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.
We should make mpstats
use the curl from port for macOS <= 10.14.
https://github.com/Homebrew/brew/issues/12161#issuecomment-933510324
And modify the mpstats Portfile is NOT enough(missing the word 'not' formerly). From what I've learned, mpstats doesn't call the curl command line directlly. comment:ticket:61333:20
Change History (8)
comment:1 follow-up: 7 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|
comment:2 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|---|
Port: | mpstats added |
Short of redesigning mpstats to not use the curl facilities in MacPorts that use the system libcurl by default, this cannot be fixed in mpstats. And I don't see why we would pursue a fix that would only fix mpstats; why not pursue a fix that would fix MacPorts base and mpstats at the same time?
The ticket proposing we should bundle a newer curl/openssl/cert bundle with MacPorts is #51516.
comment:3 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
But see also #63809 about a change we should make on the ports.macports.org server that may help this issue on some OS versions.
comment:4 Changed 3 years ago by reneeotten (Renee Otten)
Priority: | High → Normal |
---|
comment:5 Changed 3 years ago by laggardkernel (laggardkernel)
Description: | modified (diff) |
---|
comment:6 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
Cc: | ballapete added |
---|
comment:7 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
Replying to ryandesign:
Users are advised to upgrade to Catalina or newer. Or recompile MacPorts using a newer libcurl with a newer openssl/libressl and cert bundle.
I presume this has happened on PPC Leopard, Mac OS X 10.5.8. Here port
has now version 2.8.0
. But Console log
tells me:
29.10.22 22:33:43 org.macports.mpstats[42402] org.macports.mpstats Notice Submitting data to https://ports.macports.org/statistics/submit/ ... 29.10.22 22:33:44 org.macports.mpstats[42402] org.macports.mpstats Notice Error: SSL connect error 29.10.22 22:33:44 org.macports.mpstats[42402] org.macports.mpstats Notice while executing 29.10.22 22:33:44 org.macports.mpstats[42402] org.macports.mpstats Notice "curl post "submission\[data\]=$json" $stats_url" 29.10.22 22:33:46 com.apple.launchd[1] com.apple.launchd Warning (org.macports.mpstats[42402]) Exited with exit code: 1 29.10.22 22:33:46 com.apple.launchd[1] com.apple.launchd Warning (org.macports.mpstats[42402]) Exited with exit code: 1
What is wrong? Can it be fixed? Or should I better uninstall this useless port?
comment:8 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
I did rebuild MacPorts 2.8.0 from source, configured with the additional arguments --with-curlprefix=/opt/local/lib CURL_CONFIG=/opt/local/bin/curl-config
(without the latter configure
does not seem to find the shell script) . And I also installed what was built. On Tiger, Mac OS X 10.4.11, and Leopard, Mac OS X 10.5.8
it works now to successfully submit
the list of installed port
s. Discussed in #61333.
mpstats uses whatever libcurl MacPorts was compiled with.
Unfortunately, the expiration of the old Let's Encrypt root certificate has broken older OS versions. See ProblemHotlist#letsencrypt.
Users are advised to upgrade to Catalina or newer. Or recompile MacPorts using a newer libcurl with a newer openssl/libressl and cert bundle.